]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
libata: improve probe failure handling
authorTejun Heo <tj@kernel.org>
Thu, 29 Jan 2009 11:31:34 +0000 (20:31 +0900)
committerJeff Garzik <jgarzik@redhat.com>
Tue, 3 Feb 2009 04:03:34 +0000 (23:03 -0500)
commitc2c7a89c5eabaea8c0c2aa0c1069e510144513ab
tree4cec432ebd36a103e366d56d2d62221674df5a99
parenta07d499b4759881db1359dd8812eecd00b0e0a28
libata: improve probe failure handling

When link is flaky at high speed, it isn't uncommon for a device to
repeatedly fail probing sequence early after successfully negotiating
high link speed.  This often leads to consecutive hotplug events
without successful probing.

This patch improves libata EH such that it remembers probing trials
and if there have been more than two unsuccessful trials in the past
60 seconds, slows down link speed to 1.5Gbps.

As link speed negotiation is the duty of the PHY layer proper, the
goal of this fallback mechanism is to provide the last resort when
everything else fails, which unfortunately happens not too
infrequently, so no fancy 6->3->1.5 speeding down or highest
successful transmission speed seen kind of logics (yet).

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-eh.c