diff options
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r-- | drivers/ide/ide-cd.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index c0cefe5becf3..cf0707fe87e8 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -509,17 +509,6 @@ static int ide_cd_check_ireason(ide_drive_t *drive, struct request *rq, | |||
509 | return -1; | 509 | return -1; |
510 | } | 510 | } |
511 | 511 | ||
512 | static ide_startstop_t ide_cd_prepare_rw_request(ide_drive_t *drive, | ||
513 | struct request *rq) | ||
514 | { | ||
515 | ide_debug_log(IDE_DBG_RQ, "rq->cmd_flags: 0x%x", rq->cmd_flags); | ||
516 | |||
517 | /* set up the command */ | ||
518 | rq->timeout = ATAPI_WAIT_PC; | ||
519 | |||
520 | return ide_started; | ||
521 | } | ||
522 | |||
523 | static void ide_cd_request_sense_fixup(ide_drive_t *drive, struct request *rq) | 512 | static void ide_cd_request_sense_fixup(ide_drive_t *drive, struct request *rq) |
524 | { | 513 | { |
525 | ide_debug_log(IDE_DBG_FUNC, "rq->cmd[0]: 0x%x", rq->cmd[0]); | 514 | ide_debug_log(IDE_DBG_FUNC, "rq->cmd[0]: 0x%x", rq->cmd[0]); |
@@ -871,9 +860,9 @@ static ide_startstop_t cdrom_start_rw(ide_drive_t *drive, struct request *rq) | |||
871 | unsigned short sectors_per_frame = | 860 | unsigned short sectors_per_frame = |
872 | queue_hardsect_size(q) >> SECTOR_BITS; | 861 | queue_hardsect_size(q) >> SECTOR_BITS; |
873 | 862 | ||
874 | ide_debug_log(IDE_DBG_RQ, "rq->cmd[0]: 0x%x, write: 0x%x, " | 863 | ide_debug_log(IDE_DBG_RQ, "rq->cmd[0]: 0x%x, rq->cmd_flags: 0x%x, " |
875 | "secs_per_frame: %u", | 864 | "secs_per_frame: %u", |
876 | rq->cmd[0], write, sectors_per_frame); | 865 | rq->cmd[0], rq->cmd_flags, sectors_per_frame); |
877 | 866 | ||
878 | if (write) { | 867 | if (write) { |
879 | /* disk has become write protected */ | 868 | /* disk has become write protected */ |
@@ -898,6 +887,8 @@ static ide_startstop_t cdrom_start_rw(ide_drive_t *drive, struct request *rq) | |||
898 | if (write) | 887 | if (write) |
899 | cd->devinfo.media_written = 1; | 888 | cd->devinfo.media_written = 1; |
900 | 889 | ||
890 | rq->timeout = ATAPI_WAIT_PC; | ||
891 | |||
901 | return ide_started; | 892 | return ide_started; |
902 | } | 893 | } |
903 | 894 | ||
@@ -954,10 +945,8 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq, | |||
954 | blk_dump_rq_flags(rq, "ide_cd_do_request"); | 945 | blk_dump_rq_flags(rq, "ide_cd_do_request"); |
955 | 946 | ||
956 | if (blk_fs_request(rq)) { | 947 | if (blk_fs_request(rq)) { |
957 | if (cdrom_start_rw(drive, rq) == ide_stopped || | 948 | if (cdrom_start_rw(drive, rq) == ide_stopped) |
958 | ide_cd_prepare_rw_request(drive, rq) == ide_stopped) { | ||
959 | goto out_end; | 949 | goto out_end; |
960 | } | ||
961 | } else if (blk_sense_request(rq) || blk_pc_request(rq) || | 950 | } else if (blk_sense_request(rq) || blk_pc_request(rq) || |
962 | rq->cmd_type == REQ_TYPE_ATA_PC) { | 951 | rq->cmd_type == REQ_TYPE_ATA_PC) { |
963 | if (!rq->timeout) | 952 | if (!rq->timeout) |