Patchwork [v2] AHCI: use ATA_BUSY

login
register
mail settings
Submitter Sergei Shtylyov
Date June 22, 2013, 9:39 p.m.
Message ID <201306230139.39597.sergei.shtylyov@cogentembedded.com>
Download mbox | patch
Permalink /patch/253446/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Sergei Shtylyov - June 22, 2013, 9:39 p.m.
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>

---
The patch is against the 'for-3.11' branch of Tejun Heo's 'libata.git' repo. 

 drivers/ata/ahci.c    |    2 +-
 drivers/ata/libahci.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tejun Heo - June 24, 2013, 11:30 p.m.
On Sun, Jun 23, 2013 at 01:39:39AM +0400, Sergei Shtylyov wrote:
> 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>

Applied to libata/for-3.11.

Thanks.

Patch

Index: libata/drivers/ata/ahci.c
===================================================================
--- libata.orig/drivers/ata/ahci.c
+++ libata/drivers/ata/ahci.c
@@ -583,7 +583,7 @@  static int ahci_p5wdh_hardreset(struct a
 
 	/* 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: libata/drivers/ata/libahci.c
===================================================================
--- libata.orig/drivers/ata/libahci.c
+++ libata/drivers/ata/libahci.c
@@ -1413,7 +1413,7 @@  static int ahci_hardreset(struct ata_lin
 
 	/* 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,