aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
Commit message (Collapse)AuthorAge
...
* | ide: remove pciirq argument from ide_pci_setup_ports()Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | | | | | | | | | | | * Set ->irq explicitly in cs5520.c. * Remove irq argument from ide_hw_configure(). * Remove pciirq argument from ide_pci_setup_ports(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: fix ->init_chipset method to return 'int' valueBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | | | | | | | | | | | * Return 0 instead of dev->irq in ->init_chipset implementations. * Fix ->init_chipset method to return 'int' value instead of 'unsigned int' one. This fixes ->init_chipset handling for host drivers (cs5530, hpt366 and pdc202xx_new) for which it is possible for this method to fail. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: remove try_to_identify() wrapperBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: remove no longer needed IRQ auto-probing from try_to_identify() (v2)Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | v2: Update actual_try_to_identify() documentation. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: remove no longer needed IRQ fallback code from hwif_init()Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | Then remove no longer used __ide_default_irq(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | amd74xx: remove no longer needed ->init_hwif methodBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | | | This is now handled by core IDE PCI code. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: remove no longer needed IDE_HFLAG[_FORCE]_LEGACY_IRQSBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: use ide_pci_is_in_compatibility_mode() in ide_pci_init_{one,two}()Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: use pci_get_legacy_ide_irq() in ide_pci_init_{one,two}()Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: handle IDE_HFLAG[_FORCE]_LEGACY_IRQS in ide_pci_init_{one,two}()Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | | | | | Move handling of IDE_HFLAG[_FORCE]_LEGACY_IRQS from ide_init_port() to ide_pci_init_{one,two}(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | trm290: small ->init_hwif cleanupBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | | | Core IDE PCI code takes care of assigning hwif->irq for both ports. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ns87415: small ->init_hwif cleanupBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | | | Core IDE PCI code takes care of assigning hwif->irq for both ports. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ns87415: use pci_get_legacy_ide_irq()Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | Fix ->init_hwif to use pci_get_legacy_ide_irq() instead of __ide_default_irq(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | amd74xx: use ide_pci_is_in_compatibility_mode()Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | Fix ->init_hwif to check if IDE PCI controller is in compatibility mode instead of checking for hwif->irq == 0. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: move error handling code to ide-eh.c (v2)Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | | | | | Do some CodingStyle fixups in <linux/ide.h> while at it. v2: Add missing <linux/delay.h> include (reported by Stephen Rothwell). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: checkpatch.pl fixes for ide-iops.cBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | | | | | | | | | Fix following checkpatch.pl warnings/errors: - WARNING: space prohibited between function name and open parenthesis '(' - WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable - WARNING: line over 80 characters - ERROR: trailing whitespace - ERROR: space required before the open parenthesis '(' Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: fix comments in ide_config_drive_speed()Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: fix printk() levels in [atapi_]reset_pollfunc()Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: move standard I/O code to ide-io-std.cBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: move ide_read_bcount_and_ireason() to ide-atapi.cBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: move xfer mode tuning code to ide-xfer-mode.cBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move xfer mode tuning code to ide-xfer-mode.c. * Add CONFIG_IDE_XFER_MODE config option to be selected by host drivers that support xfer mode tuning. * Add CONFIG_IDE_XFER_MODE=n static inline versions of ide_set_pio() and ide_set_xfer_rate(). * Make IDE_TIMINGS and BLK_DEV_IDEDMA config options select IDE_XFER_MODE, also add explicit selects for few host drivers that need it. * Build/link ide-xfer-mode.o and ide-pio-blacklist.o (it is needed only by ide-xfer-mode.o) only if CONFIG_IDE_XFER_MODE=y. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: move device settings code to ide-devsets.cBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | Remove stale comment from ide.c while at it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: move ide_do_park_unpark() to ide-park.cBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: factor out processing of special commands from ide_special_rq()Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | | | | | Factor out processing of special commands from ide_special_rq() to ide_do_devset() and ide_do_park_unpark(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: remove ide_do_drive_cmd()Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | | | | | | | | | * Use elv_add_request() instead of __elv_add_request() in ide_do_drive_cmd(). * ide_do_drive_cmd() is used only in ide-{atapi,cd}.c so inline it there. There should be no functional changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: move ide_dma_timeout_retry() to ide-dma.cBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | | | Move ide_dma_timeout_retry() to ide-dma.c and add static inline version for CONFIG_BLK_DEV_IDEDMA=n. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: move drive_is_ready() to ide-io.cBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | | | | | Move drive_is_ready() to ide-io.c, then make it static. Also make some minor CodingStyle fixups while at it. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: unexport ide_devset_execute()Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | There are no modular ide_devset_execute() users left so unexport it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: remove stale comments from drive_is_ready()Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide-acpi: remove taskfile_load_raw()Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | * taskfile_load_raw() is used only by do_drive_set_taskfiles() so inline it there. While at it: - rename 'args' variable to 'task' - remove struct taskfile_array - do ide_acpigtf check early - use REGS_PER_GTF Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide-acpi: cleanup do_drive_set_taskfiles()Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * ide_noacpi is already checked by ide_acpi_exec_tfs() which is the only user of do_drive_set_taskfiles(). * ide_acpi_exec_tfs() prints sufficient debug info about the device so no need to do it again. * do_drive_get_GTF() + ide_acpi_exec_tfs() make sure that this function will never be called with incorrect gtf_length argument or if device is not present. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide-acpi: cleanup do_drive_get_GTF()Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * ide_noacpi is already checked by ide_acpi_exec_tfs() which is the only user of do_drive_get_GTF(). * ide_acpi_exec_tfs() prints sufficient debug info about the device so no need to have excessive data about port/host. * It is sufficient to check for drive->acpidata->obj_handle as it will be NULL if dev == NULL or hwif->acpidata == NULL or device is not present. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: sanitize ACPI initializationBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | | | | | | | | | * ide_acpi_init() -> ide_acpi_init_port() * ide_acpi_blacklist() -> ide_acpi_init() * Call ide_acpi_init() only once (do it during IDE core initialization) and cleanup the function accordingly. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: add ide_for_each_present_dev() iteratorBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | | | | | | | * Add ide_for_each_present_dev() iterator and convert IDE code to use it. * Do some drive-by CodingStyle fixups in ide-acpi.c while at it. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide-acpi: init ACPI handles early for devicesBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | Init ACPI handles for devices in ide_acpi_port_init_devices() and remove no longer needed ide_acpi_drive_get_handle(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide-acpi: no need to zero ->acpidata for devicesBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | ide_acpi_init() takes care of it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: remove superfluous check from ide_proc_port_register_devices()Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: init_irq() doesn't need to hold ide_cfg_mtxBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: move ->lock and ->timer init from init_irq() to ide_init_port_data()Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: no need to touch local IRQs in ide_probe_port()Bartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove superfluous local_save_flags() local_irq_enable_in_hardirq() ... local_irq_restore() combo. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: move ide_pktcmd_tf_load() to ide-atapi.cBartlomiej Zolnierkiewicz2009-03-24
| | | | | | | | | | | | | | Then make it static and remove 'dma' argument. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | ide: fix IDE_DFLAG_NO_IO_32BIT handlingBartlomiej Zolnierkiewicz2009-03-24
|/ | | | | | | | | * IDE_DFLAG_NO_IO_32BIT may be set by cmd640's ->init_dev method so don't clear it in ide_port_tune_devices() (+ no need to do it). * Move IDE_DFLAG_NO_IO_32BIT handling to ide_port_init_devices(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: save the returned value of dma_map_sgFUJITA Tomonori2009-03-13
| | | | | | | | | | | | | dma_map_sg could return a value different to 'nents' argument of dma_map_sg so the ide stack needs to save it for the later usage (e.g. for_each_sg). The ide stack also needs to save the original sg_nents value for pci_unmap_sg. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> [bart: backport to Linus' tree] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: do not map dataless cmds to an sgBorislav Petkov2009-03-13
| | | | | | | | | since it fails the virt_to_page() translation check with DEBUG_VIRTUAL enabled. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> [bart: backport to Linus' tree] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add at91_ide driverStanislaw Gruszka2009-03-05
| | | | | | | | | | | | | | | This is IDE host driver for AT91 (SAM9, CAP9, AT572D940HF) Static Memory Controller with Compact Flash True IDE Mode logic. Driver have to switch 8/16 bit bus width when accessing Task Tile or Data Register. Moreover some extra things need to be done when setting PIO mode. Only PIO mode is used, hardware have no DMA support. If interrupt line is connected through GPIO extra quirk is needed to cope with fake interrupts. Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl> Cc: Andrew Victor <avictor.za@gmail.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: allow to wrap interrupt handlerStanislaw Gruszka2009-03-05
| | | | | | | Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl> Cc: Andrew Victor <linux@maxim.org.za> [bart: minor checkpatch.pl / CodingStyle fixups] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-iops: fix odd-length ATAPI PIO transfersSergei Shtylyov2009-03-05
| | | | | | | | | Commit 9567b349f7e7dd7e2483db99ee8e4a6fe0caca38 (ide: merge ->atapi_*put_bytes and ->ata_*put_data methods) introduced a regression WRT the odd-length ATAPI PIO transfers -- the final word didn't get written (causing command timeouts). Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: NULL noise: drivers/ide/ide-*.cHannes Eder2009-03-05
| | | | | | | | | | | | | | Fix this sparse warnings: drivers/ide/ide-disk_proc.c:130:11: warning: Using plain integer as NULL pointer drivers/ide/ide-floppy_proc.c:32:11: warning: Using plain integer as NULL pointer drivers/ide/ide-proc.c:234:11: warning: Using plain integer as NULL pointer drivers/ide/ide-tape.c:2141:11: warning: Using plain integer as NULL pointer Signed-off-by: Hannes Eder <hannes@hanneseder.net> Cc: trivial@kernel.org Cc: kernel-janitors@vger.kernel.org Cc: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: expiry() returns int, negative expiry() return values won't be noticedRoel Kluin2009-03-05
| | | | | | | | | | | | | | bart: It seems like the bug could cause insanely long timeouts for: - ATA_DMA_ERR error in dma_timer_expiry() - commands without ->expiry in tc86c001_timer_expiry() (TC86C001 IDE controller only) Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Andrew Morton <akpm@linux-foundation.org> [bart: port it to the current tree] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: fix refcounting in device driversBartlomiej Zolnierkiewicz2009-02-25
| | | | | | | | | | | | | | | | During host driver module removal del_gendisk() results in a final put on drive->gendev and freeing the drive by drive_release_dev(). Convert device drivers from using struct kref to use struct device so device driver's object holds reference on ->gendev and prevents drive from prematurely going away. Also fix ->remove methods to not erroneously drop reference on a host driver by using only put_device() instead of ide*_put(). Reported-by: Stanislaw Gruszka <stf_xl@wp.pl> Tested-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>