aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-10-20qd65xx: remove pointless qd_{read,write}_reg() (take 2)Bartlomiej Zolnierkiewicz1-34/+12
These functions are atomic so locking is pointless (noticed by Sergei). v2: We can now just use local_irq_save/restore() in qd_testreg() (noticed by Jeff). Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Acked-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: PCI BMDMA initialization fixes (take 2)Bartlomiej Zolnierkiewicz1-22/+10
* Set hwif->dma_base only if allocation of extra ports succeeds. While at it: * Move setting of hwif->dma_{base,master} from ide_{mapped_mmio,iomio}_dma() to ide_setup_dma(). * Rename 'dma_base' argument to 'base' in ide_setup_dma() (to make the code obey 80-columns limit and increase its readability). * Remove stale ide_setup_dma() comment. v2: * Change to allocate hwif->dmatable_cpu before reserving I/O ports missed teardown code (spotted by Sergei). On the second thought this change is actually unnecessary so revert it in v2. * Make ide_release_dma_engine() void and remove needless comment. Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: remove stale comments from ide-taskfile.cBartlomiej Zolnierkiewicz1-23/+0
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: remove dead code from ide_driveid_update()Bartlomiej Zolnierkiewicz1-23/+3
* Remove dead code from ide_driveid_update(). While at it: * Remove useless comment. * s/HWIF(drive)/drive->hwif/ Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: use __ide_end_request() in ide_end_dequeued_request()Bartlomiej Zolnierkiewicz1-34/+10
* Remove dead code for handling IDE TCQ from ide_end_dequeued_request(). * Add 'dequeue' parameter to __ide_end_request(). * Use __ide_end_request() in ide_end_dequeued_request(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: enhance ide_setup_pci_noise()Bartlomiej Zolnierkiewicz1-5/+3
* Print PCI device Vendor ID, Device ID and revision in ide_setup_pci_noise(). * Remove no longer needed PCI device revision printing from ide_setup_pci_controller(). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20cs5530: remove needless ide_lock takingBartlomiej Zolnierkiewicz1-7/+1
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: take ide_lock for prefetch disable/enable in do_special()Bartlomiej Zolnierkiewicz3-12/+14
Take ide_lock for prefetch disable/enable in do_special(), then cleanup cmd640 and ht6560b host drivers. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ht6560b: fix deadlock on error handlingBartlomiej Zolnierkiewicz1-13/+18
Stop abusing ide_lock lock (switch to a private locking). Fixes same issue as fixed by Alan Cox in atiixp host driver with commit 6c5f8cc33eb2e10b6ab788bbe259fc142a068627. ht6560b is a bit special cause we still need to leave ide_lock for ->set_pio_mode with 'pio' argument == 8/9 (prefetch disable/enable). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20cmd640: fix deadlock on error handlingBartlomiej Zolnierkiewicz1-20/+28
Stop abusing ide_lock lock (switch to a private locking). Fixes same issue as fixed by Alan Cox in atiixp host driver with commit 6c5f8cc33eb2e10b6ab788bbe259fc142a068627. cmd640 is a bit special cause we still need to leave ide_lock for ->set_pio_mode with 'pio' argument == 8/9 (prefetch disable/enable). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20slc90e66: fix deadlock on error handlingBartlomiej Zolnierkiewicz1-3/+5
* Stop abusing ide_lock lock (switch to a private locking). Fixes same issue as fixed by Alan Cox in atiixp host driver with commit 6c5f8cc33eb2e10b6ab788bbe259fc142a068627. * Bump driver version. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20opti621: fix deadlock on error handlingBartlomiej Zolnierkiewicz1-3/+5
* Stop abusing ide_lock lock (switch to a private locking). Fixes same issue as fixed by Alan Cox in atiixp host driver with commit 6c5f8cc33eb2e10b6ab788bbe259fc142a068627. * Bump driver version. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20qd65xx: fix deadlock on error handlingBartlomiej Zolnierkiewicz1-8/+9
Stop abusing ide_lock lock (switch to a private locking). Fixes same issue as fixed by Alan Cox in atiixp host driver with commit 6c5f8cc33eb2e10b6ab788bbe259fc142a068627. Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20dtc2278: fix deadlock on error handlingBartlomiej Zolnierkiewicz1-2/+4
Stop abusing ide_lock lock (switch to a private locking). Fixes same issue as fixed by Alan Cox in atiixp host driver with commit 6c5f8cc33eb2e10b6ab788bbe259fc142a068627. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ali14xx: fix deadlock on error handlingBartlomiej Zolnierkiewicz1-2/+4
Stop abusing ide_lock lock by switching to a private locking. Fixes same issue as fixed by Alan Cox in atiixp host driver with commit 6c5f8cc33eb2e10b6ab788bbe259fc142a068627. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: constify struct ide_port_infoBartlomiej Zolnierkiewicz33-53/+53
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: replace ide_pci_device_t by struct ide_port_infoBartlomiej Zolnierkiewicz33-99/+89
* Rename struct ide_pci_device_s to struct ide_port_info. * Remove ide_pci_device_t typedef. While at it: * Fix __ide_pci_register_driver() comment. * Fix aec62xx_init_one() comment. * Remove unused 'cds' field from ide_hwgroup_t. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20via82cxxx: keep local ide_pci_device_t copyBartlomiej Zolnierkiewicz1-35/+27
* Keep local ide_pci_device_t copy in via_init_one(). * Adjust ide_pci_device_t copy according to id->driver_data in via_init_one() and remove no longer needed second via82cxxx_chipsets[] entry. * via82cxxx_chipsets[] -> via82cxxx_chipset. * Remove IDE_HFLAGS_VIA define. * Bump driver version. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20dtc2278: set ->pio_mask also for the second portBartlomiej Zolnierkiewicz1-0/+1
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20au1xxx-ide: set ->autotune and ->no_io_32bit also for the slave deviceBartlomiej Zolnierkiewicz1-1/+3
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: remove write-only hwif->hwBartlomiej Zolnierkiewicz10-50/+40
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: add hwif->ack_intr hookBartlomiej Zolnierkiewicz2-2/+3
* Add hwif->ack_intr hook and use it instead of hwif->hw.ack_intr. * Add missing brackets to cris-v32 and powerpc ide_ack_intr() macros. Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20icside: use ec->dma directlyBartlomiej Zolnierkiewicz6-16/+11
* hwif->hwif_data contains pointer to struct expansion_card so use ec->dma directly instead of caching it in hwif->hw.dma. * Remove no longer needed hw_regs_t.dma and NO_DMA define. Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: fix ide_register_hw() to check hwif->io_ports[]Bartlomiej Zolnierkiewicz1-2/+2
hwif->hw.io_ports[] and hwif->io_ports[] should be the same but "4drives" support and scc_pata host driver set only hwif->io_ports[]. To compensate for this check hwif->io_ports[] instead of hwif->hw.io_ports[] in ide_register_hw() (instead of fixing "4drives" and scc_pata because hwif->hw is to be removed). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: add CONFIG_IDE_ARCH_OBSOLETE_INITBartlomiej Zolnierkiewicz2-1/+4
Add CONFIG_IDE_ARCH_OBSOLETE_INIT to drivers/ide/Kconfig and use it instead of defining IDE_ARCH_OBSOLETE_INIT in <arch/ide.h>. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: add ide_find_port() helperBartlomiej Zolnierkiewicz4-62/+36
* Add ide_find_port() helper. * Convert icside, rapide and ide_platform host drivers to use it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: add ide_device_add()Bartlomiej Zolnierkiewicz17-134/+89
* Add ide_device_add() helper and convert host drivers to use it instead of open-coded variants. * Make ide_pci_setup_ports() and do_ide_setup_pci_device() take 'u8 *idx' argument instead of 'ata_index_t *index'. * Remove no longer needed ata_index_t. * Unexport probe_hwif_init() and make it static. * Unexport ide_proc_register_port(). There should be no functionality changes caused by this patch (sgiioc4.c: ide_proc_register_port() requires hwif->present to be set and it won't be set if probe_hwif_init() fails). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: add ->fixup method to ide_hwif_tBartlomiej Zolnierkiewicz15-42/+34
* Add ->fixup method to ide_hwif_t. * Set hwif->fixup in ide_pci_setup_ports() to d->fixup. * Use hwif->fixup in probe_hwif(). * Use probe_hwif_init() instead of probe_hwif_init_with_fixup() in ide_setup_pci_device(). * Add 'fixup' argument to ide_register_hw() and use it to set hwif->fixup, update all ide_register_hw() users accordingly. * Convert ide-cs/delkin_cb host drivers to use ide_register_hw(). * Restore hwif->fixup in ide_hwif_restore(). * Remove ide_register_hw_with_fixup(), probe_hwif_init_with_fixup() and 'fixup' argument from probe_hwif(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20siimage: separate PATA and SATA methodsBartlomiej Zolnierkiewicz1-40/+39
* Split off sil_sata_udma_filter() from sil_udma_filter() and rename sil_udma_filter() to sil_pata_udma_filter(). * Rename siimage_busproc() to sil_sata_busproc(). * Rename siimage_reset_poll() to sil_sata_reset_poll() and in init_hwif_siimage() set ->reset_poll method only for SATA controllers. * Rename siimage_pre_reset() to sil_sata_pre_reset(), in init_hwif_siimage() set ->pre_reset method only for SATA controllers and remove redundant is_sata() call. * Add CONFIG_BLK_DEV_IDE_SATA #ifdef/#endif to pdev_is_sata() so compiler will know to throw out unused SATA code for CONFIG_BLK_DEV_IDE_SATA=n case (830 bytes saved on x86-32). * Bump driver version. Some minor cleanups while at it: * Convert sil_{pata,sata}_udma_filter() to use ATA_UDMA* defines. * In siimage_mmio_ide_dma_test_irq() move 'base' variable under 'if (SATA_ERROR_REG)' block. * Simplify sil_sata_reset_poll() a bit. * Cache is_sata() result in init_hwif_siimage() Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20aec62xx: remove aec62xx_dma_lost_irq()Bartlomiej Zolnierkiewicz1-16/+1
* Remove aec62xx_dma_lost_irq() (generic ide_dma_lost_irq() will be used now). * Bump driver version. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20alim15x3: use ->host_flags and ->udma_mask fields from ide_pci_device_tBartlomiej Zolnierkiewicz1-26/+23
* Make a local copy of ali15x3_chipset in alim15x3_init_one() and set ->host_flags / ->udma_mask according to the controller capabilities. * Cleanup init_hwif_common_ali15x3(). * Bump driver version. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20alim15x3: fix CD_ROM DMA and PIO FIFO settings setupBartlomiej Zolnierkiewicz1-29/+31
* Setup CD_ROM DMA and PIO FIFO settings in init_chipset_ali15x3() instead of ata66_ali15x3(). The latter is called from init_hwif_common_ali15x3() only if DMA base exists (which insists m5529_revision > 0x20). This changes makes CD_ROM DMA / PIO FIFO bits being set only once and also when "idex=ata66" kernel parameter is used. * While at it move also chip_is_1543c_e setup from ata66_ali15x3() to init_chipset_ali15x3() and check if isa_dev exists before accessing it. * Bump driver version. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: add IDE_HFLAG_{IO_32BIT,UNMASK_IRQS} host flagsBartlomiej Zolnierkiewicz4-40/+38
Add IDE_HFLAG_{IO_32BIT,UNMASK_IRQS} host flag to tell ide_pci_setup_ports() to set drive->{io_32bit,unmask} for both drives on the interface. Convert amd74xx, sl82c105 and via82cxxx host drivers to use these new host flags. While at it: * Add IDE_HFLAGS_AMD define (amd74xx host driver). * Add IDE_HFLAGS_VIA define (via82cxxx host driver). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: add IDE_HFLAG_RQSIZE_256 host flagBartlomiej Zolnierkiewicz2-12/+9
Add IDE_HFLAG_RQSIZE_256 host flag to tell ide_pci_setup_ports() to set hwif->rqsize to 256 sectors. Convert pdc202xx_old host driver to use it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: add IDE_HFLAG_FORCE_LEGACY_IRQS host flagBartlomiej Zolnierkiewicz3-31/+19
Add IDE_HFLAG_FORCE_LEGACY_IRQS host flag to tell ide_pci_setup_ports() to always set hwif->irq to legacy IRQ 14/15 and convert generic IDE PCI and via82cxxx host drivers to use it. While at it: * Add IDE_HFLAGS_UMC define (generic IDE PCI host driver). * Remove no longer needed init_hwif_generic() (generic IDE PCI host driver). * Set d->udma_mask instead of hwif->ultra_mask (via82cxxx host driver). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: add ->chipset field to ide_pci_device_tBartlomiej Zolnierkiewicz5-7/+5
Add ->chipset field to ide_pci_device_t and use it in ide_hwif_configure() to set hwif->chipset. Convert cmd64x, cy82c693, rz1000 and trm290 host drivers to use this new ability. While at it define hwif_chipset_t as u8 to save some space in hw_regs_t, ide_hwif_t and ide_pci_device_t instances. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: add hwif_register_devices() helperBartlomiej Zolnierkiewicz1-27/+22
Add hwif_register_devices() helper to fix code duplication between probe_hwif_init_with_fixup() and ideprobe_init(). Also remove stale comment while at it. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20serverworks: remove dead code from svwks_set_dma_mode()Bartlomiej Zolnierkiewicz1-7/+0
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20rz1000: set serialized flag only if mate interface existsBartlomiej Zolnierkiewicz1-1/+2
Setting hwif->serialized makes sense only if the mate interface exists. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: fix disabled ports reporting for PCI controllersBartlomiej Zolnierkiewicz1-6/+4
Report all disabled ports in ide_pci_setup_ports() (prevents the bogus warning when ide_hwif_configure()->ide_match_hwif() fails to find free ide_hwifs[] slots). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20cmd64x: always set hwif->chipset for CMD646Bartlomiej Zolnierkiewicz1-1/+3
hwif->chipset should be set to ide_cmd646 also when DMA base is invalid. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide/pci/sis5513.c: add missing "else"Adrian Bunk1-1/+1
This patch adds a missing "else" that was missing in commit c77a89cd98d99819f23a4a08e5e17ee1f13f6e4d. Spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>, Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-19Convert files to UTF-8 and some cleanupsJan Engelhardt2-4/+4
* Convert files to UTF-8. * Also correct some people's names (one example is Eißfeldt, which was found in a source file. Given that the author used an ß at all in a source file indicates that the real name has in fact a 'ß' and not an 'ss', which is commonly used as a substitute for 'ß' when limited to 7bit.) * Correct town names (Goettingen -> Göttingen) * Update Eberhard Mönkeberg's address (http://lkml.org/lkml/2007/1/8/313) Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-19Fix misspellings of "system", "controller", "interrupt" and "necessary".Robert P. J. Day3-4/+4
Fix the various misspellings of "system", controller", "interrupt" and "[un]necessary". Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-19remove asm/bitops.h includesJiri Slaby1-1/+1
remove asm/bitops.h includes including asm/bitops directly may cause compile errors. don't include it and include linux/bitops instead. next patch will deny including asm header directly. Cc: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-19ide: set drive->autotune in ide_pci_setup_ports()Bartlomiej Zolnierkiewicz29-74/+3
Majority of host drivers using IDE PCI layer set drive->autotune, the only exceptions are: generic.c ns87415.c rz1000.c trm290.c * no ->set_pio_mode method it821x.c: * if memory allocation fails drive->autotune won't be set (but there also won't be ->set_pio_mode method in such case) piix.c: * MPIIX controller (no ->init_hwif method so also no ->set_pio_mode method) However if there is no ->set_pio_mode method there are no changes in behavior w.r.t. PIO tuning so always set drive->autotune in ide_pci_setup_ports(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-19triflex: always tune PIOBartlomiej Zolnierkiewicz1-0/+3
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-19opti621: always tune PIOBartlomiej Zolnierkiewicz1-4/+4
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-19cy82c693: always tune PIOBartlomiej Zolnierkiewicz1-5/+5
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-19cs5520: always tune PIOBartlomiej Zolnierkiewicz1-3/+4
Since cs5520 uses VDMA best PIO mode was tuned anyway by ide_dma_check() but only if DMA was successfully initialized. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>