Some devices need more time to become non-busy after command completion,
so use the same timeout in wait_drive_not_busy() (called from task_in_intr()
if CONFIG_IDE_TASKFILE_IO=y) as in drive_cmd_intr().
Thanks to Mark Haverkamp <markh@osdl.org> for help in fixing this.
static u8 wait_drive_not_busy(ide_drive_t *drive)
{
ide_hwif_t *hwif = HWIF(drive);
- int retries = 5;
+ int retries = 100;
u8 stat;
+
/*
- * (ks) Last sector was transfered, wait until drive is ready.
- * This can take up to 10 usec. We willl wait max 50 us.
+ * Last sector was transfered, wait until drive is ready.
+ * This can take up to 10 usec, but we will wait max 1 ms
+ * (drive_cmd_intr() waits that long).
*/
while (((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) && retries--)
udelay(10);
+
+ if (!retries)
+ printk(KERN_ERR "%s: drive still BUSY!\n", drive->name);
+
return stat;
}