diff options
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r-- | drivers/ide/ide-cd.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 1a7410f88249..c35b64d495f5 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -239,7 +239,7 @@ static void cdrom_queue_request_sense(ide_drive_t *drive, void *sense, | |||
239 | 239 | ||
240 | static void cdrom_end_request(ide_drive_t *drive, int uptodate) | 240 | static void cdrom_end_request(ide_drive_t *drive, int uptodate) |
241 | { | 241 | { |
242 | struct request *rq = HWGROUP(drive)->rq; | 242 | struct request *rq = drive->hwif->rq; |
243 | int nsectors = rq->hard_cur_sectors; | 243 | int nsectors = rq->hard_cur_sectors; |
244 | 244 | ||
245 | ide_debug_log(IDE_DBG_FUNC, "Call %s, cmd: 0x%x, uptodate: 0x%x, " | 245 | ide_debug_log(IDE_DBG_FUNC, "Call %s, cmd: 0x%x, uptodate: 0x%x, " |
@@ -306,8 +306,7 @@ static void ide_dump_status_no_sense(ide_drive_t *drive, const char *msg, u8 st) | |||
306 | static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) | 306 | static int cdrom_decode_status(ide_drive_t *drive, int good_stat, int *stat_ret) |
307 | { | 307 | { |
308 | ide_hwif_t *hwif = drive->hwif; | 308 | ide_hwif_t *hwif = drive->hwif; |
309 | ide_hwgroup_t *hwgroup = hwif->hwgroup; | 309 | struct request *rq = hwif->rq; |
310 | struct request *rq = hwgroup->rq; | ||
311 | int stat, err, sense_key; | 310 | int stat, err, sense_key; |
312 | 311 | ||
313 | /* check for errors */ | 312 | /* check for errors */ |
@@ -502,7 +501,7 @@ end_request: | |||
502 | blkdev_dequeue_request(rq); | 501 | blkdev_dequeue_request(rq); |
503 | spin_unlock_irqrestore(q->queue_lock, flags); | 502 | spin_unlock_irqrestore(q->queue_lock, flags); |
504 | 503 | ||
505 | hwgroup->rq = NULL; | 504 | hwif->rq = NULL; |
506 | 505 | ||
507 | cdrom_queue_request_sense(drive, rq->sense, rq); | 506 | cdrom_queue_request_sense(drive, rq->sense, rq); |
508 | } else | 507 | } else |
@@ -525,7 +524,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *); | |||
525 | static ide_startstop_t cdrom_start_packet_command(ide_drive_t *drive) | 524 | static ide_startstop_t cdrom_start_packet_command(ide_drive_t *drive) |
526 | { | 525 | { |
527 | ide_hwif_t *hwif = drive->hwif; | 526 | ide_hwif_t *hwif = drive->hwif; |
528 | struct request *rq = hwif->hwgroup->rq; | 527 | struct request *rq = hwif->rq; |
529 | int xferlen; | 528 | int xferlen; |
530 | 529 | ||
531 | xferlen = ide_cd_get_xferlen(rq); | 530 | xferlen = ide_cd_get_xferlen(rq); |
@@ -567,7 +566,7 @@ static ide_startstop_t cdrom_start_packet_command(ide_drive_t *drive) | |||
567 | static ide_startstop_t cdrom_transfer_packet_command(ide_drive_t *drive) | 566 | static ide_startstop_t cdrom_transfer_packet_command(ide_drive_t *drive) |
568 | { | 567 | { |
569 | ide_hwif_t *hwif = drive->hwif; | 568 | ide_hwif_t *hwif = drive->hwif; |
570 | struct request *rq = hwif->hwgroup->rq; | 569 | struct request *rq = hwif->rq; |
571 | int cmd_len; | 570 | int cmd_len; |
572 | ide_startstop_t startstop; | 571 | ide_startstop_t startstop; |
573 | 572 | ||
@@ -854,8 +853,7 @@ static int cdrom_newpc_intr_dummy_cb(struct request *rq) | |||
854 | static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) | 853 | static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) |
855 | { | 854 | { |
856 | ide_hwif_t *hwif = drive->hwif; | 855 | ide_hwif_t *hwif = drive->hwif; |
857 | ide_hwgroup_t *hwgroup = hwif->hwgroup; | 856 | struct request *rq = hwif->rq; |
858 | struct request *rq = hwgroup->rq; | ||
859 | xfer_func_t *xferfunc; | 857 | xfer_func_t *xferfunc; |
860 | ide_expiry_t *expiry = NULL; | 858 | ide_expiry_t *expiry = NULL; |
861 | int dma_error = 0, dma, stat, thislen, uptodate = 0; | 859 | int dma_error = 0, dma, stat, thislen, uptodate = 0; |
@@ -1061,7 +1059,7 @@ end_request: | |||
1061 | if (blk_end_request(rq, 0, dlen)) | 1059 | if (blk_end_request(rq, 0, dlen)) |
1062 | BUG(); | 1060 | BUG(); |
1063 | 1061 | ||
1064 | hwgroup->rq = NULL; | 1062 | hwif->rq = NULL; |
1065 | } else { | 1063 | } else { |
1066 | if (!uptodate) | 1064 | if (!uptodate) |
1067 | rq->cmd_flags |= REQ_FAILED; | 1065 | rq->cmd_flags |= REQ_FAILED; |