libata: fix internal command failure handling
commit9982364654c186acd48c3070dcf6a76c69e540cc
authorTejun Heo <tj@kernel.org>
Fri, 16 Oct 2009 04:00:51 +0000 (16 13:00 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Nov 2009 00:21:47 +0000 (9 16:21 -0800)
tree38f90b730caa0c0b159780edcdb5a5c71ab7a85f
parent2f37b165767202d7438aac98710f20038d197542
libata: fix internal command failure handling

commit f4b31db92d163df8a639f5a8c8633bdeb6e8432d upstream.

When an internal command fails, it should be failed directly without
invoking EH.  In the original implemetation, this was accomplished by
letting internal command bypass failure handling in ata_qc_complete().
However, later changes added post-successful-completion handling to
that code path and the success path is no longer adequate as internal
command failure path.  One of the visible problems is that internal
command failure due to timeout or other freeze conditions would
spuriously trigger WARN_ON_ONCE() in the success path.

This patch updates failure path such that internal command failure
handling is contained there.

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