Loading Documentation/cdrom/ide-cd +2 −37 Original line number Original line Diff line number Diff line Loading @@ -159,42 +159,7 @@ two arguments: the CDROM device, and the slot number to which you wish to change. If the slot number is -1, the drive is unloaded. to change. If the slot number is -1, the drive is unloaded. 4. Compilation options 4. Common problems ---------------------- There are a few additional options which can be set when compiling the driver. Most people should not need to mess with any of these; they are listed here simply for completeness. A compilation option can be enabled by adding a line of the form `#define <option> 1' to the top of ide-cd.c. All these options are disabled by default. VERBOSE_IDE_CD_ERRORS If this is set, ATAPI error codes will be translated into textual descriptions. In addition, a dump is made of the command which provoked the error. This is off by default to save the memory used by the (somewhat long) table of error descriptions. STANDARD_ATAPI If this is set, the code needed to deal with certain drives which do not properly implement the ATAPI spec will be disabled. If you know your drive implements ATAPI properly, you can turn this on to get a slightly smaller kernel. NO_DOOR_LOCKING If this is set, the driver will never attempt to lock the door of the drive. CDROM_NBLOCKS_BUFFER This sets the size of the buffer to be used for a CDROMREADAUDIO ioctl. The default is 8. TEST This currently enables an additional ioctl which enables a user-mode program to execute an arbitrary packet command. See the source for details. This should be left off unless you know what you're doing. 5. Common problems ------------------ ------------------ This section discusses some common problems encountered when trying to This section discusses some common problems encountered when trying to Loading Loading @@ -371,7 +336,7 @@ f. Data corruption. expense of low system performance. expense of low system performance. 6. cdchange.c 5. cdchange.c ------------- ------------- /* /* Loading drivers/ide/cmd640.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -606,7 +606,7 @@ static void cmd640_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) } } #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ static void cmd640_init_dev(ide_drive_t *drive) static void __init cmd640_init_dev(ide_drive_t *drive) { { unsigned int i = drive->hwif->channel * 2 + (drive->dn & 1); unsigned int i = drive->hwif->channel * 2 + (drive->dn & 1); Loading drivers/ide/icside.c +60 −4 Original line number Original line Diff line number Diff line Loading @@ -65,6 +65,8 @@ static struct cardinfo icside_cardinfo_v6_2 = { }; }; struct icside_state { struct icside_state { unsigned int channel; unsigned int enabled; void __iomem *irq_port; void __iomem *irq_port; void __iomem *ioc_base; void __iomem *ioc_base; unsigned int sel; unsigned int sel; Loading Loading @@ -114,11 +116,18 @@ static void icside_irqenable_arcin_v6 (struct expansion_card *ec, int irqnr) struct icside_state *state = ec->irq_data; struct icside_state *state = ec->irq_data; void __iomem *base = state->irq_port; void __iomem *base = state->irq_port; state->enabled = 1; switch (state->channel) { case 0: writeb(0, base + ICS_ARCIN_V6_INTROFFSET_1); writeb(0, base + ICS_ARCIN_V6_INTROFFSET_1); readb(base + ICS_ARCIN_V6_INTROFFSET_2); readb(base + ICS_ARCIN_V6_INTROFFSET_2); break; case 1: writeb(0, base + ICS_ARCIN_V6_INTROFFSET_2); writeb(0, base + ICS_ARCIN_V6_INTROFFSET_2); readb(base + ICS_ARCIN_V6_INTROFFSET_1); readb(base + ICS_ARCIN_V6_INTROFFSET_1); break; } } } /* Prototype: icside_irqdisable_arcin_v6 (struct expansion_card *ec, int irqnr) /* Prototype: icside_irqdisable_arcin_v6 (struct expansion_card *ec, int irqnr) Loading @@ -128,6 +137,8 @@ static void icside_irqdisable_arcin_v6 (struct expansion_card *ec, int irqnr) { { struct icside_state *state = ec->irq_data; struct icside_state *state = ec->irq_data; state->enabled = 0; readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_1); readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_1); readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_2); readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_2); } } Loading @@ -149,6 +160,44 @@ static const expansioncard_ops_t icside_ops_arcin_v6 = { .irqpending = icside_irqpending_arcin_v6, .irqpending = icside_irqpending_arcin_v6, }; }; /* * Handle routing of interrupts. This is called before * we write the command to the drive. */ static void icside_maskproc(ide_drive_t *drive, int mask) { ide_hwif_t *hwif = drive->hwif; struct expansion_card *ec = ECARD_DEV(hwif->dev); struct icside_state *state = ecard_get_drvdata(ec); unsigned long flags; local_irq_save(flags); state->channel = hwif->channel; if (state->enabled && !mask) { switch (hwif->channel) { case 0: writeb(0, state->irq_port + ICS_ARCIN_V6_INTROFFSET_1); readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_2); break; case 1: writeb(0, state->irq_port + ICS_ARCIN_V6_INTROFFSET_2); readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_1); break; } } else { readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_2); readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_1); } local_irq_restore(flags); } static const struct ide_port_ops icside_v6_no_dma_port_ops = { .maskproc = icside_maskproc, }; #ifdef CONFIG_BLK_DEV_IDEDMA_ICS #ifdef CONFIG_BLK_DEV_IDEDMA_ICS /* /* * SG-DMA support. * SG-DMA support. Loading Loading @@ -229,6 +278,7 @@ static void icside_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) static const struct ide_port_ops icside_v6_port_ops = { static const struct ide_port_ops icside_v6_port_ops = { .set_dma_mode = icside_set_dma_mode, .set_dma_mode = icside_set_dma_mode, .maskproc = icside_maskproc, }; }; static void icside_dma_host_set(ide_drive_t *drive, int on) static void icside_dma_host_set(ide_drive_t *drive, int on) Loading Loading @@ -272,6 +322,11 @@ static int icside_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd) */ */ BUG_ON(dma_channel_active(ec->dma)); BUG_ON(dma_channel_active(ec->dma)); /* * Ensure that we have the right interrupt routed. */ icside_maskproc(drive, 0); /* /* * Route the DMA signals to the correct interface. * Route the DMA signals to the correct interface. */ */ Loading Loading @@ -400,6 +455,7 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec) static const struct ide_port_info icside_v6_port_info __initdata = { static const struct ide_port_info icside_v6_port_info __initdata = { .init_dma = icside_dma_off_init, .init_dma = icside_dma_off_init, .port_ops = &icside_v6_no_dma_port_ops, .dma_ops = &icside_v6_dma_ops, .dma_ops = &icside_v6_dma_ops, .host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO, .host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO, .mwdma_mask = ATA_MWDMA2, .mwdma_mask = ATA_MWDMA2, Loading drivers/ide/ide-cs.c +11 −12 Original line number Original line Diff line number Diff line Loading @@ -121,19 +121,11 @@ static int ide_probe(struct pcmcia_device *link) static void ide_detach(struct pcmcia_device *link) static void ide_detach(struct pcmcia_device *link) { { ide_info_t *info = link->priv; ide_info_t *info = link->priv; ide_hwif_t *hwif = info->host->ports[0]; unsigned long data_addr, ctl_addr; dev_dbg(&link->dev, "ide_detach(0x%p)\n", link); dev_dbg(&link->dev, "ide_detach(0x%p)\n", link); data_addr = hwif->io_ports.data_addr; ctl_addr = hwif->io_ports.ctl_addr; ide_release(link); ide_release(link); release_region(ctl_addr, 1); release_region(data_addr, 8); kfree(info); kfree(info); } /* ide_detach */ } /* ide_detach */ Loading Loading @@ -354,13 +346,20 @@ static void ide_release(struct pcmcia_device *link) dev_dbg(&link->dev, "ide_release(0x%p)\n", link); dev_dbg(&link->dev, "ide_release(0x%p)\n", link); if (info->ndev) if (info->ndev) { /* FIXME: if this fails we need to queue the cleanup somehow ide_hwif_t *hwif = host->ports[0]; -- need to investigate the required PCMCIA magic */ unsigned long data_addr, ctl_addr; ide_host_remove(host); data_addr = hwif->io_ports.data_addr; ctl_addr = hwif->io_ports.ctl_addr; ide_host_remove(host); info->ndev = 0; info->ndev = 0; release_region(ctl_addr, 1); release_region(data_addr, 8); } pcmcia_disable_device(link); pcmcia_disable_device(link); } /* ide_release */ } /* ide_release */ Loading drivers/ide/pdc202xx_old.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -93,13 +93,13 @@ static int pdc202xx_test_irq(ide_hwif_t *hwif) * bit 7: error, bit 6: interrupting, * bit 7: error, bit 6: interrupting, * bit 5: FIFO full, bit 4: FIFO empty * bit 5: FIFO full, bit 4: FIFO empty */ */ return ((sc1d & 0x50) == 0x40) ? 1 : 0; return ((sc1d & 0x50) == 0x50) ? 1 : 0; } else { } else { /* /* * bit 3: error, bit 2: interrupting, * bit 3: error, bit 2: interrupting, * bit 1: FIFO full, bit 0: FIFO empty * bit 1: FIFO full, bit 0: FIFO empty */ */ return ((sc1d & 0x05) == 0x04) ? 1 : 0; return ((sc1d & 0x05) == 0x05) ? 1 : 0; } } } } Loading Loading
Documentation/cdrom/ide-cd +2 −37 Original line number Original line Diff line number Diff line Loading @@ -159,42 +159,7 @@ two arguments: the CDROM device, and the slot number to which you wish to change. If the slot number is -1, the drive is unloaded. to change. If the slot number is -1, the drive is unloaded. 4. Compilation options 4. Common problems ---------------------- There are a few additional options which can be set when compiling the driver. Most people should not need to mess with any of these; they are listed here simply for completeness. A compilation option can be enabled by adding a line of the form `#define <option> 1' to the top of ide-cd.c. All these options are disabled by default. VERBOSE_IDE_CD_ERRORS If this is set, ATAPI error codes will be translated into textual descriptions. In addition, a dump is made of the command which provoked the error. This is off by default to save the memory used by the (somewhat long) table of error descriptions. STANDARD_ATAPI If this is set, the code needed to deal with certain drives which do not properly implement the ATAPI spec will be disabled. If you know your drive implements ATAPI properly, you can turn this on to get a slightly smaller kernel. NO_DOOR_LOCKING If this is set, the driver will never attempt to lock the door of the drive. CDROM_NBLOCKS_BUFFER This sets the size of the buffer to be used for a CDROMREADAUDIO ioctl. The default is 8. TEST This currently enables an additional ioctl which enables a user-mode program to execute an arbitrary packet command. See the source for details. This should be left off unless you know what you're doing. 5. Common problems ------------------ ------------------ This section discusses some common problems encountered when trying to This section discusses some common problems encountered when trying to Loading Loading @@ -371,7 +336,7 @@ f. Data corruption. expense of low system performance. expense of low system performance. 6. cdchange.c 5. cdchange.c ------------- ------------- /* /* Loading
drivers/ide/cmd640.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -606,7 +606,7 @@ static void cmd640_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) } } #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ #endif /* CONFIG_BLK_DEV_CMD640_ENHANCED */ static void cmd640_init_dev(ide_drive_t *drive) static void __init cmd640_init_dev(ide_drive_t *drive) { { unsigned int i = drive->hwif->channel * 2 + (drive->dn & 1); unsigned int i = drive->hwif->channel * 2 + (drive->dn & 1); Loading
drivers/ide/icside.c +60 −4 Original line number Original line Diff line number Diff line Loading @@ -65,6 +65,8 @@ static struct cardinfo icside_cardinfo_v6_2 = { }; }; struct icside_state { struct icside_state { unsigned int channel; unsigned int enabled; void __iomem *irq_port; void __iomem *irq_port; void __iomem *ioc_base; void __iomem *ioc_base; unsigned int sel; unsigned int sel; Loading Loading @@ -114,11 +116,18 @@ static void icside_irqenable_arcin_v6 (struct expansion_card *ec, int irqnr) struct icside_state *state = ec->irq_data; struct icside_state *state = ec->irq_data; void __iomem *base = state->irq_port; void __iomem *base = state->irq_port; state->enabled = 1; switch (state->channel) { case 0: writeb(0, base + ICS_ARCIN_V6_INTROFFSET_1); writeb(0, base + ICS_ARCIN_V6_INTROFFSET_1); readb(base + ICS_ARCIN_V6_INTROFFSET_2); readb(base + ICS_ARCIN_V6_INTROFFSET_2); break; case 1: writeb(0, base + ICS_ARCIN_V6_INTROFFSET_2); writeb(0, base + ICS_ARCIN_V6_INTROFFSET_2); readb(base + ICS_ARCIN_V6_INTROFFSET_1); readb(base + ICS_ARCIN_V6_INTROFFSET_1); break; } } } /* Prototype: icside_irqdisable_arcin_v6 (struct expansion_card *ec, int irqnr) /* Prototype: icside_irqdisable_arcin_v6 (struct expansion_card *ec, int irqnr) Loading @@ -128,6 +137,8 @@ static void icside_irqdisable_arcin_v6 (struct expansion_card *ec, int irqnr) { { struct icside_state *state = ec->irq_data; struct icside_state *state = ec->irq_data; state->enabled = 0; readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_1); readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_1); readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_2); readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_2); } } Loading @@ -149,6 +160,44 @@ static const expansioncard_ops_t icside_ops_arcin_v6 = { .irqpending = icside_irqpending_arcin_v6, .irqpending = icside_irqpending_arcin_v6, }; }; /* * Handle routing of interrupts. This is called before * we write the command to the drive. */ static void icside_maskproc(ide_drive_t *drive, int mask) { ide_hwif_t *hwif = drive->hwif; struct expansion_card *ec = ECARD_DEV(hwif->dev); struct icside_state *state = ecard_get_drvdata(ec); unsigned long flags; local_irq_save(flags); state->channel = hwif->channel; if (state->enabled && !mask) { switch (hwif->channel) { case 0: writeb(0, state->irq_port + ICS_ARCIN_V6_INTROFFSET_1); readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_2); break; case 1: writeb(0, state->irq_port + ICS_ARCIN_V6_INTROFFSET_2); readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_1); break; } } else { readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_2); readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_1); } local_irq_restore(flags); } static const struct ide_port_ops icside_v6_no_dma_port_ops = { .maskproc = icside_maskproc, }; #ifdef CONFIG_BLK_DEV_IDEDMA_ICS #ifdef CONFIG_BLK_DEV_IDEDMA_ICS /* /* * SG-DMA support. * SG-DMA support. Loading Loading @@ -229,6 +278,7 @@ static void icside_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive) static const struct ide_port_ops icside_v6_port_ops = { static const struct ide_port_ops icside_v6_port_ops = { .set_dma_mode = icside_set_dma_mode, .set_dma_mode = icside_set_dma_mode, .maskproc = icside_maskproc, }; }; static void icside_dma_host_set(ide_drive_t *drive, int on) static void icside_dma_host_set(ide_drive_t *drive, int on) Loading Loading @@ -272,6 +322,11 @@ static int icside_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd) */ */ BUG_ON(dma_channel_active(ec->dma)); BUG_ON(dma_channel_active(ec->dma)); /* * Ensure that we have the right interrupt routed. */ icside_maskproc(drive, 0); /* /* * Route the DMA signals to the correct interface. * Route the DMA signals to the correct interface. */ */ Loading Loading @@ -400,6 +455,7 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec) static const struct ide_port_info icside_v6_port_info __initdata = { static const struct ide_port_info icside_v6_port_info __initdata = { .init_dma = icside_dma_off_init, .init_dma = icside_dma_off_init, .port_ops = &icside_v6_no_dma_port_ops, .dma_ops = &icside_v6_dma_ops, .dma_ops = &icside_v6_dma_ops, .host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO, .host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO, .mwdma_mask = ATA_MWDMA2, .mwdma_mask = ATA_MWDMA2, Loading
drivers/ide/ide-cs.c +11 −12 Original line number Original line Diff line number Diff line Loading @@ -121,19 +121,11 @@ static int ide_probe(struct pcmcia_device *link) static void ide_detach(struct pcmcia_device *link) static void ide_detach(struct pcmcia_device *link) { { ide_info_t *info = link->priv; ide_info_t *info = link->priv; ide_hwif_t *hwif = info->host->ports[0]; unsigned long data_addr, ctl_addr; dev_dbg(&link->dev, "ide_detach(0x%p)\n", link); dev_dbg(&link->dev, "ide_detach(0x%p)\n", link); data_addr = hwif->io_ports.data_addr; ctl_addr = hwif->io_ports.ctl_addr; ide_release(link); ide_release(link); release_region(ctl_addr, 1); release_region(data_addr, 8); kfree(info); kfree(info); } /* ide_detach */ } /* ide_detach */ Loading Loading @@ -354,13 +346,20 @@ static void ide_release(struct pcmcia_device *link) dev_dbg(&link->dev, "ide_release(0x%p)\n", link); dev_dbg(&link->dev, "ide_release(0x%p)\n", link); if (info->ndev) if (info->ndev) { /* FIXME: if this fails we need to queue the cleanup somehow ide_hwif_t *hwif = host->ports[0]; -- need to investigate the required PCMCIA magic */ unsigned long data_addr, ctl_addr; ide_host_remove(host); data_addr = hwif->io_ports.data_addr; ctl_addr = hwif->io_ports.ctl_addr; ide_host_remove(host); info->ndev = 0; info->ndev = 0; release_region(ctl_addr, 1); release_region(data_addr, 8); } pcmcia_disable_device(link); pcmcia_disable_device(link); } /* ide_release */ } /* ide_release */ Loading
drivers/ide/pdc202xx_old.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -93,13 +93,13 @@ static int pdc202xx_test_irq(ide_hwif_t *hwif) * bit 7: error, bit 6: interrupting, * bit 7: error, bit 6: interrupting, * bit 5: FIFO full, bit 4: FIFO empty * bit 5: FIFO full, bit 4: FIFO empty */ */ return ((sc1d & 0x50) == 0x40) ? 1 : 0; return ((sc1d & 0x50) == 0x50) ? 1 : 0; } else { } else { /* /* * bit 3: error, bit 2: interrupting, * bit 3: error, bit 2: interrupting, * bit 1: FIFO full, bit 0: FIFO empty * bit 1: FIFO full, bit 0: FIFO empty */ */ return ((sc1d & 0x05) == 0x04) ? 1 : 0; return ((sc1d & 0x05) == 0x05) ? 1 : 0; } } } } Loading