IDE updates part 4
Subsystems (4)
PATCH 1/1 IDE updates part 4
New day, new IDE updates...
- fix icside breakage caused by yesterday's updates (Al Viro)
- remove "pipelined" mode from ide-tape:
- ~850 LOC gone with no loss of the functionality
- performance impact should be negligable
- makes the driver parseable for the mere mortals again
- allows future driver enhancements
(Borislav Petkov)
- remove the last user of /proc/ide/<chipset> interface (~250 LOC gone) (Alexey Dobriyan)
- add new interface for IDE kernel parameters
- warm-plug / sysfs friendly (sysfs access to be enabled in the future)
- simple (no internal parsing, -200 LOC when compared to the old one)
- future proof (not dependent on the legacy naming of devices)
- misc changes
Linus, please pull from:
master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6.git/
to receive the following updates:
Documentation/ide/ide-tape.txt | 211 ++----- Documentation/ide/ide.txt | 107 ++-- Documentation/kernel-parameters.txt | 4 - drivers/ide/arm/bast-ide.c | 12 +- drivers/ide/arm/icside.c | 13 +- drivers/ide/arm/palm_bk3710.c | 12 +- drivers/ide/arm/rapide.c | 8 +- drivers/ide/cris/ide-cris.c | 18 +- drivers/ide/h8300/ide-h8300.c | 6 +- drivers/ide/ide-acpi.c | 18 +- drivers/ide/ide-cd.c | 12 +- drivers/ide/ide-floppy.c | 12 +- drivers/ide/ide-io.c | 42 +- drivers/ide/ide-iops.c | 72 +-- drivers/ide/ide-pnp.c | 5 +- drivers/ide/ide-probe.c | 73 +-- drivers/ide/ide-proc.c | 8 - drivers/ide/ide-tape.c | 1191 ++++++----------------------------- drivers/ide/ide-taskfile.c | 29 +- drivers/ide/ide.c | 360 ++++++----- drivers/ide/legacy/ali14xx.c | 6 +- drivers/ide/legacy/buddha.c | 14 +- drivers/ide/legacy/dtc2278.c | 5 +- drivers/ide/legacy/falconide.c | 6 +- drivers/ide/legacy/gayle.c | 18 +- drivers/ide/legacy/ht6560b.c | 11 +- drivers/ide/legacy/ide-4drives.c | 2 +- drivers/ide/legacy/ide-cs.c | 12 +- drivers/ide/legacy/ide_platform.c | 10 +- drivers/ide/legacy/macide.c | 4 +- drivers/ide/legacy/q40ide.c | 6 +- drivers/ide/legacy/qd65xx.c | 33 +- drivers/ide/legacy/umc8672.c | 4 +- drivers/ide/mips/au1xxx-ide.c | 7 +- drivers/ide/mips/swarm.c | 6 +- drivers/ide/pci/aec62xx.c | 2 +- drivers/ide/pci/alim15x3.c | 242 +------- drivers/ide/pci/amd74xx.c | 2 +- drivers/ide/pci/cmd640.c | 89 +-- drivers/ide/pci/cmd64x.c | 6 +- drivers/ide/pci/cy82c693.c | 4 +- drivers/ide/pci/delkin_cb.c | 9 +- drivers/ide/pci/hpt366.c | 2 +- drivers/ide/pci/ns87415.c | 12 +- drivers/ide/pci/opti621.c | 7 +- drivers/ide/pci/scc_pata.c | 11 +- drivers/ide/pci/sgiioc4.c | 27 +- drivers/ide/pci/siimage.c | 27 +- drivers/ide/pci/trm290.c | 2 +- drivers/ide/pci/via82cxxx.c | 2 +- drivers/ide/ppc/mpc8xx.c | 28 +- drivers/ide/ppc/pmac.c | 7 +- drivers/scsi/ide-scsi.c | 13 +- include/asm-arm/arch-sa1100/ide.h | 6 +- include/asm-cris/arch-v10/ide.h | 11 +- include/linux/ide.h | 95 ++-- 56 files changed, 892 insertions(+), 2069 deletions(-)
Al Viro (1):
ide: fix icside breakage
Alexey Dobriyan (2):
ide: remove /proc/ide/ali
ide: remove now unused ide_pci_create_host_proc()
Bartlomiej Zolnierkiewicz (19):
ide: add "ignore_cable" parameter (take 2)
ide: remove obsoleted "idex=serialize" kernel parameter
ide: remove obsoleted "idex=reset" kernel parameter
ide: remove obsoleted "idex=" kernel parameters
ide: remove obsoleted "hdx=noautotune" kernel parameter
ide: add "vlb|pci_clock=" parameter
ide: mark "idebus=" kernel parameter as obsoleted (take 2)
ide: always auto-tune PIO in legacy VLB host drivers
cmd640: always auto-tune PIO
ide: remove IDE_HFLAG_NO_AUTOTUNE host flag
ide: remove obsoleted "hdx=autotune" kernel parameter
ide: add "nodma|noflush|noprobe|nowerr=" parameters
ide: add "cdrom=" and "chs=" parameters
gayle: add "doubler" parameter
ide: add "noacpi" / "acpigtf" / "acpionboot" parameters
mpc8xx-ide: use ide_find_port()
ide: sanitize ide_unregister() usage
ide: make ide_unregister() take 'ide_hwif_t *' as an argument (take 2)
ide: add struct ide_io_ports (take 3)
Borislav Petkov (27):
ide-tape: remove tape->cache_stage
ide-tape: remove pipeline-specific code from idetape_add_chrdev_write_request ide-tape remove pipeline speed/control calculations
ide-tape: remove pipeline-specific code from idetape_add_chrdev_read_request()
ide-tape: remove unused parameter from idetape_copy_stage_to_user
ide-tape: remove unused parameter from idetape_copy_stage_from_user
ide-tape: remove pipeline-specific code in idetape_space_over_filemarks()
ide-tape: remove idetape_pipeline_size()
ide-tape: remove idetape_remove_stage_head()
ide-tape: remove pipeline-specific code from idetape_end_request()
ide-tape: unwrap idetape_queue_pc_tail()
ide-tape: remove remaining pipeline functionality
ide-tape: remove pipelined mode tape control flags
ide-tape: remove pipeline-specific members from struct ide_tape_obj
ide-tape: remove pipelined mode parameters
ide-tape: remove misc references to pipelined operation in the comments
ide-tape: remove pipelined mode description from Documentation/ide/ide-tape.txt
ide-tape: remove comments markup from Documentation/ide/ide-tape.txt
ide-tape: improve buffer allocation strategy
ide-tape: mv tape->stage_size tape->buffer_size
ide-tape: mv tape->pages_per_stage tape->pages_per_buffer
ide-tape: improve buffer pages freeing strategy
ide-tape: make __idetape_discard_read_pipeline() of type void
ide-tape: mv idetape_discard_read_pipeline ide_tape_discard_merge_buffer
ide-tape: mv idetape_empty_write_pipeline ide_tape_flush_merge_buffer
ide-tape: mv tape->merge_stage_size tape->merge_bh_size
ide-tape: remove tape->merge_stage
Documentation/ide/ide-tape.txt +65 -146
@@ -1,146 +1,65 @@ -/* - * IDE ATAPI streaming tape driver. - * - * This driver is a part of the Linux ide driver. - * - * The driver, in co-operation with ide.c, basically traverses the - * request-list for the block device interface. The character device - * interface, on the other hand, creates new requests, adds them - * to the request-list of the block device, and waits for their completion. - * - * Pipelined operation mode is now supported on both reads and writes. - * - * The block device major and minor numbers are determined from the - * tape's relative position in the ide interfaces, as explained in ide.c. - * - * The character device interface consists of the following devices: - * - * ht0 major 37, minor 0 first IDE tape, rewind on close. - * ht1 major 37, minor 1 second IDE tape, rewind on close. - * ... - * nht0 major 37, minor 128 first IDE tape, no rewind on close. - * nht1 major 37, minor 129 second IDE tape, no rewind on close. - * ... - * - * The general magnetic tape commands compatible interface, as defined by - * include/linux/mtio.h, is accessible through the character device. - * - * General ide driver configuration options, such as the interrupt-unmask - * flag, can be configured by issuing an ioctl to the block device interface, - * as any other ide device. - * - * Our own ide-tape ioctl's can be issued to either the block device or - * the character device interface. - * - * Maximal throughput with minimal bus load will usually be achieved in the - * following scenario: - * - * 1. ide-tape is operating in the pipelined operation mode. - * 2. No buffering is performed by the user backup program. - * - * Testing was done with a 2 GB CONNER CTMA 4000 IDE ATAPI Streaming Tape Drive. - * - * Here are some words from the first releases of hd.c, which are quoted - * in ide.c and apply here as well: - * - * | Special care is recommended. Have Fun! - * - * - * An overview of the pipelined operation mode. - * - * In the pipelined write mode, we will usually just add requests to our - * pipeline and return immediately, before we even start to service them. The - * user program will then have enough time to prepare the next request while - * we are still busy servicing previous requests. In the pipelined read mode, - * the situation is similar - we add read-ahead requests into the pipeline, - * before the user even requested them. - * - * The pipeline can be viewed as a "safety net" which will be activated when - * the system load is high and prevents the user backup program from keeping up - * with the current tape speed. At this point, the pipeline will get - * shorter and shorter but the tape will still be streaming at the same speed. - * Assuming we have enough pipeline stages, the system load will hopefully - * decrease before the pipeline is completely empty, and the backup program - * will be able to "catch up" and refill the pipeline again. - * - * When using the pipelined mode, it would be best to disable any type of - * buffering done by the user program, as ide-tape already provides all the - * benefits in the kernel, where it can be done in a more efficient way. - * As we will usually not block the user program on a request, the most - * efficient user code will then be a simple read-write-read-... cycle. - * Any additional logic will usually just slow down the backup process. - * - * Using the pipelined mode, I get a constant over 400 KBps throughput, - * which seems to be the maximum throughput supported by my tape. - * - * However, there are some downfalls: - * - * 1. We use memory (for data buffers) in proportional to the number - * of pipeline stages (each stage is about 26 KB with my tape). - * 2. In the pipelined write mode, we cheat and postpone error codes - * to the user task. In read mode, the actual tape position - * will be a bit further than the last requested block. - * - * Concerning (1): - * - * 1. We allocate stages dynamically only when we need them. When - * we don't need them, we don't consume additional memory. In - * case we can't allocate stages, we just manage without them - * (at the expense of decreased throughput) so when Linux is - * tight in memory, we will not pose additional difficulties. - * - * 2. The maximum number of stages (which is, in fact, the maximum - * amount of memory) which we allocate is limited by the compile - * time parameter IDETAPE_MAX_PIPELINE_STAGES. - * - * 3. The maximum number of stages is a controlled parameter - We - * don't start from the user defined maximum number of stages - * but from the lower IDETAPE_MIN_PIPELINE_STAGES (again, we - * will not even allocate this amount of stages if the user - * program can't handle the speed). We then implement a feedback - * loop which checks if the pipeline is empty, and if it is, we - * increase the maximum number of stages as necessary until we - * reach the optimum value which just manages to keep the tape - * busy with minimum allocated memory or until we reach - * IDETAPE_MAX_PIPELINE_STAGES. - * - * Concerning (2): - * - * In pipelined write mode, ide-tape can not return accurate error codes - * to the user program since we usually just add the request to the - * pipeline without waiting for it to be serviced. In case an error - * occurs, I will report it on the next user request. - * - * In the pipelined read mode, subsequent read requests or forward - * filemark spacing will perform correctly, as we preserve all blocks - * and filemarks which we encountered during our excess read-ahead. - * - * For accurate tape positioning and error reporting, disabling - * pipelined mode might be the best option. - * - * You can enable/disable/tune the pipelined operation mode by adjusting - * the compile time parameters below. - * - * - * Possible improvements. - * - * 1. Support for the ATAPI overlap protocol. - * - * In order to maximize bus throughput, we currently use the DSC - * overlap method which enables ide.c to service requests from the - * other device while the tape is busy executing a command. The - * DSC overlap method involves polling the tape's status register - * for the DSC bit, and servicing the other device while the tape - * isn't ready. - * - * In the current QIC development standard (December 1995), - * it is recommended that new tape drives will *in addition* - * implement the ATAPI overlap protocol, which is used for the - * same purpose - efficient use of the IDE bus, but is interrupt - * driven and thus has much less CPU overhead. - * - * ATAPI overlap is likely to be supported in most new ATAPI - * devices, including new ATAPI cdroms, and thus provides us - * a method by which we can achieve higher throughput when - * sharing a (fast) ATA-2 disk with any (slow) new ATAPI device. - */ +IDE ATAPI streaming tape driver. + +This driver is a part of the Linux ide driver. + +The driver, in co-operation with ide.c, basically traverses the +request-list for the block device interface. The character device +interface, on the other hand, creates new requests, adds them +to the request-list of the block device, and waits for their completion. + +The block device major and minor numbers are determined from the +tape's relative position in the ide interfaces, as explained in ide.c. + +The character device interface consists of the following devices: + +ht0 major 37, minor 0 first IDE tape, rewind on close. +ht1 major 37, minor 1 second IDE tape, rewind on close. +... +nht0 major 37, minor 128 first IDE tape, no rewind on close. +nht1 major 37, minor 129 second IDE tape, no rewind on close. +... + +The general magnetic tape commands compatible interface, as defined by +include/linux/mtio.h, is accessible through the character device. + +General ide driver configuration options, such as the interrupt-unmask +flag, can be configured by issuing an ioctl to the block device interface, +as any other ide device. + +Our own ide-tape ioctl's can be issued to either the block device or +the character device interface. + +Maximal throughput with minimal bus load will usually be achieved in the +following scenario: + + 1. ide-tape is operating in the pipelined operation mode. + 2. No buffering is performed by the user backup program. + +Testing was done with a 2 GB CONNER CTMA 4000 IDE ATAPI Streaming Tape Drive. + +Here are some words from the first releases of hd.c, which are quoted +in ide.c and apply here as well: + +| Special care is recommended. Have Fun! + +Possible improvements: + +1. Support for the ATAPI overlap protocol. + +In order to maximize bus throughput, we currently use the DSC +overlap method which enables ide.c to service requests from the +other device while the tape is busy executing a command. The +DSC overlap method involves polling the tape's status register +for the DSC bit, and servicing the other device while the tape +isn't ready. + +In the current QIC development standard (December 1995), +it is recommended that new tape drives will *in addition* +implement the ATAPI overlap protocol, which is used for the +same purpose - efficient use of the IDE bus, but is interrupt +driven and thus has much less CPU overhead. + +ATAPI overlap is likely to be supported in most new ATAPI +devices, including new ATAPI cdroms, and thus provides us +a method by which we can achieve higher throughput when +sharing a (fast) ATA-2 disk with any (slow) new ATAPI device.
Documentation/ide/ide.txt +40 -67
148 lines not on this page · raw message
Documentation/kernel-parameters.txt +0 -4
@@ -772,10 +772,6 @@ and is between 256 and 4096 characters. It is defined in the file Format: ide=nodma or ide=doubler See Documentation/ide/ide.txt. - ide?= [HW] (E)IDE subsystem - Format: ide?=ata66 or chipset specific parameters. - See Documentation/ide/ide.txt. - idebus= [HW] (E)IDE subsystem - VLB/PCI bus speed See Documentation/ide/ide.txt.
drivers/ide/arm/bast-ide.c +4 -8
@@ -35,12 +35,12 @@ static int __init bastide_register(unsigned int base, unsigned int aux, int irq) base +=BAST_IDE_CS ; aux +=BAST_IDE_CS ; -for (i =IDE_DATA_OFFSET ; i <=IDE_STATUS_OFFSET ; i++) { - hw.io_ports[i] = (unsigned long )base; +for (i =0 ; i <=7 ; i++) { + hw.io_ports_array[i] = (unsigned long )base; base +=0x20 ; } - hw.io_ports[IDE_CONTROL_OFFSET ] = aux + (6 *0x20 ); + hw.io_ports.ctl_addr = aux + (6 *0x20 ); hw.irq = irq; hwif =ide_find_port ();
@@ -49,11 +49,7 @@ static int __init bastide_register(unsigned int base, unsigned int aux, int irq) i = hwif->index; -if (hwif->present) -ide_unregister (i); -else -ide_init_port_data (hwif, i); - +ide_init_port_data (hwif, i);ide_init_port_hw (hwif, &hw); hwif->port_ops =NULL ;
drivers/ide/arm/icside.c +6 -7
@@ -426,11 +426,12 @@ icside_setup(void __iomem *base, struct cardinfo *info, struct expansion_card *e*/ default_hwif_mmiops (hwif); -for (i =IDE_DATA_OFFSET ; i <=IDE_STATUS_OFFSET ; i++) { - hwif->io_ports[i] = port; +for (i =0 ; i <=7 ; i++) { + hwif->io_ports_array[i] = port; port +=1 << info->stepping; } - hwif->io_ports[IDE_CONTROL_OFFSET ] = (unsigned long )base + info->ctrloffset; + hwif->io_ports.ctl_addr = + (unsigned long )base + info->ctrloffset; hwif->irq = ec->irq; hwif->chipset = ide_acorn; hwif->gendev.parent = &ec->dev;
@@ -480,8 +481,7 @@ static const struct ide_port_info icside_v6_port_info __initdata = { .init_dma = icside_dma_off_init, .port_ops = &icside_v6_no_dma_port_ops, .dma_ops = &icside_v6_dma_ops, - .host_flags = IDE_HFLAG_SERIALIZE | - IDE_HFLAG_NO_AUTOTUNE, + .host_flags = IDE_HFLAG_SERIALIZE, .mwdma_mask = ATA_MWDMA2, .swdma_mask = ATA_SWDMA2, };
@@ -547,14 +547,13 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec) hwif->config_data = (unsigned long )ioc_base; hwif->select_data = sel; - mate->maskproc = icside_maskproc; mate->hwif_data = state; mate->config_data = (unsigned long )ioc_base; mate->select_data = sel |1 ;if (ec->dma !=NO_DMA && !request_dma (ec->dma, hwif->name)) { d.init_dma = icside_dma_init; - d.port_ops = &icside_v6_dma_port_ops; + d.port_ops = &icside_v6_port_ops; d.dma_ops =NULL ; }
drivers/ide/arm/palm_bk3710.c +4 -8
@@ -321,7 +321,7 @@ static int __devinit palm_bk3710_init_dma(ide_hwif_t *hwif, const struct ide_port_info *d) {unsigned long base = - hwif->io_ports[IDE_DATA_OFFSET ] -IDE_PALM_ATA_PRI_REG_OFFSET ; + hwif->io_ports.data_addr -IDE_PALM_ATA_PRI_REG_OFFSET ;printk (KERN_INFO " %s: MMIO-DMA\n" , hwif->name);
@@ -386,8 +386,8 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev) pribase = mem->start +IDE_PALM_ATA_PRI_REG_OFFSET ;for (i =0 ; i <IDE_NR_PORTS -2 ; i++) - hw.io_ports[i] = pribase + i; - hw.io_ports[IDE_CONTROL_OFFSET ] = mem->start + + hw.io_ports_array[i] = pribase + i; + hw.io_ports.ctl_addr = mem->start +IDE_PALM_ATA_PRI_CTL_OFFSET ; hw.irq = irq->start; hw.chipset = ide_palm3710;
@@ -398,11 +398,7 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev) i = hwif->index; -if (hwif->present) -ide_unregister (i); -else -ide_init_port_data (hwif, i); - +ide_init_port_data (hwif, i);ide_init_port_hw (hwif, &hw); hwif->mmio =1 ;
drivers/ide/arm/rapide.c +4 -4
@@ -17,11 +17,11 @@ static void rapide_setup_ports(hw_regs_t *hw, void __iomem *base,unsigned long port = (unsigned long )base;int i; -for (i =IDE_DATA_OFFSET ; i <=IDE_STATUS_OFFSET ; i++) { - hw->io_ports[i] = port; +for (i =0 ; i <=7 ; i++) { + hw->io_ports_array[i] = port; port += sz; } - hw->io_ports[IDE_CONTROL_OFFSET ] = (unsigned long )ctrl; + hw->io_ports.ctl_addr = (unsigned long )ctrl; hw->irq = irq; }
@@ -75,7 +75,7 @@ static void __devexit rapide_remove(struct expansion_card *ec)ecard_set_drvdata (ec,NULL ); -ide_unregister (hwif->index); +ide_unregister (hwif);ecard_release_resources (ec); }
drivers/ide/cris/ide-cris.c +9 -9
@@ -88,8 +88,8 @@ enum /* Transfer types */int cris_ide_ack_intr (ide_hwif_t * hwif) { -reg_ata_rw_ctrl2 ctrl2 =REG_TYPE_CONV (reg_ata_rw_ctrl2, - int, hwif->io_ports[0 ]); +reg_ata_rw_ctrl2 ctrl2 =REG_TYPE_CONV (reg_ata_rw_ctrl2, int, + hwif->io_ports.data_addr);REG_WR_INT (ata, regi_ata, rw_ack_intr,1 << ctrl2.sel);return 1 ; }
@@ -231,7 +231,7 @@ cris_ide_start_dma(ide_drive_t *drive, cris_dma_descr_type *d, int dir,int type,ide_hwif_t *hwif = drive->hwif;reg_ata_rw_ctrl2 ctrl2 =REG_TYPE_CONV (reg_ata_rw_ctrl2, int, - hwif->io_ports[IDE_DATA_OFFSET ]); + hwif->io_ports.data_addr);reg_ata_rw_trf_cnt trf_cnt = {0 }; mycontext.saved_data = (dma_descr_data *)virt_to_phys (d);
@@ -271,7 +271,7 @@ static int cris_dma_test_irq(ide_drive_t *drive)int intr =REG_RD_INT (ata, regi_ata, r_intr);reg_ata_rw_ctrl2 ctrl2 =REG_TYPE_CONV (reg_ata_rw_ctrl2, int, - hwif->io_ports[IDE_DATA_OFFSET ]); + hwif->io_ports.data_addr);return intr & (1 << ctrl2.sel) ?1 :0 ; }
@@ -531,7 +531,7 @@ static void cris_ide_start_dma(ide_drive_t *drive, cris_dma_descr_type *d, int d *R_ATA_CTRL_DATA = cmd |IO_FIELD (R_ATA_CTRL_DATA , data, - drive->hwif->io_ports[IDE_DATA_OFFSET ]) | + drive->hwif->io_ports.data_addr) |IO_STATE (R_ATA_CTRL_DATA , src_dst, dma) |IO_STATE (R_ATA_CTRL_DATA , multi, on) |IO_STATE (R_ATA_CTRL_DATA , dma_size, word);
@@ -550,7 +550,7 @@ static int cris_dma_test_irq(ide_drive_t *drive) {int intr = *R_IRQ_MASK0_RD ;int bus =IO_EXTRACT (R_ATA_CTRL_DATA , sel, - drive->hwif->io_ports[IDE_DATA_OFFSET ]); + drive->hwif->io_ports.data_addr);return intr & (1 << (bus +IO_BITNR (R_IRQ_MASK0_RD , ata_irq0))) ?1 :0 ; }
@@ -644,7 +644,7 @@ cris_ide_inw(unsigned long reg) {* call will also timeout on busy, but as long as the * write is still performed, everything will be fine. */ -if (cris_ide_get_reg (reg) ==IDE_STATUS_OFFSET ) +if (cris_ide_get_reg (reg) ==7 )return BUSY_STAT ;else /* For other rare cases we assume 0 is good enough. */
@@ -765,13 +765,13 @@ static void __init cris_setup_ports(hw_regs_t *hw, unsigned long base)memset (hw,0 ,sizeof (*hw));for (i =0 ; i <=7 ; i++) - hw->io_ports[i] = base +cris_ide_reg_addr (i,0 ,1 ); + hw->io_ports_array[i] = base +cris_ide_reg_addr (i,0 ,1 );/* * the IDE control register is at ATA address 6, * with CS1 active instead of CS0 */ - hw->io_ports[IDE_CONTROL_OFFSET ] = base +cris_ide_reg_addr (6 ,1 ,0 ); + hw->io_ports.ctl_addr = base +cris_ide_reg_addr (6 ,1 ,0 ); hw->irq =ide_default_irq (0 ); hw->ack_intr = cris_ide_ack_intr;
drivers/ide/h8300/ide-h8300.c +3 -3
@@ -63,9 +63,9 @@ static inline void hw_setup(hw_regs_t *hw)int i;memset (hw,0 ,sizeof (hw_regs_t)); -for (i =0 ; i <=IDE_STATUS_OFFSET ; i++) - hw->io_ports[i] =CONFIG_H8300_IDE_BASE +H8300_IDE_GAP *i; - hw->io_ports[IDE_CONTROL_OFFSET ] =CONFIG_H8300_IDE_ALT ; +for (i =0 ; i <=7 ; i++) + hw->io_ports_array[i] =CONFIG_H8300_IDE_BASE +H8300_IDE_GAP *i; + hw->io_ports.ctl_addr =CONFIG_H8300_IDE_ALT ; hw->irq =EXT_IRQ0 +CONFIG_H8300_IDE_IRQ ; hw->chipset = ide_generic; }
drivers/ide/ide-acpi.c +13 -5
@@ -60,9 +60,17 @@ struct ide_acpi_hwif_link { #define DEBPRINT(fmt, args...) do {} while (0)#endif /* DEBUGGING */ -extern int ide_noacpi; -extern int ide_noacpitfs; -extern int ide_noacpionboot; +int ide_noacpi; +module_param_named (noacpi, ide_noacpi, bool,0 ); +MODULE_PARM_DESC (noacpi,"disable IDE ACPI support" ); + +int ide_acpigtf; +module_param_named (acpigtf, ide_acpigtf, bool,0 ); +MODULE_PARM_DESC (acpigtf,"enable IDE ACPI _GTF support" ); + +int ide_acpionboot; +module_param_named (acpionboot, ide_acpionboot, bool,0 ); +MODULE_PARM_DESC (acpionboot,"call IDE ACPI methods on boot" );static bool ide_noacpi_psx;static int no_acpi_psx (const struct dmi_system_id *id)
@@ -376,7 +384,7 @@ static int taskfile_load_raw(ide_drive_t *drive,memcpy (&args.tf_array[7 ], >f->tfa,7 ); args.tf_flags =IDE_TFLAG_TF |IDE_TFLAG_DEVICE ; -if (ide_noacpitfs) { +if (!ide_acpigtf) {DEBPRINT ("_GTF execution disabled\n" );return err; }
@@ -721,7 +729,7 @@ void ide_acpi_port_init_devices(ide_hwif_t *hwif) drive->name, err); } -if (ide_noacpionboot) { +if (!ide_acpionboot) {DEBPRINT ("ACPI methods disabled on boot\n" );return ; }
drivers/ide/ide-cd.c +5 -7
@@ -560,7 +560,7 @@ static ide_startstop_t cdrom_start_packet_command(ide_drive_t *drive,/* packet command */ spin_lock_irqsave (&ide_lock, flags); hwif->OUTBSYNC (drive,WIN_PACKETCMD , - hwif->io_ports[IDE_COMMAND_OFFSET ]); + hwif->io_ports.command_addr);ndelay (400 );spin_unlock_irqrestore (&ide_lock, flags);
@@ -952,9 +952,9 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) }/* ok we fall to pio :/ */ - ireason = hwif->INB (hwif->io_ports[IDE_IREASON_OFFSET ]) &0x3 ; - lowcyl = hwif->INB (hwif->io_ports[IDE_BCOUNTL_OFFSET ]); - highcyl = hwif->INB (hwif->io_ports[IDE_BCOUNTH_OFFSET ]); + ireason = hwif->INB (hwif->io_ports.nsect_addr) &0x3 ; + lowcyl = hwif->INB (hwif->io_ports.lbam_addr); + highcyl = hwif->INB (hwif->io_ports.lbah_addr); len = lowcyl + (256 * highcyl);
@@ -1909,9 +1909,7 @@ static int ide_cdrom_setup(ide_drive_t *drive)/* set correct block size */ blk_queue_hardsect_size (drive->queue,CD_FRAMESIZE ); -if (drive->autotune ==IDE_TUNE_DEFAULT || - drive->autotune ==IDE_TUNE_AUTO ) - drive->dsc_overlap = (drive->next != drive); + drive->dsc_overlap = (drive->next != drive);if (ide_cdrom_register (drive, nslots)) { printk(KERN_ERR "%s: %s failed to register device with the"
drivers/ide/ide-floppy.c +6 -6
@@ -465,10 +465,10 @@ static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive) }/* Get the number of bytes to transfer */ - bcount = (hwif->INB (hwif->io_ports[IDE_BCOUNTH_OFFSET ]) <<8 ) | - hwif->INB (hwif->io_ports[IDE_BCOUNTL_OFFSET ]); + bcount = (hwif->INB (hwif->io_ports.lbah_addr) <<8 ) | + hwif->INB (hwif->io_ports.lbam_addr);/* on this interrupt */ - ireason = hwif->INB (hwif->io_ports[IDE_IREASON_OFFSET ]); + ireason = hwif->INB (hwif->io_ports.nsect_addr);if (ireason &CD ) {printk (KERN_ERR "ide-floppy: CoD != 0 in %s\n" , __func__);
@@ -539,7 +539,7 @@ static ide_startstop_t idefloppy_transfer_pc(ide_drive_t *drive) "initiated yet DRQ isn't asserted\n");return startstop; } - ireason = hwif->INB (hwif->io_ports[IDE_IREASON_OFFSET ]); + ireason = hwif->INB (hwif->io_ports.nsect_addr);if ((ireason &CD ) ==0 || (ireason &IO )) {printk (KERN_ERR "ide-floppy: (IO,CoD) != (0,1) while " "issuing a packet command\n" );
@@ -586,7 +586,7 @@ static ide_startstop_t idefloppy_transfer_pc1(ide_drive_t *drive) "initiated yet DRQ isn't asserted\n");return startstop; } - ireason = hwif->INB (hwif->io_ports[IDE_IREASON_OFFSET ]); + ireason = hwif->INB (hwif->io_ports.nsect_addr);if ((ireason &CD ) ==0 || (ireason &IO )) {printk (KERN_ERR "ide-floppy: (IO,CoD) != (0,1) " "while issuing a packet command\n" );
@@ -692,7 +692,7 @@ static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive,return ide_started; }else {/* Issue the packet command */ - hwif->OUTB (WIN_PACKETCMD , hwif->io_ports[IDE_COMMAND_OFFSET ]); + hwif->OUTB (WIN_PACKETCMD , hwif->io_ports.command_addr);return (*pkt_xfer_routine) (drive); } }
drivers/ide/ide-io.c +18 -24
95 lines not on this page · raw message
drivers/ide/ide-iops.c +34 -38
202 lines not on this page · raw message
drivers/ide/ide-pnp.c +1 -4
@@ -82,10 +82,7 @@ static void idepnp_remove(struct pnp_dev *dev) {ide_hwif_t *hwif =pnp_get_drvdata (dev); -if (hwif) -ide_unregister (hwif->index); -else -printk (KERN_ERR "idepnp: Unable to remove device, please report.\n" ); +ide_unregister (hwif);release_region (pnp_port_start (dev,1 ),1 );release_region (pnp_port_start (dev,0 ),8 );
drivers/ide/ide-probe.c +34 -39
203 lines not on this page · raw message
drivers/ide/ide-proc.c +0 -8
@@ -786,14 +786,6 @@ void ide_proc_register_port(ide_hwif_t *hwif) } } -#ifdef CONFIG_BLK_DEV_IDEPCI -void ide_pci_create_host_proc (const char *name,get_info_t *get_info) -{ -create_proc_info_entry (name,0 , proc_ide_root, get_info); -} -EXPORT_SYMBOL_GPL (ide_pci_create_host_proc); -#endif -void ide_proc_unregister_port (ide_hwif_t *hwif) {if (hwif->proc) {
drivers/ide/ide-tape.c +207 -984
1,808 lines not on this page · raw message
drivers/ide/ide.c +198 -162
360 lines not on this page · raw message
drivers/ide/pci/alim15x3.c +1 -241
242 lines not on this page · raw message
drivers/ide/pci/cmd640.c +25 -64
89 lines not on this page · raw message
include/linux/ide.h +49 -46
95 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.