linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Hancock <hancockrwd@gmail.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: ide <linux-ide@vger.kernel.org>
Subject: Re: [PATCH] libata: fix reporting of drained bytes when clearing DRQ
Date: Tue, 15 Dec 2009 19:16:55 -0600	[thread overview]
Message-ID: <4B283507.1090808@gmail.com> (raw)
In-Reply-To: <4B1F0FEA.7070403@gmail.com>

On 12/08/2009 08:48 PM, Robert Hancock wrote:
> When we drain data from a device to clear DRQ during error recovery, the number
> of bytes reported as drained is too low by a factor of 2 because the count
> is actually reporting the number of words drained, not bytes. Fix this.
>
> Signed-off-by: Robert Hancock<hancockrwd@gmail.com>
>
> diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
> index 51eb1e2..3afa21b 100644
> --- a/drivers/ata/libata-sff.c
> +++ b/drivers/ata/libata-sff.c
> @@ -2275,7 +2275,7 @@ void ata_sff_drain_fifo(struct ata_queued_cmd *qc)
>   	ap = qc->ap;
>   	/* Drain up to 64K of data before we give up this recovery method */
>   	for (count = 0; (ap->ops->sff_check_status(ap)&  ATA_DRQ)
> -						&&  count<  32768; count++)
> +						&&  count<  65536; count += 2)
>   		ioread16(ap->ioaddr.data_addr);
>
>   	/* Can become DEBUG later */

Jeff, ping?

  reply	other threads:[~2009-12-16  1:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-09  2:48 [PATCH] libata: fix reporting of drained bytes when clearing DRQ Robert Hancock
2009-12-16  1:16 ` Robert Hancock [this message]
2009-12-16 10:21   ` 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=4B283507.1090808@gmail.com \
    --to=hancockrwd@gmail.com \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.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 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).