diff options
Diffstat (limited to 'drivers/block/mcd.c')
-rw-r--r-- | drivers/block/mcd.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/drivers/block/mcd.c b/drivers/block/mcd.c index 42dab9061..f20b4d0ab 100644 --- a/drivers/block/mcd.c +++ b/drivers/block/mcd.c @@ -43,6 +43,7 @@ #include <linux/errno.h> #include <linux/signal.h> #include <linux/sched.h> +#include <linux/mm.h> #include <linux/timer.h> #include <linux/fs.h> #include <linux/kernel.h> @@ -247,9 +248,7 @@ mcd_ioctl(struct inode *ip, struct file *fp, unsigned int cmd, struct cdrom_tocentry entry; struct mcd_Toc *tocPtr; struct cdrom_subchnl subchnl; -#if 0 struct cdrom_volctrl volctrl; -#endif if (!ip) return -EINVAL; @@ -491,42 +490,30 @@ mcd_Play.end.min, mcd_Play.end.sec, mcd_Play.end.frame); return 0; case CDROMVOLCTRL: /* Volume control */ - /* - * This is not working yet. Setting the volume by itself does - * nothing. Following the 'set' by a 'play' results in zero - * volume. Something to work on for the next release. - */ -#if 0 st = verify_area(VERIFY_READ, (void *) arg, sizeof(volctrl)); if (st) return st; memcpy_fromfs(&volctrl, (char *) arg, sizeof(volctrl)); -printk("VOL %d %d\n", volctrl.channel0 & 0xFF, volctrl.channel1 & 0xFF); outb(MCMD_SET_VOLUME, MCDPORT(0)); outb(volctrl.channel0, MCDPORT(0)); - outb(0, MCDPORT(0)); + outb(255, MCDPORT(0)); outb(volctrl.channel1, MCDPORT(0)); - outb(1, MCDPORT(0)); + outb(255, MCDPORT(0)); i = getMcdStatus(MCD_STATUS_DELAY); if (i < 0) return -EIO; { - int a, b, c, d; + char a, b, c, d; getValue(&a); getValue(&b); getValue(&c); getValue(&d); - printk("%02X %02X %02X %02X\n", a, b, c, d); } - outb(0xF8, MCDPORT(0)); - i = getMcdStatus(MCD_STATUS_DELAY); - printk("F8 -> %02X\n", i & 0xFF); -#endif return 0; case CDROMEJECT: @@ -597,7 +584,7 @@ mcd_transfer(void) */ static void -mcd_interrupt(int unused) +mcd_interrupt(int irq, struct pt_regs * regs) { int st; @@ -1168,7 +1155,7 @@ mcd_init(unsigned long mem_start, unsigned long mem_end) printk("Unable to get IRQ%d for Mitsumi CD-ROM\n", mcd_irq); return mem_start; } - snarf_region(mcd_port, 4); + request_region(mcd_port, 4,"mcd"); outb(MCMD_CONFIG_DRIVE, MCDPORT(0)); outb(0x02,MCDPORT(0)); |