Commit cea2885a authored by Jens Axboe's avatar Jens Axboe Committed by Jens Axboe

[PATCH] ide-cd: fix breakage with internally queued commands

We still need to maintain a private PC style command, since it
isn't completely unified with REQ_TYPE_BLOCK_PC yet.
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent c5841642
...@@ -597,7 +597,7 @@ static void cdrom_prepare_request(ide_drive_t *drive, struct request *rq) ...@@ -597,7 +597,7 @@ static void cdrom_prepare_request(ide_drive_t *drive, struct request *rq)
struct cdrom_info *cd = drive->driver_data; struct cdrom_info *cd = drive->driver_data;
ide_init_drive_cmd(rq); ide_init_drive_cmd(rq);
rq->cmd_type = REQ_TYPE_BLOCK_PC; rq->cmd_type = REQ_TYPE_ATA_PC;
rq->rq_disk = cd->disk; rq->rq_disk = cd->disk;
} }
...@@ -2023,7 +2023,8 @@ ide_do_rw_cdrom (ide_drive_t *drive, struct request *rq, sector_t block) ...@@ -2023,7 +2023,8 @@ ide_do_rw_cdrom (ide_drive_t *drive, struct request *rq, sector_t block)
} }
info->last_block = block; info->last_block = block;
return action; return action;
} else if (rq->cmd_type == REQ_TYPE_SENSE) { } else if (rq->cmd_type == REQ_TYPE_SENSE ||
rq->cmd_type == REQ_TYPE_ATA_PC) {
return cdrom_do_packet_command(drive); return cdrom_do_packet_command(drive);
} else if (blk_pc_request(rq)) { } else if (blk_pc_request(rq)) {
return cdrom_do_block_pc(drive, rq); return cdrom_do_block_pc(drive, rq);
......
...@@ -157,6 +157,7 @@ enum rq_cmd_type_bits { ...@@ -157,6 +157,7 @@ enum rq_cmd_type_bits {
REQ_TYPE_ATA_CMD, REQ_TYPE_ATA_CMD,
REQ_TYPE_ATA_TASK, REQ_TYPE_ATA_TASK,
REQ_TYPE_ATA_TASKFILE, REQ_TYPE_ATA_TASKFILE,
REQ_TYPE_ATA_PC,
}; };
/* /*
......
Markdown is supported
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