diff options
Diffstat (limited to 'drivers/ide/ide-atapi.c')
-rw-r--r-- | drivers/ide/ide-atapi.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index f44474b0adae..f72b5a675435 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
@@ -357,6 +357,8 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive) | |||
357 | 357 | ||
358 | /* No more interrupts */ | 358 | /* No more interrupts */ |
359 | if ((stat & ATA_DRQ) == 0) { | 359 | if ((stat & ATA_DRQ) == 0) { |
360 | int uptodate; | ||
361 | |||
360 | debug_log("Packet command completed, %d bytes transferred\n", | 362 | debug_log("Packet command completed, %d bytes transferred\n", |
361 | pc->xferred); | 363 | pc->xferred); |
362 | 364 | ||
@@ -395,7 +397,15 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive) | |||
395 | dsc = 1; | 397 | dsc = 1; |
396 | 398 | ||
397 | /* Command finished - Call the callback function */ | 399 | /* Command finished - Call the callback function */ |
398 | drive->pc_callback(drive, dsc); | 400 | uptodate = drive->pc_callback(drive, dsc); |
401 | |||
402 | if (uptodate == 0) | ||
403 | drive->failed_pc = NULL; | ||
404 | |||
405 | if (blk_special_request(rq)) | ||
406 | ide_complete_rq(drive, 0); | ||
407 | else | ||
408 | ide_end_request(drive, uptodate, 0); | ||
399 | 409 | ||
400 | return ide_stopped; | 410 | return ide_stopped; |
401 | } | 411 | } |