unsigned long timeout;
u8 s = 0, a = 0;
+ /* take a deep breath */
+ msleep(50);
+
if (IDE_CONTROL_REG) {
- /* take a deep breath */
- ide_delay_50ms();
a = hwif->INB(IDE_ALTSTATUS_REG);
s = hwif->INB(IDE_STATUS_REG);
if ((a ^ s) & ~INDEX_STAT) {
/* use non-intrusive polling */
hd_status = IDE_ALTSTATUS_REG;
}
- } else {
- ide_delay_50ms();
+ } else
hd_status = IDE_STATUS_REG;
- }
/* set features register for atapi
* identify command to be sure of reply
return 1;
}
/* give drive a breather */
- ide_delay_50ms();
+ msleep(50);
} while ((hwif->INB(hd_status)) & BUSY_STAT);
/* wait for IRQ and DRQ_STAT */
- ide_delay_50ms();
+ msleep(50);
if (OK_STAT((hwif->INB(IDE_STATUS_REG)), DRQ_STAT, BAD_R_STAT)) {
unsigned long flags;
/* needed for some systems
* (e.g. crw9624 as drive0 with disk as slave)
*/
- ide_delay_50ms();
+ msleep(50);
SELECT_DRIVE(drive);
- ide_delay_50ms();
+ msleep(50);
if (hwif->INB(IDE_SELECT_REG) != drive->select.all && !drive->present) {
if (drive->select.b.unit != 0) {
/* exit with drive0 selected */
SELECT_DRIVE(&hwif->drives[0]);
/* allow BUSY_STAT to assert & clear */
- ide_delay_50ms();
+ msleep(50);
}
/* no i/f present: mmm.. this should be a 4 -ml */
return 3;
printk("%s: no response (status = 0x%02x), "
"resetting drive\n", drive->name,
hwif->INB(IDE_STATUS_REG));
- ide_delay_50ms();
+ msleep(50);
hwif->OUTB(drive->select.all, IDE_SELECT_REG);
- ide_delay_50ms();
+ msleep(50);
hwif->OUTB(WIN_SRST, IDE_COMMAND_REG);
timeout = jiffies;
while (((hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) &&
time_before(jiffies, timeout + WAIT_WORSTCASE))
- ide_delay_50ms();
+ msleep(50);
rc = try_to_identify(drive, cmd);
}
if (rc == 1)
if (drive->select.b.unit != 0) {
/* exit with drive0 selected */
SELECT_DRIVE(&hwif->drives[0]);
- ide_delay_50ms();
+ msleep(50);
/* ensure drive irq is clear */
(void) hwif->INB(IDE_STATUS_REG);
}
printk("%s: enabling %s -- ", hwif->name, drive->id->model);
SELECT_DRIVE(drive);
- ide_delay_50ms();
+ msleep(50);
hwif->OUTB(EXABYTE_ENABLE_NEST, IDE_COMMAND_REG);
timeout = jiffies + WAIT_WORSTCASE;
do {
printk("failed (timeout)\n");
return;
}
- ide_delay_50ms();
+ msleep(50);
} while ((hwif->INB(IDE_STATUS_REG)) & BUSY_STAT);
- ide_delay_50ms();
+ msleep(50);
if (!OK_STAT((hwif->INB(IDE_STATUS_REG)), 0, BAD_STAT)) {
printk("failed (status = 0x%02x)\n", hwif->INB(IDE_STATUS_REG));
udelay(10);
hwif->OUTB(8, hwif->io_ports[IDE_CONTROL_OFFSET]);
do {
- ide_delay_50ms();
+ msleep(50);
stat = hwif->INB(hwif->io_ports[IDE_STATUS_OFFSET]);
} while ((stat & BUSY_STAT) && time_after(timeout, jiffies));