aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 69bbb6206a00..88214943d00a 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -597,7 +597,7 @@ static void cdrom_prepare_request(ide_drive_t *drive, struct request *rq)
597 struct cdrom_info *cd = drive->driver_data; 597 struct cdrom_info *cd = drive->driver_data;
598 598
599 ide_init_drive_cmd(rq); 599 ide_init_drive_cmd(rq);
600 rq->cmd_type = REQ_TYPE_BLOCK_PC; 600 rq->cmd_type = REQ_TYPE_ATA_PC;
601 rq->rq_disk = cd->disk; 601 rq->rq_disk = cd->disk;
602} 602}
603 603
@@ -716,7 +716,7 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret)
716 ide_error(drive, "request sense failure", stat); 716 ide_error(drive, "request sense failure", stat);
717 return 1; 717 return 1;
718 718
719 } else if (blk_pc_request(rq)) { 719 } else if (blk_pc_request(rq) || rq->cmd_type == REQ_TYPE_ATA_PC) {
720 /* All other functions, except for READ. */ 720 /* All other functions, except for READ. */
721 unsigned long flags; 721 unsigned long flags;
722 722
@@ -724,7 +724,7 @@ static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret)
724 * if we have an error, pass back CHECK_CONDITION as the 724 * if we have an error, pass back CHECK_CONDITION as the
725 * scsi status byte 725 * scsi status byte
726 */ 726 */
727 if (!rq->errors) 727 if (blk_pc_request(rq) && !rq->errors)
728 rq->errors = SAM_STAT_CHECK_CONDITION; 728 rq->errors = SAM_STAT_CHECK_CONDITION;
729 729
730 /* Check for tray open. */ 730 /* Check for tray open. */
@@ -2023,7 +2023,8 @@ ide_do_rw_cdrom (ide_drive_t *drive, struct request *rq, sector_t block)
2023 } 2023 }
2024 info->last_block = block; 2024 info->last_block = block;
2025 return action; 2025 return action;
2026 } else if (rq->cmd_type == REQ_TYPE_SENSE) { 2026 } else if (rq->cmd_type == REQ_TYPE_SENSE ||
2027 rq->cmd_type == REQ_TYPE_ATA_PC) {
2027 return cdrom_do_packet_command(drive); 2028 return cdrom_do_packet_command(drive);
2028 } else if (blk_pc_request(rq)) { 2029 } else if (blk_pc_request(rq)) {
2029 return cdrom_do_block_pc(drive, rq); 2030 return cdrom_do_block_pc(drive, rq);