libata: fix spurious WARN_ON_ONCE() on port freeze
authorTejun Heo <tj@kernel.org>
Thu, 17 Sep 2009 09:45:27 +0000 (18:45 +0900)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 17 Sep 2009 20:45:40 +0000 (16:45 -0400)
commit4dc738ed2adf28f62f46dd53ef700a51603777f7
tree2a7bab5698c431eae473e8df4a7b6ab10af27566
parent31b239ad1ba7225435e13f5afc47e48eb674c0cc
libata: fix spurious WARN_ON_ONCE() on port freeze

Commit 54c38444fad6a99b4b19512f8f0055d69115e69e makes libata abort qcs
after the port is frozen.  This is necessary to guarantee that TF
registers are accessed after the DMA engine is shutdown after an
error.  However, this triggers WARN_ON_ONCE() check in
ata_qc_complete() spuriously.  Move WARN_ON_ONCE() downwards such that
failing commands while frozen doesn't trigger it.

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