diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-03 16:58:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-03 16:58:49 -0400 |
commit | 9d7542f891f22d16ea1465d19d253888e87f7ad6 (patch) | |
tree | 5038aa63019138b2e09fa31a53b562bfb77e428c /drivers/ide/ide-taskfile.c | |
parent | f744a0547ac5055a3e9eb20bfe7ff29077a32c16 (diff) | |
parent | d61bcce9c1aa2c9f8a768d73c4c517f81d226725 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6:
ide: ide_scan_pcibus(): check __pci_register_driver return value
ide: pdc202xx_new PLL input clock fix
it821x: fix incorrect SWDMA mask
amd74xx: resume fix
hpt366: use correct enablebits for HPT36x
hpt366: blacklist MAXTOR STM3320620A for UltraDMA/66
ide: Fix a theoretical Ooops case
ide: never called printk statement in ide-taskfile.c::wait_drive_not_busy
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
-rw-r--r-- | drivers/ide/ide-taskfile.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 30175c7688e8..aa06dafb74ac 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -238,7 +238,7 @@ EXPORT_SYMBOL(task_no_data_intr); | |||
238 | static u8 wait_drive_not_busy(ide_drive_t *drive) | 238 | static u8 wait_drive_not_busy(ide_drive_t *drive) |
239 | { | 239 | { |
240 | ide_hwif_t *hwif = HWIF(drive); | 240 | ide_hwif_t *hwif = HWIF(drive); |
241 | int retries = 100; | 241 | int retries; |
242 | u8 stat; | 242 | u8 stat; |
243 | 243 | ||
244 | /* | 244 | /* |
@@ -246,10 +246,14 @@ static u8 wait_drive_not_busy(ide_drive_t *drive) | |||
246 | * This can take up to 10 usec, but we will wait max 1 ms | 246 | * This can take up to 10 usec, but we will wait max 1 ms |
247 | * (drive_cmd_intr() waits that long). | 247 | * (drive_cmd_intr() waits that long). |
248 | */ | 248 | */ |
249 | while (((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) && retries--) | 249 | for (retries = 0; retries < 100; retries++) { |
250 | udelay(10); | 250 | if ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) |
251 | udelay(10); | ||
252 | else | ||
253 | break; | ||
254 | } | ||
251 | 255 | ||
252 | if (!retries) | 256 | if (stat & BUSY_STAT) |
253 | printk(KERN_ERR "%s: drive still BUSY!\n", drive->name); | 257 | printk(KERN_ERR "%s: drive still BUSY!\n", drive->name); |
254 | 258 | ||
255 | return stat; | 259 | return stat; |