summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide.c
Commit message (Collapse)AuthorAgeFilesLines
* ide: add ide_device_{get,put}() helpersBartlomiej Zolnierkiewicz2008-07-241-0/+47
| | | | | | | | | | | | * Add 'struct ide_host *host' field to ide_hwif_t and set it in ide_host_alloc_all(). * Add ide_device_{get,put}() helpers loosely based on SCSI's scsi_device_{get,put}() ones. * Convert IDE device drivers to use ide_device_{get,put}(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: small whitespace fixesPavel Machek2008-07-231-1/+1
| | | | | | | Small whitespace fixes for drivers/ide. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: allocate ide_hwif_t instances dynamicallyBartlomiej Zolnierkiewicz2008-07-231-5/+0
| | | | | | | | | | | | | | * Allocate ide_hwif_t instances dynamically and remove ide_hwifs[]. This cuts almost ~14kB from ide-probe.o (x86-32, MAX_HWIFS == 10): text data bss dec hex filename 9140 40 14084 23264 5ae0 drivers/ide/ide-probe.o.before 9169 40 44 9253 2425 drivers/ide/ide-probe.o.after * Remove no longer needed ide_init_port_data() call from ide_unregister(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move ide_remove_port_from_hwgroup() to ide-probe.cBartlomiej Zolnierkiewicz2008-07-231-35/+0
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add struct ide_host (take 3)Bartlomiej Zolnierkiewicz2008-07-231-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add struct ide_host which keeps pointers to host's ports. * Add ide_host_alloc[_all]() and ide_host_remove() helpers. * Pass 'struct ide_host *host' instead of 'u8 *idx' to ide_device_add[_all]() and rename it to ide_host_register[_all](). * Convert host drivers and core code to use struct ide_host. * Remove no longer needed ide_find_port(). * Make ide_find_port_slot() static. * Unexport ide_unregister(). v2: * Add missing 'struct ide_host *host' to macide.c. v3: * Fix build problem in pmac.c (s/ide_alloc_host/ide_host_alloc/) (Noticed by Stephen Rothwell). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add struct ide_tp_ops (take 2)Bartlomiej Zolnierkiewicz2008-07-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add struct ide_tp_ops for transport methods. * Add 'const struct ide_tp_ops *tp_ops' to struct ide_port_info and ide_hwif_t. * Set the default hwif->tp_ops in ide_init_port_data(). * Set host driver specific hwif->tp_ops in ide_init_port(). * Export ide_exec_command(), ide_read_status(), ide_read_altstatus(), ide_read_sff_dma_status(), ide_set_irq(), ide_tf_{load,read}() and ata_{in,out}put_data(). * Convert host drivers and core code to use struct ide_tp_ops. * Remove no longer needed default_hwif_transport(). * Cleanup ide_hwif_t from methods that are now in struct ide_tp_ops. While at it: * Use struct ide_port_info in falconide.c and q40ide.c. * Rename ata_{in,out}put_data() to ide_{in,out}put_data(). v2: * Fix missing convertion in ns87415.c. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add 'config' field to hw_regs_tBartlomiej Zolnierkiewicz2008-07-231-0/+1
| | | | | | | | | Add 'config' field to hw_regs_t and use it to set hwif->config_data in ide_init_port_hw(), then convert ide_legacy_init_one() to use hw->config. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove ->INB, ->OUTB and ->OUTBSYNC methodsBartlomiej Zolnierkiewicz2008-07-231-1/+0
| | | | | | | | | | | | | | * Remove no longer needed ->INB, ->OUTB and ->OUTBSYNC methods. Then: * Remove no longer used default_hwif_[mm]iops() and ide_[mm_]outbsync(). * Cleanup SuperIO handling in ns87415.c. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: pass hw_regs_t-s to ide_device_add[_all]() (take 3)Bartlomiej Zolnierkiewicz2008-07-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | * Add 'hw_regs_t **hws' argument to ide_device_add[_all]() and convert host drivers + ide_legacy_init_one() + ide_setup_pci_device[s]() to use it instead of calling ide_init_port_hw() directly. [ However if host has > 1 port we must still set hwif->chipset to hint consecutive ide_find_port() call that the previous slot is occupied. ] * Unexport ide_init_port_hw(). v2: * Use defines instead of hard-coded values in buddha.c, gayle.c and q40ide.c. (Suggested by Geert Uytterhoeven) * Better patch description. v3: * Fix build problem in ide-cs.c. (Noticed by Stephen Rothwell) There should be no functional changes caused by this patch. Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* IDE: Report errors during drive reset back to user spaceElias Oltmanns2008-07-161-4/+6
| | | | | | | | | | | | | Make sure that each error condition during the execution of an HDIO_DRIVE_RESET ioctl is actually reported to the calling process. Also, unify the exit path of reset_pollfunc() when returning ide_stopped since the need of ->port_ops->reset_poll() to be treated specially has vanished (way back, it seems). Signed-off-by: Elias Oltmanns <eo@nebensachen.de> Cc: "Alan Cox" <alan@lxorguk.ukuu.org.uk> Cc: "Randy Dunlap" <randy.dunlap@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* IDE: Fix HDIO_DRIVE_RESET handlingElias Oltmanns2008-07-161-26/+15
| | | | | | | | | | | | | Currently, the code path executing an HDIO_DRIVE_RESET ioctl is broken in various ways. Most importantly, it is treated as an out of band request in an illegal way which may very likely lead to system lock ups. Use the drive's request queue to avoid this problem (and fix a locking issue for free along the way). Signed-off-by: Elias Oltmanns <eo@nebensachen.de> Cc: "Alan Cox" <alan@lxorguk.ukuu.org.uk> Cc: "Randy Dunlap" <randy.dunlap@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove needless includes from ide.cBartlomiej Zolnierkiewicz2008-07-161-13/+0
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: set hwif->dev in ide_init_port_hw() (take 2)Bartlomiej Zolnierkiewicz2008-07-161-1/+2
| | | | | | | | | | | | | | | * Add 'parent' field to hw_regs_t for optional parent device pointer (needed by macio PMAC IDE controllers) and set hwif->dev in ide_init_port_hw(). * Update au1xxx-ide.c, sgiioc4.c, pmac.c and setup-pci.c accordingly. v2: * Update scc_pata.c. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: make ide_hwifs[] staticBartlomiej Zolnierkiewicz2008-07-161-2/+0
| | | | | | Move ide_hwifs[] from ide.c to ide-probe.c and make it static. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: fix hwif-s initializationBartlomiej Zolnierkiewicz2008-07-161-15/+0
| | | | | | | | | | | * Add ide_hwifs[] entry initialization to ide_find_port_slot() and remove ide_init_port_data() calls from host drivers. * Unexport ide_init_port_data(). * Remove no longer needed init_ide_data(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove drive->ctlBartlomiej Zolnierkiewicz2008-07-151-1/+0
| | | | | | | | | | | | Remove drive->ctl (it is always equal to 0x08 after init time). While at it: * Use ATA_DEVCTL_OBS define. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove obsoleted "ide=" kernel parametersBartlomiej Zolnierkiewicz2008-07-151-86/+5
| | | | | | | | | | | | | | | | * Remove obsoleted "ide=" kernel parameters. * Remove no longer needed: - ide_setup() - parse_options() - __setup("", ...) - module_param(options, ...) * Use module_{init,exit}() for MODULE=y case and remove MODULE ifdef. * Make ide_*acpi* and ide_doubler variables static. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: cleanup init_ide_data()Bartlomiej Zolnierkiewicz2008-07-151-24/+0
| | | | | | | | * Remove no longer need init_ide_data() call from ide_setup(). * Cleanup init_ide_data(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove obsoleted "hdx=" kernel parametersBartlomiej Zolnierkiewicz2008-07-151-138/+1
| | | | | | | | * Remove obsoleted "hdx=" kernel parameters. * Remove no longer used stridx() and match_parm(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove obsoleted "idebus=" kernel parameterBartlomiej Zolnierkiewicz2008-07-151-70/+1
| | | | | | | | | * Remove obsoleted "idebus=" kernel parameter. * Remove no longer needed ide_system_bus_speed() and system_bus_clock() (together with idebus_parameter and system_bus_speed variables). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: convert ide_do_drive_cmd path to use blk_execute_rqFUJITA Tomonori2008-07-151-17/+22
| | | | | | | | | | This converts the ide_do_drive_cmd path using ide_[head_]wait to use blk_execute_rq. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Borislav Petkov <petkovbb@gmail.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: set REQ_PREEMPT request flag in ide_do_drive_cmd() usersBartlomiej Zolnierkiewicz2008-07-151-0/+1
| | | | | | | | | | | | | | | | | | | | * Set REQ_PREEMPT request flag in ide_do_drive_cmd() users for ide_preempt and ide_head_wait action types. * Remove setting REQ_PREEMPT from ide_do_drive_cmd(). While at it: * Set 'where' variable outside ide_lock. This is a preparation for converting IDE to use blk_execute_rq(). There should be no functional changes caused by this patch. Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Borislav Petkov <petkovbb@gmail.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: ide_unregister() locking bugfixBartlomiej Zolnierkiewicz2008-07-051-2/+2
| | | | | | | Holding ide_lock for ide_release_dma_engine() call is unnecessary and triggers WARN_ON(irqs_disabled()) in dma_free_coherent(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: ide_unregister() warm-plug bugfixBartlomiej Zolnierkiewicz2008-07-051-6/+6
| | | | | | Fix ide_unregister() to work for ports with no devices attached to them. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: fix hwif->gendev refcountingBartlomiej Zolnierkiewicz2008-07-051-8/+0
| | | | | | | | | | | | | | | | | | class->dev_release is called by device_release() iff dev->release is not present so ide_port_class_release() is never called and the last hwif->gendev reference is not dropped. Fix it by removing ide_port_class_release() and get_device() call from ide_register_port() (device_create_drvdata() takes a hwif->gendev reference anyway). This patch fixes hang on wait_for_completion(&hwif->gendev_rel_comp) in ide_unregister() reported by Pavel Machek. Cc: Pavel Machek <pavel@suse.cz> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Greg KH <greg@kroah.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: use blk_rq_init() to initialize the requestFUJITA Tomonori2008-04-291-2/+2
| | | | | | | | | | | | | This converts ide to use blk_rq_init to initialize the request. This is a preparation for large command support, which needs to initialize the request in a proper way (that is, just doing a memset() will not work). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* ide: add struct ide_io_ports (take 3)Bartlomiej Zolnierkiewicz2008-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | * Add struct ide_io_ports and use it instead of `unsigned long io_ports[]` in ide_hwif_t. * Rename io_ports[] in hw_regs_t to io_ports_array[]. * Use un-named union for 'unsigned long io_ports_array[]' and 'struct ide_io_ports io_ports' in hw_regs_t. * Remove IDE_*_OFFSET defines. v2: * scc_pata.c build fix from Stephen Rothwell. v3: * Fix ctl_adrr typo in Sparc-specific part of ns87415.c. (Noticed by Andrew Morton) Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: make ide_unregister() take 'ide_hwif_t *' as an argument (take 2)Bartlomiej Zolnierkiewicz2008-04-271-7/+4
| | | | | | | | | | | | | | | | | * Make ide_unregister() take 'ide_hwif_t *hwif' instead of 'unsigned int index' (hwif->index) as an argument and update all users accordingly. While at it: * Remove unnecessary checks for hwif != NULL from ide-pnp.c::idepnp_remove() and delkin_cb.c::delkin_cb_remove(). * Remove needless hwif->chipset assignment from scc_pata.c::scc_remove(). v2: * Fixup ide_unregister() documentation. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: sanitize ide_unregister() usageBartlomiej Zolnierkiewicz2008-04-271-5/+0
| | | | | | | | | | | * Remove ide_unregister() call from ide_exit() (host drivers take care of unregistering hwif-s themselves). * Remove ide_unregister() call from probe methods of bast-ide, palm_bk3710, ide-cs and delkin_cb host drivers (ide_find_port() returns only free ide_hwifs[] entries). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add "noacpi" / "acpigtf" / "acpionboot" parametersBartlomiej Zolnierkiewicz2008-04-271-11/+5
| | | | | | | | | | | | * Rename ide_noacpi{tfs,onboot} to ide_acpi{gtf,onboot} (+ reverse logic). * Move ide_*acpi* variables to ide-acpi.c and remove unnecessary initializers. * Add "noacpi" / "acpigtf" / "acpionboot" parameters. * Obsolete "ide=noacpi" / "ide=acpigtf" / "ide=acpionboot" kernel parameters. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* gayle: add "doubler" parameterBartlomiej Zolnierkiewicz2008-04-271-1/+1
| | | | | | | | | * Add "doubler" parameter to enable support for IDE doublers. * Obsolete "ide=doubler" kernel parameter. Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add "cdrom=" and "chs=" parametersBartlomiej Zolnierkiewicz2008-04-271-5/+66
| | | | | | | | * Add "cdrom=" and "chs=" parameters. * Obsolete "hdx=cdrom" and "hdx=cyls,heads,sects" kernel parameters. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add "nodma|noflush|noprobe|nowerr=" parametersBartlomiej Zolnierkiewicz2008-04-271-4/+75
| | | | | | | | * Add "nodma|noflush|noprobe|nowerr=" parameters. * Obsolete "hdx=noprobe|none|nowerr|nodma|noflush" kernel parameters. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove obsoleted "hdx=autotune" kernel parameterBartlomiej Zolnierkiewicz2008-04-271-4/+1
| | | | | | | | | * Remove obsoleted "hdx=autotune" kernel parameter (we always auto-tune PIO if possible nowadays). * Remove no longer needed ide_drive_t.autotune flag. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: mark "idebus=" kernel parameter as obsoleted (take 2)Bartlomiej Zolnierkiewicz2008-04-271-1/+1
| | | | | | | We have "vlb|pci_clock=" parameters now. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add "vlb|pci_clock=" parameterBartlomiej Zolnierkiewicz2008-04-271-0/+12
| | | | | | | | | | | | | | * Add "vlb_clock=" parameter for specifying VLB clock frequency (in MHz). * Add "pci_clock=" parameter for specifying PCI bus clock frequency (in MHz). While at it: * qd65xx.c: rename {active,recovery}_cycle variables to {act,rec}_cyc. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove obsoleted "hdx=noautotune" kernel parameterBartlomiej Zolnierkiewicz2008-04-271-5/+2
| | | | | | | | | | Remove obsoleted "hdx=noautotune" kernel parameter (it has been obsoleted since 1 Nov 2004). Then make ide_hwif_t.autotune a single bit flag and remove no longer needed IDE_TUNE_* defines. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove obsoleted "idex=" kernel parametersBartlomiej Zolnierkiewicz2008-04-271-114/+1
| | | | | | | | | * Remove obsoleted "idex=" kernel parameters. * Make probe_* and cmd640_vlb variables static. Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove obsoleted "idex=reset" kernel parameterBartlomiej Zolnierkiewicz2008-04-271-4/+2
| | | | | | | | | | Remove obsoleted "idex=reset" kernel parameter (it has been obsoleted since 1 Nov 2004). Then remove corresponding code from ide_probe_port() and no longer used ->reset field from ide_hwif_t. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove obsoleted "idex=serialize" kernel parameterBartlomiej Zolnierkiewicz2008-04-271-7/+2
| | | | | | | Remove obsoleted "idex=serialize" kernel parameter (it has been obsoleted since 1 Nov 2004). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add "ignore_cable" parameter (take 2)Bartlomiej Zolnierkiewicz2008-04-271-0/+32
| | | | | | | | | | | | | | | | | | | | | Add "ignore_cable" parameter: * "ide_core.ignore_cable=[interface_number]" boot option if IDE is built-in (i.e. "ide_core.ignore_cable=1" to force ignoring cable for "ide1") * "ignore_cable=[interface_number]" module parameter (for ide_core module) if IDE is compiled as module v2: * Add ide_port_apply_params() helper - use it in ide_device_add_all() and ide_scan_port(). * Make it possible to later disable ignoring cable detection by passing "[interface_number]:0" to /sys/module/ide_core/parameters/ignore_cable (however sysfs interface is not enabled yet since it needs some other IDE changes to make it work reliable). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add struct ide_dma_ops (take 3)Bartlomiej Zolnierkiewicz2008-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add struct ide_dma_ops and convert core code + drivers to use it. While at it: * Drop "ide_" prefix from ->ide_dma_end and ->ide_dma_test_irq methods. * Drop "ide_" "infixes" from DMA methods. * au1xxx-ide.c: - use auide_dma_{test_irq,end}() directly in auide_dma_timeout() * pdc202xx_old.c: - drop "old_" "infixes" from DMA methods * siimage.c: - add siimage_dma_test_irq() helper - print SATA warning in siimage_init_one() * Remove no longer needed ->init_hwif implementations. v2: * Changes based on review from Sergei: - s/siimage_ide_dma_test_irq/siimage_dma_test_irq/ - s/drive->hwif/hwif/ in idefloppy_pc_intr(). - fix patch description w.r.t. au1xxx-ide changes - fix au1xxx-ide build - fix naming for cmd64*_dma_ops - drop "ide_" and "old_" infixes - s/hpt3xxx_dma_ops/hpt37x_dma_ops/ - s/hpt370x_dma_ops/hpt370_dma_ops/ - use correct DMA ops for HPT302/N, HPT371/N and HPT374 - s/it821x_smart_dma_ops/it821x_pass_through_dma_ops/ v3: * Two bugs slipped in v2 (noticed by Sergei): - use correct DMA ops for HPT374 (for real this time) - handle HPT370/HPT370A properly Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove ide_hwif_request_regions()Bartlomiej Zolnierkiewicz2008-04-261-50/+0
| | | | | | Remove no longer used ide_hwif_request_regions() and hwif_request_region(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: manage resources for PCI devices in ide_pci_enable() (take 3)Bartlomiej Zolnierkiewicz2008-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | * Reserve PCI BARs 0-3 (0-1 for single port controllers) in ide_pci_enable() and remove ide_hwif_request_regions() call from ide_device_add_all() (also cleanup resource management in scc_pata host driver). * Fix handling of PCI BAR 4 in ide_pci_enable(), then cleanup ide_iomio_dma() (+ init_hwif_trm290() in trm290 host driver) and remove ide_release[_iomio]_dma(). v2: * Fixup trm290 host driver. v3: * Because of scc_pata host driver changes we need to call pci_request_selected_regions() also in setup_mmio_scc(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove ide_hwif_release_regions()Bartlomiej Zolnierkiewicz2008-04-261-25/+0
| | | | | | | | | All host drivers using ide_unregister()/module_exit() have been fixed to manage resources themselves so this function can be removed now. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove ->noprobe field from ide_hwif_tBartlomiej Zolnierkiewicz2008-04-261-4/+0
| | | | | | | | | | Update IDE PMAC host driver to use drive->noprobe instead of hwif->noprobe and remove hwif->noprobe completely (it is always set to zero now). There should be no functional changes caused by this patch. Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add struct ide_port_ops (take 2)Bartlomiej Zolnierkiewicz2008-04-261-1/+2
| | | | | | | | | | | | | | | | | | | | | * Move hooks for port/host specific methods from ide_hwif_t to 'struct ide_port_ops'. * Add 'const struct ide_port_ops *port_ops' to 'struct ide_port_info' and ide_hwif_t. * Update host drivers and core code accordingly. While at it: * Rename ata66_*() cable detect functions to *_cable_detect() to match the standard naming. (Suggested by Sergei Shtylyov) v2: * Fix build for bast-ide. (Noticed by Andrew Morton) Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: sanitize handling of IDE_HFLAG_NO_SET_MODE host flagBartlomiej Zolnierkiewicz2008-04-261-1/+3
| | | | | | | | | | | | | | * Check for IDE_HFLAG_NO_SET_MODE host flag in ide_set_pio(), ide_set_[pio,dma]_mode(), ide_set_xfer_rate() and set_pio_mode(). * Remove no longer needed IDE_HFLAG_NO_SET_MODE host flag checking from ide_tune_dma(). * Remove superfluous ->set_pio_mode checking from do_special(). This is a part of preparations for adding 'struct ide_port_ops'. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove hwif->straight8 flagBartlomiej Zolnierkiewicz2008-04-261-25/+11
| | | | | | | | All host drivers now either set hwif->mmio or reserve continuous I/O resources so remove no longer needed hwif->straight8 flag and never reached code for 'hwif->straight8 == 0' case. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: unexport ide_hwifs[]Bartlomiej Zolnierkiewicz2008-04-261-5/+0
| | | | | | All modular users have been fixed to not reference ide_hwifs[] directly. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
OpenPOWER on IntegriCloud