| Submitter | Robert Hancock |
|---|---|
| Date | Dec. 9, 2009, 2:48 a.m. |
| Message ID | <4B1F0FEA.7070403@gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/40700/ |
| State | Not Applicable |
| Delegated to: | David Miller |
| Headers | show |
Comments
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? -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 12/15/2009 08:16 PM, Robert Hancock wrote: > 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? No worries, it's in the local queue... Jeff -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch
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 */
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> -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html