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.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 8650ad43b324..ea7cd4e0b157 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -741,7 +741,7 @@ static ide_startstop_t cdrom_seek_intr(ide_drive_t *drive)
741 741
742 if (retry && time_after(jiffies, info->start_seek + IDECD_SEEK_TIMER)) { 742 if (retry && time_after(jiffies, info->start_seek + IDECD_SEEK_TIMER)) {
743 if (--retry == 0) 743 if (--retry == 0)
744 drive->dsc_overlap = 0; 744 drive->dev_flags &= ~IDE_DFLAG_DSC_OVERLAP;
745 } 745 }
746 return ide_stopped; 746 return ide_stopped;
747} 747}
@@ -1129,7 +1129,7 @@ static ide_startstop_t cdrom_start_rw(ide_drive_t *drive, struct request *rq)
1129 } 1129 }
1130 cd->dma = 0; 1130 cd->dma = 0;
1131 } else 1131 } else
1132 cd->dma = drive->using_dma; 1132 cd->dma = !!(drive->dev_flags & IDE_DFLAG_USING_DMA);
1133 1133
1134 if (write) 1134 if (write)
1135 cd->devinfo.media_written = 1; 1135 cd->devinfo.media_written = 1;
@@ -1166,7 +1166,7 @@ static void cdrom_do_block_pc(ide_drive_t *drive, struct request *rq)
1166 else 1166 else
1167 buf = rq->data; 1167 buf = rq->data;
1168 1168
1169 info->dma = drive->using_dma; 1169 info->dma = !!(drive->dev_flags & IDE_DFLAG_USING_DMA);
1170 1170
1171 /* 1171 /*
1172 * check if dma is safe 1172 * check if dma is safe
@@ -1211,7 +1211,7 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq,
1211 if (rq_data_dir(rq) == READ && 1211 if (rq_data_dir(rq) == READ &&
1212 IDE_LARGE_SEEK(info->last_block, block, 1212 IDE_LARGE_SEEK(info->last_block, block,
1213 IDECD_SEEK_THRESHOLD) && 1213 IDECD_SEEK_THRESHOLD) &&
1214 drive->dsc_overlap) { 1214 (drive->dev_flags & IDE_DFLAG_DSC_OVERLAP)) {
1215 xferlen = 0; 1215 xferlen = 0;
1216 fn = cdrom_start_seek_continuation; 1216 fn = cdrom_start_seek_continuation;
1217 1217
@@ -1804,7 +1804,7 @@ static ide_proc_entry_t idecd_proc[] = {
1804 { NULL, 0, NULL, NULL } 1804 { NULL, 0, NULL, NULL }
1805}; 1805};
1806 1806
1807ide_devset_rw_field(dsc_overlap, dsc_overlap); 1807ide_devset_rw_flag(dsc_overlap, IDE_DFLAG_DSC_OVERLAP);
1808 1808
1809static const struct ide_proc_devset idecd_settings[] = { 1809static const struct ide_proc_devset idecd_settings[] = {
1810 IDE_PROC_DEVSET(dsc_overlap, 0, 1), 1810 IDE_PROC_DEVSET(dsc_overlap, 0, 1),
@@ -1910,7 +1910,10 @@ static int ide_cdrom_setup(ide_drive_t *drive)
1910 /* set correct block size */ 1910 /* set correct block size */
1911 blk_queue_hardsect_size(drive->queue, CD_FRAMESIZE); 1911 blk_queue_hardsect_size(drive->queue, CD_FRAMESIZE);
1912 1912
1913 drive->dsc_overlap = (drive->next != drive); 1913 if (drive->next != drive)
1914 drive->dev_flags |= IDE_DFLAG_DSC_OVERLAP;
1915 else
1916 drive->dev_flags &= ~IDE_DFLAG_DSC_OVERLAP;
1914 1917
1915 if (ide_cdrom_register(drive, nslots)) { 1918 if (ide_cdrom_register(drive, nslots)) {
1916 printk(KERN_ERR "%s: %s failed to register device with the" 1919 printk(KERN_ERR "%s: %s failed to register device with the"
@@ -1944,7 +1947,7 @@ static void ide_cd_release(struct kref *kref)
1944 kfree(info->toc); 1947 kfree(info->toc);
1945 if (devinfo->handle == drive) 1948 if (devinfo->handle == drive)
1946 unregister_cdrom(devinfo); 1949 unregister_cdrom(devinfo);
1947 drive->dsc_overlap = 0; 1950 drive->dev_flags &= ~IDE_DFLAG_DSC_OVERLAP;
1948 drive->driver_data = NULL; 1951 drive->driver_data = NULL;
1949 blk_queue_prep_rq(drive->queue, NULL); 1952 blk_queue_prep_rq(drive->queue, NULL);
1950 g->private_data = NULL; 1953 g->private_data = NULL;