Skip to content

Commit

Permalink
[PATCH] ide-cd: fix breakage with internally queued commands
Browse files Browse the repository at this point in the history
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: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Jens Axboe authored and Jens Axboe committed Oct 12, 2006
1 parent c584164 commit cea2885
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ static void cdrom_prepare_request(ide_drive_t *drive, struct request *rq)
struct cdrom_info *cd = drive->driver_data;

ide_init_drive_cmd(rq);
rq->cmd_type = REQ_TYPE_BLOCK_PC;
rq->cmd_type = REQ_TYPE_ATA_PC;
rq->rq_disk = cd->disk;
}

Expand Down Expand Up @@ -2023,7 +2023,8 @@ ide_do_rw_cdrom (ide_drive_t *drive, struct request *rq, sector_t block)
}
info->last_block = block;
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);
} else if (blk_pc_request(rq)) {
return cdrom_do_block_pc(drive, rq);
Expand Down
1 change: 1 addition & 0 deletions include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ enum rq_cmd_type_bits {
REQ_TYPE_ATA_CMD,
REQ_TYPE_ATA_TASK,
REQ_TYPE_ATA_TASKFILE,
REQ_TYPE_ATA_PC,
};

/*
Expand Down

0 comments on commit cea2885

Please sign in to comment.