aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cdrom
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cdrom')
-rw-r--r--drivers/cdrom/cdrom.c20
-rw-r--r--drivers/cdrom/gdrom.c10
2 files changed, 14 insertions, 16 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 614da5b8613a..e3749d0ba68b 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -3557,67 +3557,65 @@ static ctl_table cdrom_table[] = {
3557 .data = &cdrom_sysctl_settings.info, 3557 .data = &cdrom_sysctl_settings.info,
3558 .maxlen = CDROM_STR_SIZE, 3558 .maxlen = CDROM_STR_SIZE,
3559 .mode = 0444, 3559 .mode = 0444,
3560 .proc_handler = &cdrom_sysctl_info, 3560 .proc_handler = cdrom_sysctl_info,
3561 }, 3561 },
3562 { 3562 {
3563 .procname = "autoclose", 3563 .procname = "autoclose",
3564 .data = &cdrom_sysctl_settings.autoclose, 3564 .data = &cdrom_sysctl_settings.autoclose,
3565 .maxlen = sizeof(int), 3565 .maxlen = sizeof(int),
3566 .mode = 0644, 3566 .mode = 0644,
3567 .proc_handler = &cdrom_sysctl_handler, 3567 .proc_handler = cdrom_sysctl_handler,
3568 }, 3568 },
3569 { 3569 {
3570 .procname = "autoeject", 3570 .procname = "autoeject",
3571 .data = &cdrom_sysctl_settings.autoeject, 3571 .data = &cdrom_sysctl_settings.autoeject,
3572 .maxlen = sizeof(int), 3572 .maxlen = sizeof(int),
3573 .mode = 0644, 3573 .mode = 0644,
3574 .proc_handler = &cdrom_sysctl_handler, 3574 .proc_handler = cdrom_sysctl_handler,
3575 }, 3575 },
3576 { 3576 {
3577 .procname = "debug", 3577 .procname = "debug",
3578 .data = &cdrom_sysctl_settings.debug, 3578 .data = &cdrom_sysctl_settings.debug,
3579 .maxlen = sizeof(int), 3579 .maxlen = sizeof(int),
3580 .mode = 0644, 3580 .mode = 0644,
3581 .proc_handler = &cdrom_sysctl_handler, 3581 .proc_handler = cdrom_sysctl_handler,
3582 }, 3582 },
3583 { 3583 {
3584 .procname = "lock", 3584 .procname = "lock",
3585 .data = &cdrom_sysctl_settings.lock, 3585 .data = &cdrom_sysctl_settings.lock,
3586 .maxlen = sizeof(int), 3586 .maxlen = sizeof(int),
3587 .mode = 0644, 3587 .mode = 0644,
3588 .proc_handler = &cdrom_sysctl_handler, 3588 .proc_handler = cdrom_sysctl_handler,
3589 }, 3589 },
3590 { 3590 {
3591 .procname = "check_media", 3591 .procname = "check_media",
3592 .data = &cdrom_sysctl_settings.check, 3592 .data = &cdrom_sysctl_settings.check,
3593 .maxlen = sizeof(int), 3593 .maxlen = sizeof(int),
3594 .mode = 0644, 3594 .mode = 0644,
3595 .proc_handler = &cdrom_sysctl_handler 3595 .proc_handler = cdrom_sysctl_handler
3596 }, 3596 },
3597 { .ctl_name = 0 } 3597 { }
3598}; 3598};
3599 3599
3600static ctl_table cdrom_cdrom_table[] = { 3600static ctl_table cdrom_cdrom_table[] = {
3601 { 3601 {
3602 .ctl_name = DEV_CDROM,
3603 .procname = "cdrom", 3602 .procname = "cdrom",
3604 .maxlen = 0, 3603 .maxlen = 0,
3605 .mode = 0555, 3604 .mode = 0555,
3606 .child = cdrom_table, 3605 .child = cdrom_table,
3607 }, 3606 },
3608 { .ctl_name = 0 } 3607 { }
3609}; 3608};
3610 3609
3611/* Make sure that /proc/sys/dev is there */ 3610/* Make sure that /proc/sys/dev is there */
3612static ctl_table cdrom_root_table[] = { 3611static ctl_table cdrom_root_table[] = {
3613 { 3612 {
3614 .ctl_name = CTL_DEV,
3615 .procname = "dev", 3613 .procname = "dev",
3616 .maxlen = 0, 3614 .maxlen = 0,
3617 .mode = 0555, 3615 .mode = 0555,
3618 .child = cdrom_cdrom_table, 3616 .child = cdrom_cdrom_table,
3619 }, 3617 },
3620 { .ctl_name = 0 } 3618 { }
3621}; 3619};
3622static struct ctl_table_header *cdrom_sysctl_header; 3620static struct ctl_table_header *cdrom_sysctl_header;
3623 3621
diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c
index a762283d2a21..e789e6c9a422 100644
--- a/drivers/cdrom/gdrom.c
+++ b/drivers/cdrom/gdrom.c
@@ -214,7 +214,7 @@ static void gdrom_spicommand(void *spi_string, int buflen)
214 gdrom_getsense(NULL); 214 gdrom_getsense(NULL);
215 return; 215 return;
216 } 216 }
217 outsw(PHYSADDR(GDROM_DATA_REG), cmd, 6); 217 outsw(GDROM_DATA_REG, cmd, 6);
218} 218}
219 219
220 220
@@ -298,7 +298,7 @@ static int gdrom_readtoc_cmd(struct gdromtoc *toc, int session)
298 err = -EINVAL; 298 err = -EINVAL;
299 goto cleanup_readtoc; 299 goto cleanup_readtoc;
300 } 300 }
301 insw(PHYSADDR(GDROM_DATA_REG), toc, tocsize/2); 301 insw(GDROM_DATA_REG, toc, tocsize/2);
302 if (gd.status & 0x01) 302 if (gd.status & 0x01)
303 err = -EINVAL; 303 err = -EINVAL;
304 304
@@ -449,7 +449,7 @@ static int gdrom_getsense(short *bufstring)
449 GDROM_DEFAULT_TIMEOUT); 449 GDROM_DEFAULT_TIMEOUT);
450 if (gd.pending) 450 if (gd.pending)
451 goto cleanup_sense; 451 goto cleanup_sense;
452 insw(PHYSADDR(GDROM_DATA_REG), &sense, sense_command->buflen/2); 452 insw(GDROM_DATA_REG, &sense, sense_command->buflen/2);
453 if (sense[1] & 40) { 453 if (sense[1] & 40) {
454 printk(KERN_INFO "GDROM: Drive not ready - command aborted\n"); 454 printk(KERN_INFO "GDROM: Drive not ready - command aborted\n");
455 goto cleanup_sense; 455 goto cleanup_sense;
@@ -586,7 +586,7 @@ static void gdrom_readdisk_dma(struct work_struct *work)
586 spin_unlock(&gdrom_lock); 586 spin_unlock(&gdrom_lock);
587 block = blk_rq_pos(req)/GD_TO_BLK + GD_SESSION_OFFSET; 587 block = blk_rq_pos(req)/GD_TO_BLK + GD_SESSION_OFFSET;
588 block_cnt = blk_rq_sectors(req)/GD_TO_BLK; 588 block_cnt = blk_rq_sectors(req)/GD_TO_BLK;
589 ctrl_outl(PHYSADDR(req->buffer), GDROM_DMA_STARTADDR_REG); 589 ctrl_outl(virt_to_phys(req->buffer), GDROM_DMA_STARTADDR_REG);
590 ctrl_outl(block_cnt * GDROM_HARD_SECTOR, GDROM_DMA_LENGTH_REG); 590 ctrl_outl(block_cnt * GDROM_HARD_SECTOR, GDROM_DMA_LENGTH_REG);
591 ctrl_outl(1, GDROM_DMA_DIRECTION_REG); 591 ctrl_outl(1, GDROM_DMA_DIRECTION_REG);
592 ctrl_outl(1, GDROM_DMA_ENABLE_REG); 592 ctrl_outl(1, GDROM_DMA_ENABLE_REG);
@@ -615,7 +615,7 @@ static void gdrom_readdisk_dma(struct work_struct *work)
615 cpu_relax(); 615 cpu_relax();
616 gd.pending = 1; 616 gd.pending = 1;
617 gd.transfer = 1; 617 gd.transfer = 1;
618 outsw(PHYSADDR(GDROM_DATA_REG), &read_command->cmd, 6); 618 outsw(GDROM_DATA_REG, &read_command->cmd, 6);
619 timeout = jiffies + HZ / 2; 619 timeout = jiffies + HZ / 2;
620 /* Wait for any pending DMA to finish */ 620 /* Wait for any pending DMA to finish */
621 while (ctrl_inb(GDROM_DMA_STATUS_REG) && 621 while (ctrl_inb(GDROM_DMA_STATUS_REG) &&