[SeaBIOS] [PATCH 5/7] ahci: don't expect ATA_CB_STAT_DRQ being clear

Gerd Hoffmann kraxel at redhat.com
Thu Jul 14 16:24:03 CEST 2011


Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
 src/ahci.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/ahci.c b/src/ahci.c
index e2ec07a..7279199 100644
--- a/src/ahci.c
+++ b/src/ahci.c
@@ -158,7 +158,7 @@ static int ahci_command(struct ahci_port_s *port, int iswrite, int isatapi,
     } while (status & ATA_CB_STAT_BSY);
 
     success = (0x00 == (status & (ATA_CB_STAT_BSY | ATA_CB_STAT_DF |
-                                  ATA_CB_STAT_DRQ | ATA_CB_STAT_ERR)) &&
+                                  ATA_CB_STAT_ERR)) &&
                ATA_CB_STAT_RDY == (status & (ATA_CB_STAT_RDY)));
     if (success) {
         dprintf(2, "AHCI/%d: ... finished, status 0x%x, OK\n", pnr,
@@ -379,8 +379,7 @@ ahci_port_probe(struct ahci_ctrl_s *ctrl, u32 pnr)
     u32 val, count = 0;
 
     val = ahci_port_readl(ctrl, pnr, PORT_TFDATA);
-    while (val & ((1 << 7) /* BSY */ |
-                  (1 << 3) /* DRQ */)) {
+    while (val & ATA_CB_STAT_BSY) {
         ndelay(500);
         val = ahci_port_readl(ctrl, pnr, PORT_TFDATA);
         count++;
-- 
1.7.1




More information about the SeaBIOS mailing list