aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6Linus Torvalds2009-03-261-18/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (61 commits) Dynamic debug: fix pr_fmt() build error Dynamic debug: allow simple quoting of words dynamic debug: update docs dynamic debug: combine dprintk and dynamic printk sysfs: fix some bin_vm_ops errors kobject: don't block for each kobject_uevent sysfs: only allow one scheduled removal callback per kobj Driver core: Fix device_move() vs. dpm list ordering, v2 Driver core: some cleanup on drivers/base/sys.c Driver core: implement uevent suppress in kobject vcs: hook sysfs devices into object lifetime instead of "binding" driver core: fix passing platform_data driver core: move platform_data into platform_device sysfs: don't block indefinitely for unmapped files. driver core: move knode_bus into private structure driver core: move knode_driver into private structure driver core: move klist_children into private structure driver core: create a private portion of struct device driver core: remove polling for driver_probe_done(v5) sysfs: reference sysfs_dirent from sysfs inodes ... Fixed conflicts in drivers/sh/maple/maple.c manually
| * platform driver: fix incorrect use of 'platform_bus_type' with 'struct ↵Ming Lei2009-03-241-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | device_driver' This patch fixes the bug reported in http://bugzilla.kernel.org/show_bug.cgi?id=11681. "Lots of device drivers register a 'struct device_driver' with the '.bus' member set to '&platform_bus_type'. This is wrong, since the platform_bus functions expect the 'struct device_driver' to be wrapped up in a 'struct platform_driver' which provides some additional callbacks (like suspend_late, resume_early). The effect may be that platform_suspend_late() uses bogus data outside the device_driver struct as a pointer pointer to the device driver's suspend_late() function or other hard to reproduce failures."(Lothar Wassmann) Signed-off-by: Ming Lei <tom.leiming@gmail.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | ide: use try_to_identify() in ide_driveid_update()Bartlomiej Zolnierkiewicz2009-03-242-62/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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-241-37/+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>
* | ide: remove pciirq argument from ide_pci_setup_ports()Bartlomiej Zolnierkiewicz2009-03-242-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | * 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-2417-24/+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-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-241-26/+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-247-34/+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>
* | ide: move error handling code to ide-eh.c (v2)Bartlomiej Zolnierkiewicz2009-03-244-426/+432
| | | | | | | | | | | | | | | | | | 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-244-242/+256
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-244-192/+192
| | | | | | | | | | | | 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-242-24/+25
| | | | | | | | | | 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-243-30/+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-242-57/+57
| | | | | | | | | | | | | | | | 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-242-25/+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-243-10/+6
| | | | | | | | | | | | | | | | | | | | | | * 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-243-48/+25
| | | | | | | | | | | | | | | | | | | | * 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>
* | ide: no need to touch local IRQs in ide_probe_port()Bartlomiej Zolnierkiewicz2009-03-241-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove superfluous local_save_flags() local_irq_enable_in_hardirq() ... local_irq_restore() combo. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>