kernel-ark/drivers
Tejun Heo d4b2bab4f2 libata: add deadline support to prereset and reset methods
Add @deadline to prereset and reset methods and make them honor it.
ata_wait_ready() which directly takes @deadline is implemented to be
used as the wait function.  This patch is in preparation for EH timing
improvements.

* ata_wait_ready() never does busy sleep.  It's only used from EH and
  no wait in EH is that urgent.  This function also prints 'be
  patient' message automatically after 5 secs of waiting if more than
  3 secs is remaining till deadline.

* ata_bus_post_reset() now fails with error code if any of its wait
  fails.  This is important because earlier reset tries will have
  shorter timeout than the spec requires.  If a device fails to
  respond before the short timeout, reset should be retried with
  longer timeout rather than silently ignoring the device.

  There are three behavior differences.

  1. Timeout is applied to both devices at once, not separately.  This
     is more consistent with what the spec says.

  2. When a device passes devchk but fails to become ready before
     deadline.  Previouly, post_reset would just succeed and let
     device classification remove the device.  New code fails the
     reset thus causing reset retry.  After a few times, EH will give
     up disabling the port.

  3. When slave device passes devchk but fails to become accessible
     (TF-wise) after reset.  Original code disables dev1 after 30s
     timeout and continues as if the device doesn't exist, while the
     patched code fails reset.  When this happens, new code fails
     reset on whole port rather than proceeding with only the primary
     device.

  If the failing device is suffering transient problems, new code
  retries reset which is a better behavior.  If the failing device is
  actually broken, the net effect is identical to it, but not to the
  other device sharing the channel.  In the previous code, reset would
  have succeeded after 30s thus detecting the working one.  In the new
  code, reset fails and whole port gets disabled.  IMO, it's a
  pathological case anyway (broken device sharing bus with working
  one) and doesn't really matter.

* ata_bus_softreset() is changed to return error code from
  ata_bus_post_reset().  It used to return 0 unconditionally.

* Spin up waiting is to be removed and not converted to honor
  deadline.

* To be on the safe side, deadline is set to 40s for the time being.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-05-01 07:49:53 -04:00
..
acorn
acpi power management: implement pm_ops.valid for everybody 2007-04-30 16:40:40 -07:00
amba
ata libata: add deadline support to prereset and reset methods 2007-05-01 07:49:53 -04:00
atm
auxdisplay
base
block
bluetooth
cdrom
char Merge branch 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2007-04-30 08:10:12 -07:00
clocksource
connector
cpufreq
crypto
dio
dma
edac
eisa
fc4
firmware
hid Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid 2007-04-30 08:58:21 -07:00
hwmon Merge branch 'linux-2.6' into for-2.6.22 2007-04-30 12:38:01 +10:00
i2c
ide
ieee1394 ieee1394: remove garbage from Kconfig 2007-04-30 00:00:33 +02:00
infiniband Merge branch 'linux-2.6' into for-2.6.22 2007-04-30 12:38:01 +10:00
input
isdn
kvm
leds
macintosh Merge branch 'linux-2.6' into for-2.6.22 2007-04-30 12:38:01 +10:00
mca
md [BLOCK] Don't pin lots of memory in mempools 2007-04-30 09:08:17 +02:00
media Merge branch 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2007-04-30 08:10:12 -07:00
message
mfd
misc Pull thinkpad into release branch 2007-04-28 23:11:19 -04:00
mmc
mtd
net Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2007-04-30 08:14:42 -07:00
nubus
oprofile
parisc [NET]: Remove NETIF_F_INTERNAL_STATS, default to internal stats. 2007-04-28 21:04:03 -07:00
parport
pci Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2007-04-29 10:48:21 -07:00
pcmcia
pnp
ps3 [POWERPC] Remove dev_dbg redefinition in drivers/ps3/vuart.c 2007-04-30 13:03:39 +10:00
rapidio
rtc
s390
sbus
scsi Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block 2007-04-30 08:12:39 -07:00
serial Merge branch 'linux-2.6' into for-2.6.22 2007-04-30 12:38:01 +10:00
sh
sn
spi
tc
telephony
usb Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid 2007-04-30 08:58:21 -07:00
video Merge branch 'linux-2.6' into for-2.6.22 2007-04-30 12:38:01 +10:00
w1
zorro
Kconfig
Makefile