[PATCH] ahci: fix status register check in ahci_softreset

ahci_softreset() used to use ahci_tf_read() which reads D2H_REG area
to check for the Status register. However, this area is zeroed on
initialization and not set by initial signature FIS. Replace it with
ahci_check_status().

This bug prevented CLO code from being activated whenever BSY and/or
DRQ is set prior to softreset. This fix makes
AHCI_FLAG_RESET_NEEDS_CLO flag redundant.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

authored by Tejun Heo and committed by Jeff Garzik 1244a19c 30574b61

+1 -2
+1 -2
drivers/ata/ahci.c
··· 736 736 } 737 737 738 738 /* check BUSY/DRQ, perform Command List Override if necessary */ 739 - ahci_tf_read(ap, &tf); 740 - if (tf.command & (ATA_BUSY | ATA_DRQ)) { 739 + if (ahci_check_status(ap) & (ATA_BUSY | ATA_DRQ)) { 741 740 rc = ahci_clo(ap); 742 741 743 742 if (rc == -EOPNOTSUPP) {