]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] ahci: fix status register check in ahci_softreset
authorTejun Heo <htejun@gmail.com>
Wed, 1 Nov 2006 08:19:18 +0000 (17:19 +0900)
committerJeff Garzik <jeff@garzik.org>
Wed, 1 Nov 2006 09:20:45 +0000 (04:20 -0500)
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>
drivers/ata/ahci.c

index cef2e70d64f8d57d2e62bbec19a5fda752e05d40..988f8bbd14ffa39cc26976f54ab95818496e2785 100644 (file)
@@ -736,8 +736,7 @@ static int ahci_softreset(struct ata_port *ap, unsigned int *class)
        }
 
        /* check BUSY/DRQ, perform Command List Override if necessary */
-       ahci_tf_read(ap, &tf);
-       if (tf.command & (ATA_BUSY | ATA_DRQ)) {
+       if (ahci_check_status(ap) & (ATA_BUSY | ATA_DRQ)) {
                rc = ahci_clo(ap);
 
                if (rc == -EOPNOTSUPP) {