aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-taskfile.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:11 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:11 -0500
commit2624565caacedd740fce7803fe2c162842aa5df4 (patch)
treefe177bad8d72bfefa138a3abd7f8c7b92f549169 /drivers/ide/ide-taskfile.c
parent4906f3b4cddc3e4d62955ed386598561f95602c0 (diff)
ide: use wait_drive_not_busy() in drive_cmd_intr() (take 2)
Use wait_drive_not_busy() in drive_cmd_intr(). v2: * Fix wait_drive_not_busy() comment (noticed by Sergei). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
-rw-r--r--drivers/ide/ide-taskfile.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index c34836c02b14..b559bece6e73 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -260,7 +260,7 @@ static ide_startstop_t task_no_data_intr(ide_drive_t *drive)
260 return ide_stopped; 260 return ide_stopped;
261} 261}
262 262
263static u8 wait_drive_not_busy(ide_drive_t *drive) 263u8 wait_drive_not_busy(ide_drive_t *drive)
264{ 264{
265 ide_hwif_t *hwif = HWIF(drive); 265 ide_hwif_t *hwif = HWIF(drive);
266 int retries; 266 int retries;
@@ -268,8 +268,7 @@ static u8 wait_drive_not_busy(ide_drive_t *drive)
268 268
269 /* 269 /*
270 * Last sector was transfered, wait until drive is ready. 270 * Last sector was transfered, wait until drive is ready.
271 * This can take up to 10 usec, but we will wait max 1 ms 271 * This can take up to 10 usec, but we will wait max 1 ms.
272 * (drive_cmd_intr() waits that long).
273 */ 272 */
274 for (retries = 0; retries < 100; retries++) { 273 for (retries = 0; retries < 100; retries++) {
275 if ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) 274 if ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT)