]> git.karo-electronics.de Git - karo-tx-linux.git/commit
libata: always do follow-up SRST if hardreset returned -EAGAIN
authorTejun Heo <tj@kernel.org>
Mon, 13 Oct 2008 23:21:28 +0000 (19:21 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 22 Oct 2008 21:13:18 +0000 (14:13 -0700)
commitdd5d2d841e954134a06ea6b6e414b90b9b80b4e5
tree2154e9c235b5bde5f02a6c4ae1cfa65fb1447923
parentc8d4a26cf27050f22e3aa493c04982a34774780e
libata: always do follow-up SRST if hardreset returned -EAGAIN

commit 5dbfc9cb59d4ad75199949d7dd8a8c6d7bc518df upstream

As an optimization, follow-up SRST used to be skipped if
classification wasn't requested even when hardreset requested it via
-EAGAIN.  However, some hardresets can't wait for device readiness and
skipping SRST can cause timeout or other failures during revalidation.
Always perform follow-up SRST if hardreset returns -EAGAIN.  This
makes reset paths more predictable and thus less error-prone.

While at it, move hardreset error checking such that it's done right
after hardreset is finished.  This simplifies followup SRST condition
check a bit and makes the reset path easier to modify.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/ata/libata-eh.c