diff options
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r-- | drivers/ide/ide-cd.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 42ab6d8715f2..31f398577ed4 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -317,7 +317,8 @@ static void ide_dump_status_no_sense(ide_drive_t *drive, const char *msg, u8 st) | |||
317 | static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) | 317 | static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) |
318 | { | 318 | { |
319 | ide_hwif_t *hwif = drive->hwif; | 319 | ide_hwif_t *hwif = drive->hwif; |
320 | struct request *rq = hwif->hwgroup->rq; | 320 | ide_hwgroup_t *hwgroup = hwif->hwgroup; |
321 | struct request *rq = hwgroup->rq; | ||
321 | int stat, err, sense_key; | 322 | int stat, err, sense_key; |
322 | 323 | ||
323 | /* check for errors */ | 324 | /* check for errors */ |
@@ -508,9 +509,10 @@ end_request: | |||
508 | 509 | ||
509 | spin_lock_irqsave(&ide_lock, flags); | 510 | spin_lock_irqsave(&ide_lock, flags); |
510 | blkdev_dequeue_request(rq); | 511 | blkdev_dequeue_request(rq); |
511 | HWGROUP(drive)->rq = NULL; | ||
512 | spin_unlock_irqrestore(&ide_lock, flags); | 512 | spin_unlock_irqrestore(&ide_lock, flags); |
513 | 513 | ||
514 | hwgroup->rq = NULL; | ||
515 | |||
514 | cdrom_queue_request_sense(drive, rq->sense, rq); | 516 | cdrom_queue_request_sense(drive, rq->sense, rq); |
515 | } else | 517 | } else |
516 | cdrom_end_request(drive, 0); | 518 | cdrom_end_request(drive, 0); |
@@ -950,7 +952,8 @@ static int cdrom_newpc_intr_dummy_cb(struct request *rq) | |||
950 | static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) | 952 | static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) |
951 | { | 953 | { |
952 | ide_hwif_t *hwif = drive->hwif; | 954 | ide_hwif_t *hwif = drive->hwif; |
953 | struct request *rq = HWGROUP(drive)->rq; | 955 | ide_hwgroup_t *hwgroup = hwif->hwgroup; |
956 | struct request *rq = hwgroup->rq; | ||
954 | xfer_func_t *xferfunc; | 957 | xfer_func_t *xferfunc; |
955 | ide_expiry_t *expiry = NULL; | 958 | ide_expiry_t *expiry = NULL; |
956 | int dma_error = 0, dma, stat, thislen, uptodate = 0; | 959 | int dma_error = 0, dma, stat, thislen, uptodate = 0; |
@@ -1157,8 +1160,9 @@ end_request: | |||
1157 | spin_lock_irqsave(&ide_lock, flags); | 1160 | spin_lock_irqsave(&ide_lock, flags); |
1158 | if (__blk_end_request(rq, 0, dlen)) | 1161 | if (__blk_end_request(rq, 0, dlen)) |
1159 | BUG(); | 1162 | BUG(); |
1160 | HWGROUP(drive)->rq = NULL; | ||
1161 | spin_unlock_irqrestore(&ide_lock, flags); | 1163 | spin_unlock_irqrestore(&ide_lock, flags); |
1164 | |||
1165 | hwgroup->rq = NULL; | ||
1162 | } else { | 1166 | } else { |
1163 | if (!uptodate) | 1167 | if (!uptodate) |
1164 | rq->cmd_flags |= REQ_FAILED; | 1168 | rq->cmd_flags |= REQ_FAILED; |