提交 06cc2778 编写于 作者: B Borislav Petkov 提交者: Bartlomiej Zolnierkiewicz

ide-atapi: put the rest of non-ide-cd code into the else-clause of ide_transfer_pc

There should be no functionality change resulting from this patch.
Signed-off-by: NBorislav Petkov <petkovbb@gmail.com>
Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
上级 28ad91db
...@@ -509,17 +509,6 @@ static ide_startstop_t ide_transfer_pc(ide_drive_t *drive) ...@@ -509,17 +509,6 @@ static ide_startstop_t ide_transfer_pc(ide_drive_t *drive)
drive->waiting_for_dma = 1; drive->waiting_for_dma = 1;
} }
ireason = ide_read_ireason(drive);
if (drive->media == ide_tape)
ireason = ide_wait_ireason(drive, ireason);
if ((ireason & ATAPI_COD) == 0 || (ireason & ATAPI_IO)) {
printk(KERN_ERR "%s: (IO,CoD) != (0,1) while issuing "
"a packet command\n", drive->name);
return ide_do_reset(drive);
}
if (dev_is_idecd(drive)) { if (dev_is_idecd(drive)) {
/* ATAPI commands get padded out to 12 bytes minimum */ /* ATAPI commands get padded out to 12 bytes minimum */
cmd_len = COMMAND_SIZE(rq->cmd[0]); cmd_len = COMMAND_SIZE(rq->cmd[0]);
...@@ -544,6 +533,17 @@ static ide_startstop_t ide_transfer_pc(ide_drive_t *drive) ...@@ -544,6 +533,17 @@ static ide_startstop_t ide_transfer_pc(ide_drive_t *drive)
: WAIT_TAPE_CMD; : WAIT_TAPE_CMD;
expiry = NULL; expiry = NULL;
} }
ireason = ide_read_ireason(drive);
if (drive->media == ide_tape)
ireason = ide_wait_ireason(drive, ireason);
if ((ireason & ATAPI_COD) == 0 || (ireason & ATAPI_IO)) {
printk(KERN_ERR "%s: (IO,CoD) != (0,1) while issuing "
"a packet command\n", drive->name);
return ide_do_reset(drive);
}
} }
/* Set the interrupt routine */ /* Set the interrupt routine */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册