From: Jeff Garzik <jeff@garzik.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Hugh Dickins <hugh@veritas.com>, Jeff Garzik <jgarzik@redhat.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: 2.6.29-rc libata sff 32bit PIO regression
Date: Mon, 02 Feb 2009 23:00:40 -0500 [thread overview]
Message-ID: <4987C168.5060807@garzik.org> (raw)
In-Reply-To: <20090126191256.04dfb6d3@lxorguk.ukuu.org.uk>
Alan Cox wrote:
> And while we are at it fix the 32bit PIO handling for VLB for this case
> too
>
> pata_legacy: For VLB 32bit PIO don't try tricks with slop
>
> From: Alan Cox <alan@lxorguk.ukuu.org.uk>
>
> These devices are generally used with ATA anyway and it seems that some
> ATAPI will need us to issue the right number of words. Therefore as we
> can't switch mid burst on VLB devices we should only use 32bit I/O for
> suitable block sizes.
> ---
>
> drivers/ata/pata_legacy.c | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
>
>
> diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
> index 6c1d778..e3bc1b4 100644
> --- a/drivers/ata/pata_legacy.c
> +++ b/drivers/ata/pata_legacy.c
> @@ -283,9 +283,10 @@ static void pdc20230_set_piomode(struct ata_port *ap, struct ata_device *adev)
> static unsigned int pdc_data_xfer_vlb(struct ata_device *dev,
> unsigned char *buf, unsigned int buflen, int rw)
> {
> - if (ata_id_has_dword_io(dev->id)) {
> + int slop = buflen & 3;
> + /* 32bit I/O capable *and* we need to write a whole number of dwords */
> + if (ata_id_has_dword_io(dev->id) && (slop == 0 || slop == 3)) {
> struct ata_port *ap = dev->link->ap;
> - int slop = buflen & 3;
> unsigned long flags;
>
> local_irq_save(flags);
> @@ -735,7 +736,7 @@ static unsigned int vlb32_data_xfer(struct ata_device *adev, unsigned char *buf,
> struct ata_port *ap = adev->link->ap;
> int slop = buflen & 3;
>
> - if (ata_id_has_dword_io(adev->id)) {
> + if (ata_id_has_dword_io(adev->id) && (slop == 0 || slop == 3)) {
> if (rw == WRITE)
> iowrite32_rep(ap->ioaddr.data_addr, buf, buflen >> 2);
tested etc.? I don't see a sign-off...
prev parent reply other threads:[~2009-02-03 4:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-21 13:34 2.6.29-rc libata sff 32bit PIO regression Hugh Dickins
2009-01-21 20:11 ` Mikael Pettersson
2009-01-21 21:47 ` Alan Cox
2009-01-21 22:51 ` Sergei Shtylyov
2009-01-21 22:58 ` Alan Cox
2009-01-21 23:34 ` Sergei Shtylyov
2009-01-21 23:37 ` Sergei Shtylyov
2009-01-22 0:20 ` Sergei Shtylyov
2009-01-25 15:22 ` Alan Cox
2009-01-26 19:11 ` Alan Cox
2009-01-31 15:11 ` Sergei Shtylyov
2009-01-31 16:06 ` Alan Cox
2009-01-31 16:57 ` Sergei Shtylyov
2009-02-01 21:13 ` Hugh Dickins
2009-02-02 11:48 ` Sergei Shtylyov
2009-02-02 12:12 ` Hugh Dickins
2009-02-02 14:17 ` Sergei Shtylyov
2009-02-03 3:59 ` Jeff Garzik
2009-02-04 11:10 ` Sergei Shtylyov
2009-01-26 19:12 ` Alan Cox
2009-02-03 4:00 ` Jeff Garzik [this message]
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=4987C168.5060807@garzik.org \
--to=jeff@garzik.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=hugh@veritas.com \
--cc=jgarzik@redhat.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).