mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
ide-atapi: assign expiry and timeout based on device type
There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
8c662852d1
commit
def860d061
1 changed files with 17 additions and 13 deletions
|
@ -525,21 +525,25 @@ static ide_startstop_t ide_transfer_pc(ide_drive_t *drive)
|
||||||
cmd_len = COMMAND_SIZE(rq->cmd[0]);
|
cmd_len = COMMAND_SIZE(rq->cmd[0]);
|
||||||
if (cmd_len < ATAPI_MIN_CDB_BYTES)
|
if (cmd_len < ATAPI_MIN_CDB_BYTES)
|
||||||
cmd_len = ATAPI_MIN_CDB_BYTES;
|
cmd_len = ATAPI_MIN_CDB_BYTES;
|
||||||
} else
|
|
||||||
|
timeout = rq->timeout;
|
||||||
|
expiry = ide_cd_expiry;
|
||||||
|
} else {
|
||||||
cmd_len = ATAPI_MIN_CDB_BYTES;
|
cmd_len = ATAPI_MIN_CDB_BYTES;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If necessary schedule the packet transfer to occur 'timeout'
|
* If necessary schedule the packet transfer to occur 'timeout'
|
||||||
* miliseconds later in ide_delayed_transfer_pc() after the device
|
* miliseconds later in ide_delayed_transfer_pc() after the
|
||||||
* says it's ready for a packet.
|
* device says it's ready for a packet.
|
||||||
*/
|
*/
|
||||||
if (drive->atapi_flags & IDE_AFLAG_ZIP_DRIVE) {
|
if (drive->atapi_flags & IDE_AFLAG_ZIP_DRIVE) {
|
||||||
timeout = drive->pc_delay;
|
timeout = drive->pc_delay;
|
||||||
expiry = &ide_delayed_transfer_pc;
|
expiry = &ide_delayed_transfer_pc;
|
||||||
} else {
|
} else {
|
||||||
timeout = (drive->media == ide_floppy) ? WAIT_FLOPPY_CMD
|
timeout = (drive->media == ide_floppy) ? WAIT_FLOPPY_CMD
|
||||||
: WAIT_TAPE_CMD;
|
: WAIT_TAPE_CMD;
|
||||||
expiry = NULL;
|
expiry = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the interrupt routine */
|
/* Set the interrupt routine */
|
||||||
|
|
Loading…
Reference in a new issue