From: Tejun Heo <tj@kernel.org>
To: jeff@garzik.org, linux-ide@vger.kernel.org
Cc: Tejun Heo <tj@kernel.org>
Subject: [PATCH 1/8] libata: fix EH device failure handling
Date: Thu, 29 Jan 2009 20:31:29 +0900 [thread overview]
Message-ID: <1233228696-10562-2-git-send-email-tj@kernel.org> (raw)
In-Reply-To: <1233228696-10562-1-git-send-email-tj@kernel.org>
The dev->pio_mode > XFER_PIO_0 test is there to avoid unnecessary
speed down warning messages but it accidentally disabled SATA link spd
down during configuration phase after reset where PIO mode is always
zero.
This patch fixes the problem by moving the test where it belongs.
This makes libata probing sequence behave better when the connection
is flaky at higher link speeds which isn't too uncommon for eSATA
devices.
Signed-off-by: Tejun Heo <tj@kernel.org>
---
drivers/ata/libata-eh.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 8147a83..c15572d 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2979,12 +2979,13 @@ 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 && dev->pio_mode > XFER_PIO_0) {
+ if (ehc->tries[dev->devno] == 1) {
/* This is the last chance, better to slow
* down than lose it.
*/
sata_down_spd_limit(ata_dev_phys_link(dev));
- ata_down_xfermask_limit(dev, ATA_DNXFER_PIO);
+ if (dev->pio_mode > XFER_PIO_0)
+ ata_down_xfermask_limit(dev, ATA_DNXFER_PIO);
}
}
--
1.6.0.2
next prev parent reply other threads:[~2009-01-29 11:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-29 11:31 [PATCHSET #upstream-fixes] libata: improve flaky link handling Tejun Heo
2009-01-29 11:31 ` Tejun Heo [this message]
2009-01-29 11:31 ` [PATCH 2/8] libata: move ata_dev_disable() to libata-eh.c Tejun Heo
2009-01-29 11:31 ` [PATCH 3/8] libata: check onlineness before using SPD in sata_down_spd_limit() Tejun Heo
2009-01-29 11:31 ` [PATCH 4/8] libata: clear dev->ering in smarter way Tejun Heo
2009-01-29 11:31 ` [PATCH 5/8] libata: add @spd_limit to sata_down_spd_limit() Tejun Heo
2009-01-29 11:31 ` [PATCH 6/8] libata: improve probe failure handling Tejun Heo
2009-01-29 11:31 ` [PATCH 7/8] libata: add no penalty retry request for EH device handling routines Tejun Heo
2009-01-29 11:31 ` [PATCH 8/8] libata: implement HORKAGE_1_5_GBPS and apply it to WD My Book Tejun Heo
2009-02-03 4:04 ` Jeff Garzik
2009-01-29 14:07 ` [PATCHSET #upstream-fixes] libata: improve flaky link handling Greg Freemyer
2009-01-29 15:50 ` Mark Lord
2009-01-29 23:57 ` Tejun Heo
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=1233228696-10562-2-git-send-email-tj@kernel.org \
--to=tj@kernel.org \
--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).