libata: track SLEEP state and issue SRST to wake it up
authorTejun Heo <htejun@gmail.com>
Thu, 25 Oct 2007 09:30:36 +0000 (18:30 +0900)
committerJeff Garzik <jeff@garzik.org>
Mon, 29 Oct 2007 10:15:25 +0000 (06:15 -0400)
commit054a5fbaceb2eb3a31ea843c1cf0b8e10b91478c
treecbf21985f3894b11fe00666cef8ac33bae4f007d
parent4dbfa39b6c95eb9d0aedb5bd00bb552b91c31e3d
libata: track SLEEP state and issue SRST to wake it up

ATA devices in SLEEP mode don't respond to any commands.  SRST is
necessary to wake it up.  Till now, when a command is issued to a
device in SLEEP mode, the command times out, which makes EH reset the
device and retry the command after that, causing a long delay.

This patch makes libata track SLEEP state and issue SRST automatically
if a command is about to be issued to a device in SLEEP.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Bruce Allen <ballen@gravity.phys.uwm.edu>
Cc: Andrew Paprocki <andrew@ishiboo.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-core.c
drivers/ata/libata-eh.c
include/linux/ata.h
include/linux/libata.h