diff options
| -rw-r--r-- | drivers/ide/ide-atapi.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index c470dbb155ca..c9beda5fca18 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
| @@ -509,17 +509,6 @@ static ide_startstop_t ide_transfer_pc(ide_drive_t *drive) | |||
| 509 | drive->waiting_for_dma = 1; | 509 | drive->waiting_for_dma = 1; |
| 510 | } | 510 | } |
| 511 | 511 | ||
| 512 | ireason = ide_read_ireason(drive); | ||
| 513 | if (drive->media == ide_tape) | ||
| 514 | ireason = ide_wait_ireason(drive, ireason); | ||
| 515 | |||
| 516 | if ((ireason & ATAPI_COD) == 0 || (ireason & ATAPI_IO)) { | ||
| 517 | printk(KERN_ERR "%s: (IO,CoD) != (0,1) while issuing " | ||
| 518 | "a packet command\n", drive->name); | ||
| 519 | |||
| 520 | return ide_do_reset(drive); | ||
| 521 | } | ||
| 522 | |||
| 523 | if (dev_is_idecd(drive)) { | 512 | if (dev_is_idecd(drive)) { |
| 524 | /* ATAPI commands get padded out to 12 bytes minimum */ | 513 | /* ATAPI commands get padded out to 12 bytes minimum */ |
| 525 | cmd_len = COMMAND_SIZE(rq->cmd[0]); | 514 | cmd_len = COMMAND_SIZE(rq->cmd[0]); |
| @@ -544,6 +533,17 @@ static ide_startstop_t ide_transfer_pc(ide_drive_t *drive) | |||
| 544 | : WAIT_TAPE_CMD; | 533 | : WAIT_TAPE_CMD; |
| 545 | expiry = NULL; | 534 | expiry = NULL; |
| 546 | } | 535 | } |
| 536 | |||
| 537 | ireason = ide_read_ireason(drive); | ||
| 538 | if (drive->media == ide_tape) | ||
| 539 | ireason = ide_wait_ireason(drive, ireason); | ||
| 540 | |||
| 541 | if ((ireason & ATAPI_COD) == 0 || (ireason & ATAPI_IO)) { | ||
| 542 | printk(KERN_ERR "%s: (IO,CoD) != (0,1) while issuing " | ||
| 543 | "a packet command\n", drive->name); | ||
| 544 | |||
| 545 | return ide_do_reset(drive); | ||
| 546 | } | ||
| 547 | } | 547 | } |
| 548 | 548 | ||
| 549 | /* Set the interrupt routine */ | 549 | /* Set the interrupt routine */ |
