Changeset 268 for trunk/hal/x86_64/drivers
- Timestamp:
- Jul 21, 2017, 3:36:16 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/drivers/ioc_ata.c
r221 r268 78 78 uint8_t status; 79 79 80 while (!(ata_cbr_read(ATA_SR) & ATA_SR_DRQ)); 81 status = ata_cbr_read(ATA_SR); 80 while (1) { 81 status = ata_cbr_read(ATA_SR); 82 if (status & ATA_SR_DRQ) 83 break; 84 } 85 82 86 return ((status & ATA_SR_ERR) ? -1 : 0); 83 87 } … … 102 106 int idx; 103 107 104 /* wait for the drive to signal that it's ready */105 if (ata_wait() == -1)106 x86_panic("ata_wait");107 108 108 for (idx = 0; idx < 256 * count; idx++) { 109 /* wait for the drive to signal that it's ready */ 110 if (ata_wait() == -1) 111 x86_panic("ata_wait"); 112 113 /* read */ 109 114 tmpword = ata_data_read(); 110 115 buf[idx * 2] = (uint8_t)(tmpword & 0xFF);
Note: See TracChangeset
for help on using the changeset viewer.