AHCI: use ATA_BUSY
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Sat, 22 Jun 2013 21:39:39 +0000 (01:39 +0400)
committerTejun Heo <tj@kernel.org>
Mon, 24 Jun 2013 23:29:31 +0000 (16:29 -0700)
ahci_hardreset() and ahci_p5wdh_hardreset() use bare numbers for the
BSY bit of the ATA status register, despite it's #define'd in
<linux/ata.h>.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/ahci.c
drivers/ata/libahci.c

index da45325..8db82d3 100644 (file)
@@ -583,7 +583,7 @@ static int ahci_p5wdh_hardreset(struct ata_link *link, unsigned int *class,
 
        /* clear D2H reception area to properly wait for D2H FIS */
        ata_tf_init(link->device, &tf);
-       tf.command = 0x80;
+       tf.command = ATA_BUSY;
        ata_tf_to_fis(&tf, 0, 0, d2h_fis);
 
        rc = sata_link_hardreset(link, sata_ehc_deb_timing(&link->eh_context),
index 64c3f1f..c240e4a 100644 (file)
@@ -1413,7 +1413,7 @@ static int ahci_hardreset(struct ata_link *link, unsigned int *class,
 
        /* clear D2H reception area to properly wait for D2H FIS */
        ata_tf_init(link->device, &tf);
-       tf.command = 0x80;
+       tf.command = ATA_BUSY;
        ata_tf_to_fis(&tf, 0, 0, d2h_fis);
 
        rc = sata_link_hardreset(link, timing, deadline, &online,