Commit 320112bd authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

ide: check rq->cmd_type in drive_cmd_intr()

drive_cmd_intr() is used by both REQ_TYPE_ATA_CMD and REQ_TYPE_ATA_TASK
but commands using PIO-in protocol are valid only for REQ_TYPE_ATA_CMD
(&args[4] in case of REQ_TYPE_ATA_TASK points to a value for IDE_LCYL_REG
register instead of the data buffer).  This fix allows REQ_TYPE_ATA_TASK
commands to use non-zero values for IDE_SECTOR_REG (args[3]).
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <>
parent f7d7f3fd
......@@ -654,7 +654,8 @@ static ide_startstop_t drive_cmd_intr (ide_drive_t *drive)
int retries = 10;
if ((stat & DRQ_STAT) && args && args[3]) {
if (rq->cmd_type == REQ_TYPE_ATA_CMD &&
(stat & DRQ_STAT) && args && args[3]) {
u8 io_32bit = drive->io_32bit;
drive->io_32bit = 0;
hwif->ata_input_data(drive, &args[4], args[3] * SECTOR_WORDS);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment