summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ide: use try_to_identify() in ide_driveid_update()Bartlomiej Zolnierkiewicz2009-03-243-62/+18
| | | | | | | | | | | | | * Pass pointer to buffer for IDENTIFY data to do_identify() and try_to_identify(). * Un-static try_to_identify() and use it in ide_driveid_update(). * Rename try_to_identify() to ide_dev_read_id(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: clear drive IRQ after re-enabling local IRQs in ide_driveid_update()Bartlomiej Zolnierkiewicz2009-03-241-2/+2
| | | | | | | | | Clear drive IRQ after re-enabling local IRQs in ide_driveid_update() to match try_to_identify(). Also remove superfluous local_irq_enable() call while at it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: sanitize SELECT_MASK() usage in ide_driveid_update()Bartlomiej Zolnierkiewicz2009-03-241-1/+3
| | | | | | Call SELECT_MASK() after ide_fix_driveid(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: classify device type in do_probe()Bartlomiej Zolnierkiewicz2009-03-241-13/+13
| | | | | | | | Defer classifying device type from do_identify() to do_probe(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove broken EXABYTENEST supportBartlomiej Zolnierkiewicz2009-03-242-39/+0
| | | | | | | | | | do_identify() marks EXABYTENEST device as non-present and frees drive->id so enable_nest() has absolutely no chance of working. The code was like this since at least 2.6.12-rc2 and nobody has noticed so just remove broken EXABYTENEST support. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: shorten timeout value in ide_driveid_update()Bartlomiej Zolnierkiewicz2009-03-241-1/+1
| | | | | | | Shorten timeout value in ide_driveid_update() (30s -> 15s) to match try_to_identify(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: propagate AltStatus workarounds to ide_driveid_update()Bartlomiej Zolnierkiewicz2009-03-241-3/+18
| | | | | | | Propagate AltStatus workarounds from try_to_identify() to ide_driveid_update(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: fix kmalloc() failure handling in ide_driveid_update()Bartlomiej Zolnierkiewicz2009-03-241-13/+20
| | | | | | | | | | | | | | | * Doing kmalloc() in the middle of command execution is not only ugly but leaves drive waiting to send data on kmalloc() failure. Fix it. While at it: * Unify error code paths. * Fixup error message to be more useful and add missing KERN_ERR level. * Rename 'stat' variable to 's'. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* mn10300: remove <asm/ide.h>Bartlomiej Zolnierkiewicz2009-03-242-42/+2
| | | | | | | | | | | | | | | | | | | | * Remove superfluous <asm/intctl-regs.h> include. * Remove no longer used SUPPORT_SLOW_DATA_PORTS define. * Move defining SUPPORT_VLB_SYNC to <linux/ide.h>. * Use __ide_mm_*() macros from <asm-generic/ide_iops.h> (MN10300 uses only memory-mapped I/O). * Remove <asm/ide.h>. While at it: * Remove superfluous SPARC64 #ifdef from <linux/ide.h>. Cc: David Howells <dhowells@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* frv: remove <asm/ide.h>Bartlomiej Zolnierkiewicz2009-03-242-26/+2
| | | | | | | | | * Remove superfluous <asm/{setup,io,irq}.h> includes. * Remove <asm/ide.h>. Cc: David Howells <dhowells@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove pciirq argument from ide_pci_setup_ports()Bartlomiej Zolnierkiewicz2009-03-243-10/+8
| | | | | | | | | | | | * 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-2418-26/+26
| | | | | | | | | | | | * 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-241-25/+9
| | | | | | 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-241-43/+7
| | | | | | | 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-242-41/+4
| | | | | | 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-241-10/+0
| | | | | | | | 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-248-38/+6
| | | | | | 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-241-10/+6
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: use pci_get_legacy_ide_irq() in ide_pci_init_{one,two}()Bartlomiej Zolnierkiewicz2009-03-241-4/+4
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: handle IDE_HFLAG[_FORCE]_LEGACY_IRQS in ide_pci_init_{one,two}()Bartlomiej Zolnierkiewicz2009-03-242-4/+12
| | | | | | | | | 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-241-3/+0
| | | | | | | | 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-241-2/+0
| | | | | | | | 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-241-1/+1
| | | | | | | 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-241-1/+1
| | | | | | | 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>
* mn10300: add pci_get_legacy_ide_irq() to <asm/pci.h>Bartlomiej Zolnierkiewicz2009-03-241-0/+5
| | | | | | | | Add missing pci_get_legacy_ide_irq() implementation before it becomes required by core IDE PCI code. Cc: David Howells <dhowells@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move error handling code to ide-eh.c (v2)Bartlomiej Zolnierkiewicz2009-03-245-431/+440
| | | | | | | | | 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-241-25/+23
| | | | | | | | | | | 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-241-6/+3
| | | | | 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-241-4/+5
| | | | | 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-243-314/+318
| | | | | 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-242-15/+15
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move xfer mode tuning code to ide-xfer-mode.cBartlomiej Zolnierkiewicz2009-03-245-247/+263
| | | | | | | | | | | | | | | | | | * 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-245-192/+193
| | | | | | 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-243-24/+27
| | | | | 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-241-34/+41
| | | | | | | | | 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-244-32/+7
| | | | | | | | | | | * 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-243-57/+59
| | | | | | | | 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-243-27/+23
| | | | | | | | | 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-241-1/+0
| | | | | | 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-241-9/+0
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-acpi: remove taskfile_load_raw()Bartlomiej Zolnierkiewicz2009-03-241-47/+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-241-20/+1
| | | | | | | | | | | | | | * 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-241-27/+0
| | | | | | | | | | | | | | * 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-244-12/+10
| | | | | | | | | | | * 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-244-48/+29
| | | | | | | | | | * 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-241-44/+21
| | | | | | | 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-241-2/+0
| | | | | | 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-241-1/+1
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: init_irq() doesn't need to hold ide_cfg_mtxBartlomiej Zolnierkiewicz2009-03-241-4/+0
| | | | 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-241-5/+6
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
OpenPOWER on IntegriCloud