diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2011-07-14 16:24:03 +0200 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2011-07-24 23:28:57 -0400 |
commit | cbda795db4bbfe689a35082ea71cfbab48677a28 (patch) | |
tree | c5e50606db83f1c02810ba3ccef23c78f7f45130 | |
parent | 9c48aab016ba475caf7abe6c92624861daf9caf4 (diff) | |
download | seabios-cbda795db4bbfe689a35082ea71cfbab48677a28.zip seabios-cbda795db4bbfe689a35082ea71cfbab48677a28.tar.gz seabios-cbda795db4bbfe689a35082ea71cfbab48677a28.tar.bz2 |
ahci: don't expect ATA_CB_STAT_DRQ being clear
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r-- | src/ahci.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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++; |