All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Alan <alan@lxorguk.ukuu.org.uk>
Cc: akpm@osdl.org, torvalds@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sata_via: PATA support, resubmit
Date: Mon, 08 Jan 2007 11:34:00 -0500	[thread overview]
Message-ID: <45A27278.9000007@pobox.com> (raw)
In-Reply-To: <20070108164050.60633505@localhost.localdomain>

Alan wrote:
>> Just separate PATA and SATA operations.  That way everything works as 
>> expected, and you don't unintentionally add lovely oopses all over the 
>> place.
> 
> Ok - based on your pointers to [ab]using port_start you want something
> like this for now, with the port_start evaporating when Tejun's probe
> changes go in ?
> 
> Signed-off-by: Alan Cox <alan@redhat.com>

Looks good to me, modulo minor comments below...



> +static void vt6421_set_pio_mode(struct ata_port *ap, struct ata_device *adev)
> +{
> +	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
> +	static const u8 pio_bits[] = { 0xA8, 0x65, 0x65, 0x31, 0x20 };
> +	if (ap->port_no == PATA_PORT)
> +		pci_write_config_byte(pdev, PATA_PIO_TIMING, pio_bits[adev->pio_mode - XFER_PIO_0]);
> +}
> +
> +static void vt6421_set_dma_mode(struct ata_port *ap, struct ata_device *adev)
> +{
> +	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
> +	static const u8 udma_bits[] = { 0xEE, 0xE8, 0xE6, 0xE4, 0xE2, 0xE1, 0xE0, 0xE0 };
> +	if (ap->port_no == PATA_PORT)
> +		pci_write_config_byte(pdev, PATA_UDMA_TIMING, udma_bits[adev->pio_mode - XFER_UDMA_0]);
> +}

You can kill the '== PATA_PORT' tests now.

	Jeff



  reply	other threads:[~2007-01-08 16:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-08 12:26 [PATCH] sata_via: PATA support, resubmit Alan
2007-01-08 13:04 ` Jeff Garzik
2007-01-08 15:42   ` Alan
2007-01-08 15:51     ` Jeff Garzik
2007-01-08 16:40       ` Alan
2007-01-08 16:34         ` Jeff Garzik [this message]
2007-01-08 17:11           ` Alan
2007-01-09 10:39             ` Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45A27278.9000007@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.