summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-10-29 07:45:05 (GMT)
committerJeff Garzik <jeff@garzik.org>2007-10-29 10:21:33 (GMT)
commit4fb4615bc9465e7098665fa9616b6ac1f495f895 (patch)
treefdd760b7dd485cb21ca5f6547e3db2335589aed0
parentcdeab1140799f09c5f728a5ff85e0bdfa5679cd2 (diff)
downloadlinux-fsl-qoriq-4fb4615bc9465e7098665fa9616b6ac1f495f895.tar.xz
libata: no need to speed down if already at PIO0
After reset, transfer mode is always PIO0 regardless of dev->xfer_mask. Check dev->pio_mode before trying to slow down after configuration failure. This prevents bogus speed down before device is actually configured. Signed-off-by: Tejun Heo <htejun@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/ata/libata-eh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index b237ff1..ec55d63 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2437,7 +2437,7 @@ static int ata_eh_handle_dev_fail(struct ata_device *dev, int err)
/* give it just one more chance */
ehc->tries[dev->devno] = min(ehc->tries[dev->devno], 1);
case -EIO:
- if (ehc->tries[dev->devno] == 1) {
+ if (ehc->tries[dev->devno] == 1 && dev->pio_mode > XFER_PIO_0) {
/* This is the last chance, better to slow
* down than lose it.
*/