aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/siimage.c
AgeCommit message (Collapse)AuthorFilesLines
2008-10-21ide: remove useless subdirs from drivers/ide/Bartlomiej Zolnierkiewicz1-857/+0
Suggested-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13ide: __ide_dma_end() -> ide_dma_end()Bartlomiej Zolnierkiewicz1-1/+1
While at it: - use EXPORT_SYMBOL_GPL() to match the rest of SFF DMA functions Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13ide: use unique names for struct pci_driver instancesBartlomiej Zolnierkiewicz1-3/+3
Noticed-by: Russell King <rmk+lkml@arm.linux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-13ide: use 'drive->dn & 1' instead of drive->select.b.unitBartlomiej Zolnierkiewicz1-4/+5
* Call ide_port_init_devices() in ide_host_register() also if 'struct ide_port_info *d' is not available. * Init drive->dn in ide_port_init_devices() instead of ide_probe_port() so it is valid also in ->init_dev. * Pass device number to ide_dev_apply_params(). * Use 'drive->dn & 1' instead of drive->select.b.unit. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-10ide: add proper PCI PM support (v2)Bartlomiej Zolnierkiewicz1-1/+3
* Keep pointer to ->init_chipset method also in struct ide_host and set it in ide_host_alloc_all(). * Add ide_pci_suspend() and ide_pci_resume() helpers (default ->suspend and ->resume implementations). * ->init_chipset can no longer be marked __devinit. * Add proper PCI PM support to IDE PCI host drivers (rz1000.c and tc86c001.c are skipped for now since they need to be converted from using ->init_hwif to use ->init_chipset instead). v2: * Cleanup CONFIG_PM #ifdef-s per akpm's suggestion. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-10ide: include <linux/hdreg.h> only when neededBartlomiej Zolnierkiewicz1-1/+0
* Include <linux/ata.h> directly in <linux/ide.h> instead of through <linux/hdreg.h>. * Include <linux/hdreg.h> only when needed. Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-10-10ide: check drive->present in ide_get_paired_drive()Bartlomiej Zolnierkiewicz1-2/+2
* Change ide_get_paired_drive() to return NULL if peer device is not present and update all users accordingly. While at it: * ide_get_paired_drive() -> ide_get_pair_dev() * Use ide_get_pair_dev() in cs5530.c, sc1200.c and via82cxxx.c. 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>
2008-10-10ide: make drive->id an union (take 2)Bartlomiej Zolnierkiewicz1-3/+5
Make drive->id an unnamed union so id can be accessed either by using 'u16 *id' or 'struct hd_driveid *driveid'. Then convert all existing drive->id users accordingly (using 'u16 *id' when possible). This is an intermediate step to make ide 'struct hd_driveid'-free. While at it: - Add missing KERN_CONTs in it821x.c. - Use ATA_ID_WORDS and ATA_ID_*_LEN defines. - Remove unnecessary checks for drive->id. - s/drive_table/table/ in ide_in_drive_list(). - Cleanup ide_config_drive_speed() a bit. - s/drive1/dev1/ & s/drive0/dev0/ in ide_undecoded_slave(). v2: Fix typo in drivers/ide/ppc/pmac.c. (From Stephen Rothwell) There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-08-18drivers/ide/pci/: use __devexit_p()Adrian Bunk1-1/+1
This patch adds missing __devexit_p's. Reported-by: Russell King <rmk+lkml@arm.linux.org.uk> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-08-05ide: ->cable_detect method cannot be marked __devinitBartlomiej Zolnierkiewicz1-1/+1
Now that we have warm-plug support ->cable_detect method no longer can be be marked __devinit. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-08-05ide: ->quirkproc method cannot be marked __devinitBartlomiej Zolnierkiewicz1-1/+1
Now that we have warm-plug support ->quirkproc method no longer can be be marked __devinit. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-07-24ide: drop 'name' parameter from ->init_chipset methodBartlomiej Zolnierkiewicz1-5/+3
There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-07-24ide: prefix messages from IDE PCI host drivers by driver nameBartlomiej Zolnierkiewicz1-8/+9
Prefix messages from IDE PCI host drivers by driver name instead of marketed chipset name (it is still possible to exactly identify the particular chipset basing on driver messages). As a bonus this provides nice code savings for some drivers: text data bss dec hex filename 3826 112 8 3946 f6a drivers/ide/pci/amd74xx.o.before 2786 112 8 2906 b5a drivers/ide/pci/amd74xx.o.after 764 108 0 872 368 drivers/ide/pci/cs5520.o.before 680 108 0 788 314 drivers/ide/pci/cs5520.o.after 1680 112 4 1796 704 drivers/ide/pci/generic.o.before 1155 112 4 1271 4f7 drivers/ide/pci/generic.o.after 7128 792 0 7920 1ef0 drivers/ide/pci/hpt366.o.before 6984 792 0 7776 1e60 drivers/ide/pci/hpt366.o.after 2800 148 0 2948 b84 drivers/ide/pci/pdc202xx_new.o.before 2523 148 0 2671 a6f drivers/ide/pci/pdc202xx_new.o.after 2831 148 0 2979 ba3 drivers/ide/pci/pdc202xx_old.o.before 2683 148 0 2831 b0f drivers/ide/pci/pdc202xx_old.o.after 3776 112 4 3892 f34 drivers/ide/pci/piix.o.before 2804 112 4 2920 b68 drivers/ide/pci/piix.o.after 4693 116 0 4809 12c9 drivers/ide/pci/siimage.o.before 4600 116 0 4716 126c drivers/ide/pci/siimage.o.after Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-07-24ide: include PCI device name in messages from IDE PCI host driversBartlomiej Zolnierkiewicz1-3/+4
While at it: * Apply small fixes to messages (s/dma/DMA/, remove trailing '.', etc). * Fix printk() call in ide_setup_pci_baseregs() to use KERN_INFO. * Move printk() call from ide_pci_clear_simplex() to the caller. * Cleanup do_ide_setup_pci_device() a bit. * amd74xx.c: remove superfluous PCI device revision information. * hpt366.c: fix two printk() calls in ->init_chipset to use KERN_INFO. * pdc202xx_new.c: fix printk() call in ->init_chipset to use KERN_INFO. * pdc202xx_old.c: fix driver message in pdc202xx_init_one(). * via82cxxx.c: fix driver warning message in via_init_one(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-07-24siimage: add ->remove method and module_exit()Bartlomiej Zolnierkiewicz1-0/+25
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-07-24siimage: convert to use ->host_privBartlomiej Zolnierkiewicz1-56/+58
While at it: * Reserve PCI BAR 5 in siimage_init_one() and remove no longer needed setup_mmio_siimage(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-07-24ide: add ->dev and ->host_priv fields to struct ide_hostBartlomiej Zolnierkiewicz1-1/+1
* Add 'struct device *dev[2]' and 'void *host_priv' fields to struct ide_host. * Set ->dev[] in ide_host_alloc_all()/ide_setup_pci_device[s](). * Pass 'void *priv' argument to ide_setup_pci_device[s]() and use it to set ->host_priv. * Set PCI dev's ->driver_data to point to the struct ide_host instance if PCI host driver wants to use ->host_priv. * Rename ide_setup_pci_device[s]() to ide_pci_init_{one,two}(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-07-23ide: remove ->INB, ->OUTB and ->OUTBSYNC methodsBartlomiej Zolnierkiewicz1-1/+1
* 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>
2008-07-23ide: remove ->dma_{status,command} fields from ide_hwif_tBartlomiej Zolnierkiewicz1-2/+2
* Use ->dma_base + offset instead of ->dma_{status,command} and remove no longer needed ->dma_{status,command}. While at it: * Use ATA_DMA_* defines. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-07-16IDE: Report errors during drive reset back to user spaceElias Oltmanns1-2/+1
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>
2008-07-15ide: remove ->mmio flag from ide_hwif_tBartlomiej Zolnierkiewicz1-12/+13
Since scc_pata host driver no longer uses IDE PCI layer / ide_dma_setup() and all other ->mmio users set also IDE_HFLAG_MMIO host flag we can safely remove ->mmio flag. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-29ide: fix crash at boot with siimage driverBenjamin Herrenschmidt1-1/+8
Some change to the IDE layer are causing the siimage driver to crash at boot with a NULL dereference. This is due to the sil_dma_ops not containing all the necessary pointers. I suppose it used to just "override" the defaults while now, it needs to contain everything. [bart: while at it: sil_dma_ops should be const now (pointed out by Sergei)] Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>, Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28siimage: coding style cleanup (take 2)Sergei Shtylyov1-119/+113
Fix 18 errors and several warnings given by checkpatch.pl: - use of C99 // comments; - trailing whitespace; - 'switch' and 'case' not at the same indentation level; - no space before the open parenthesis of the 'if' and 'switch' statements; - space between function name and open parenthesis (though I have introduced such warnins in some places since the code looks prettier with the spaces); - including <asm/io.h> instead of <linux/io.h>; - line over 80 characters. In addition to these changes, also do the following: - make the arrays in sil_set_pio_mode() 'static', and make the arrays in sil_set_dma_mode() 'static const'; - change the string of the 'if' statements into the 'switch' statement in sil_pata_udma_filter(); - drop the needless '==' operators from the 'if' statements where a condition is a mere bit test; - remove needless initializer for the 'tmp' variable in init_chipset_siimage(); - beautify groups of the variable initializers and assignment operators; - add new line after variable definitions; - remove new line between the comment and the statements it refers to; - remove needless curly braces and parentheses; - fix typos, capitalize acronyms, etc. in the comments... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28siimage: remove proc_reports_siimage()Bartlomiej Zolnierkiewicz1-25/+8
* proc_reports_siimage() is now only called by init_chipset_siimage() so inline it there. * Use array instead of switch statement for reporting clock modes. 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>
2008-04-28siimage: add sil_* I/O opsBartlomiej Zolnierkiewicz1-159/+140
Add sil_iowrite{8,16,32}() and sil_ioread{8,16}() helpers, then use them to merge code accessing configuration registers through PCI and MMIO together. [ because of this SATA initialization bits from setup_mmio_siimage() are moved to init_chipset_siimage() ] This also cuts code size a bit: text data bss dec hex filename 4437 164 0 4601 11f9 drivers/ide/pci/siimage.o.before 3979 164 0 4143 102f drivers/ide/pci/siimage.o.after While at it: * Use I/O ops directly instead of using ->IN{B,W} and ->OUT{B,W}. * Fixup CodingStyle in setup_mmio_siimage(). * Rename 'tmpbyte' variable to 'tmp' in init_chipset_siimage(). 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>
2008-04-28siimage: do clocking register posting earlier in setup_mmio_siimage()Bartlomiej Zolnierkiewicz1-3/+3
Do clocking register posting earlier in setup_mmio_siimage() to match code in init_chipset_siimage(). This is a preparation for the next patch which merges PCI and MMIO code paths together. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-28ide: add IDE_HFLAG_MMIO host flag (take 2)Bartlomiej Zolnierkiewicz1-0/+1
* Add IDE_HFLAG_MMIO host flag and set it for hosts which use default_hwif_mmiops(). v2: * Fix kernel panic in pmac host driver (',' should be '|'). Thanks to Kamalesh for reporting it + testing the fix and to Andrew for hinting me about the source of the issue. Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide: add struct ide_io_ports (take 3)Bartlomiej Zolnierkiewicz1-15/+12
* 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>
2008-04-26ide: add struct ide_dma_ops (take 3)Bartlomiej Zolnierkiewicz1-41/+35
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>
2008-04-26ide: replace remaining __FUNCTION__ occurrencesHarvey Harrison1-1/+1
__FUNCTION__ is gcc-specific, use __func__ [bart: fix checkpatch.pl errors in ide-lib.c and ppc/mpc8xx.c while at it] Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide: add struct ide_port_ops (take 2)Bartlomiej Zolnierkiewicz1-18/+26
* 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>
2008-04-26ide: IDE_HFLAG_BOOTABLE -> IDE_HFLAG_NON_BOOTABLEBartlomiej Zolnierkiewicz1-1/+0
"bootable" should be the default behavior so replace IDE_HFLAG_BOOTABLE host flag with IDE_HFLAG_NON_BOOTABLE. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-18ide: remove dead/obsolete ->busproc methodBartlomiej Zolnierkiewicz1-43/+0
->busproc method is used by HDIO_SET_BUSSTATE ioctl but it has no chance of working as intended (in 2.4.x days) because to issue an ioctl there is a device node needed and: - for BUSSTATE_TRISTATE+OFF it is too late (devices are already gone) - for BUSSTATE_TRISTATE+ON it is too early (devices are not registered yet) Just remove ->busproc method for now (it was only implemented by hpt366, siimage and tc86c001 host drivers). Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-07siimage: fix kernel oops on PPC 44xSergei Shtylyov1-1/+1
Fix kernel oops due to machine check occuring in init_chipset_siimage() on PPC 44x platforms. These 32-bit CPUs have 36-bit physical address and PCI I/O and memory spaces are mapped beyond 4 GB; arch/ppc/ code has a fixup in ioremap() that creates an illusion of the PCI I/O and memory resources being mapped below 4 GB, while arch/powerpc/ code got rid of this fixup with PPC 44x having instead CONFIG_RESOURCES_64BIT=y -- this causes the resources to be truncated to 32-bit 'unsigned long' type in this driver, and so non-existant memory being ioremap'ed and then accessed... Thanks to Valentine Barshak for providing an initial patch and explanations. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-06ide: remove write-only ->sata_misc[] from ide_hwif_tBartlomiej Zolnierkiewicz1-3/+0
* Remove write-only ->sata_misc[] from ide_hwif_t. * Remove no longer used SATA_{MISC,PHY,IEN}_OFFSET defines. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide: remove SATA_*_REG macrosBartlomiej Zolnierkiewicz1-9/+16
* siimage.c: use hwif->sata_scr[SATA_{ERROR,STATUS}_OFFSET] instead of SATA_{ERROR,STATUS}_REG macros. * Remove no longer needed SATA_*_REG macros. While at it: * Remove needless SATA Status register read from sil_sata_reset_poll(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide: remove needless includes from PCI host driversBartlomiej Zolnierkiewicz1-1/+0
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-02ide: add ->cable_detect method to ide_hwif_tBartlomiej Zolnierkiewicz1-3/+2
* Add ->cable_detect method to ide_hwif_t. * Call the new method in ide_init_port() if: - the host supports UDMA modes > UDMA2 ('hwif->ultra_mask & 78') - DMA initialization was successful (if hwif->dma_base is not set ide_init_port() sets hwif->ultra_mask to zero) - "idex=ata66" is not used ('hwif->cbl != ATA_CBL_PATA40_SHORT') * Convert PCI host drivers to use ->cable_detect method. While at it: * Factor out cable detection to separate functions (if not already done). * hpt366.c/it8213.c/slc90e66.c: - don't check cable type if "idex=ata66" is used * pdc202xx_new.c: - add __devinit tag to pdcnew_cable_detect() * pdc202xx_old.c: - rename pdc202xx_old_cable_detect() to pdc2026x_old_cable_detect() - add __devinit tag to pdc2026x_old_cable_detect() Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-01ide: delete filenames/versions from commentsBartlomiej Zolnierkiewicz1-2/+0
Delete filenames/versions from comments. I'm leaving decisions about adding DRV_VERSION defines and MODULE_VERSION()-s to maintainers of the respective drivers. While at it: * Remove unused VERSION define from ide.c. * Remove unused/stale DRV_VERSION define from au1xxx-ide.c. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-02-01ide: keep pointer to struct device instead of struct pci_dev in ide_hwif_tBartlomiej Zolnierkiewicz1-21/+30
Keep pointer to struct device instead of struct pci_dev in ide_hwif_t. While on it: * Use *dev->dma_mask instead of pci_dev->dma_mask in ide_toggle_bounce(). There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-26ide: merge ->fixup and ->quirkproc methodsBartlomiej Zolnierkiewicz1-8/+7
* Assign drive->quirk_list in ->quirkproc implementations: - hpt366.c::hpt3xx_quirkproc() - pdc202xx_new.c::pdcnew_quirkproc() - pdc202xx_old.c::pdc202xx_quirkproc() * Make ->quirkproc void. * Move calling ->quirkproc from do_identify() to probe_hwif(). * Convert it821x_fixups() to it821x_quirkproc() in it821x.c. * Convert siimage_fixup() to sil_quirkproc() in siimage.c, also remove no longer needed drive->present check from is_dev_seagate_sata(). * Convert ide_undecoded_slave() to accept 'drive' instead of 'hwif' as an argument. Then convert ide_register_hw() to accept 'quirkproc' argument instead of 'fixup' one. * Remove no longer needed ->fixup method. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-01-25ide: add IDE_HFLAG_ABUSE_SET_DMA_MODE host flagBartlomiej Zolnierkiewicz1-21/+8
* Add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag and use it to decide what to do with transfer modes < XFER_PIO_0 in ide_set_xfer_rate(). * Set IDE_HFLAG_ABUSE_SET_DMA_MODE in host drivers that need it (aec62xx, amd74xx, cs5520, cs5535, hpt34x, hpt366, pdc202xx_old, serverworks, tc86c001 and via82cxxx) and cleanup ->set_dma_mode methods in host drivers that don't (IDE core code guarantees that ->set_dma_mode will be called only for modes which are present in SWDMA/MWDMA/UDMA masks). While at it: * Add IDE_HFLAGS_HPT34X/HPT3XX/PDC202XX/SVWKS define in hpt34x/hpt366/pdc202xx_old/serverworks host driver. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-11-27siimage: remove resetproc() methodSergei Shtylyov1-44/+1
The intent behind siimage_reset() was probably to hard reset the interface and the SATA PHY but as the code writes to two reserved bits instead, it obviously has been ineffective from the start. So, just remove it. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-19Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivialLinus Torvalds1-1/+1
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (74 commits) fix do_sys_open() prototype sysfs: trivial: fix sysfs_create_file kerneldoc spelling mistake Documentation: Fix typo in SubmitChecklist. Typo: depricated -> deprecated Add missing profile=kvm option to Documentation/kernel-parameters.txt fix typo about TBI in e1000 comment proc.txt: Add /proc/stat field small documentation fixes Fix compiler warning in smount example program from sharedsubtree.txt docs/sysfs: add missing word to sysfs attribute explanation documentation/ext3: grammar fixes Documentation/java.txt: typo and grammar fixes Documentation/filesystems/vfs.txt: typo fix include/asm-*/system.h: remove unused set_rmb(), set_wmb() macros trivial copy_data_pages() tidy up Fix typo in arch/x86/kernel/tsc_32.c file link fix for Pegasus USB net driver help remove unused return within void return function Typo fixes retrun -> return x86 hpet.h: remove broken links ...
2007-10-20ide: constify struct ide_port_infoBartlomiej Zolnierkiewicz1-1/+1
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-20ide: replace ide_pci_device_t by struct ide_port_infoBartlomiej Zolnierkiewicz1-1/+1
* 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-20ide: remove write-only hwif->hwBartlomiej Zolnierkiewicz1-8/+3
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-19Fix misspellings of "system", "controller", "interrupt" and "necessary".Robert P. J. Day1-1/+1
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-19ide: set drive->autotune in ide_pci_setup_ports()Bartlomiej Zolnierkiewicz1-2/+0
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-19ide: use pci_dev->revisionBartlomiej Zolnierkiewicz1-13/+4
Some places were using PCI_CLASS_REVISION instead of PCI_REVISION_ID so they were not converted by commit 44c10138fd4bbc4b6d6bff0873c24902f2a9da65. Cc: Auke Kok <auke-jan.h.kok@intel.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-19ide: add ->mwdma_mask and ->swdma_mask to ide_pci_device_t (take 2)Bartlomiej Zolnierkiewicz1-3/+2
* Add ->mwdma_mask and ->swdma_mask to ide_pci_device_t. * Set ide_hwif_t DMA masks using DMA masks from ide_pci_device_t in setup-pci.c::ide_pci_setup_ports() (iff DMA base is valid and ->init_hwif method may still override them). * Convert IDE PCI host drivers to use ide_pci_device_t DMA masks. While at it: * Use ATA_{UDMA,MWDMA,SWDMA}* defines. * hpt34x.c: add separate ide_pci_device_t instances for HPT343 and HPT345. * serverworks.c: fix DMA masks being set before checking DMA base. v2: * Add missing masks to DECLARE_GENERIC_PCI_DEV() macro. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-19ide: add IDE_HFLAG_NO_{DMA,AUTODMA} host flagsBartlomiej Zolnierkiewicz1-1/+0
Add IDE_HFLAG_NO_{DMA,AUTODMA} host flags. Convert all host drivers using ide_pci_device_t to use these flags instead of d->autodma and then remove no longer needed d->autodma. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-19ide: add IDE_HFLAG_BOOTABLE host flagBartlomiej Zolnierkiewicz1-1/+1
Add IDE_HFLAG_BOOTABLE host flag and IDE_HFLAG_OFF_BOARD define. Convert all host drivers using ide_pci_device_t to use IDE_HFLAG_{BOOTABLE,OFF_BOARD} instead of d->bootable and then remove no longer needed d->bootable. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-19ide: add IDE_HFLAG_NO_ATAPI_DMA host flagBartlomiej Zolnierkiewicz1-2/+2
Add IDE_HFLAG_NO_ATAPI_DMA host flag and set it in host drivers which don't support ATAPI DMA. Then remove no longer needed hwif->atapi_dma. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-19siimage: bump driver versionBartlomiej Zolnierkiewicz1-1/+1
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-19ide: Fix siimage driver accessing beyond array boundaryBenjamin Herrenschmidt1-1/+1
The siimage uses an incorrect construct to access the other drive of a pair, causing it to access beyond an array boundary on the secondary interface. This fixes it by using the new ide_get_paired_drive() helper instead. Bart: patch description fixes Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Andrew Morton <akpm@osdl.org> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16ide: remove hwif->autodma and drive->autodmaBartlomiej Zolnierkiewicz1-11/+0
* hpt34x.c: disable DMA masks for HPT345 (hwif->autodma is zero so DMA won't be enabled anyway). * trm290.c: disable IDE_HFLAG_TRUST_BIOS_FOR_DMA flag (hwif->autodma is zero so DMA won't be enabled anyway). * Check noautodma global variable instead of drive->autodma in ide_tune_dma(). This fixes handling of "ide=nodma" kernel parameter for icside, ide-cris, au1xxx-ide, pmac, it821x, jmicron, sgiioc4 and siimage host drivers. * Remove hwif->autodma (it was not checked by IDE core code anyway) and drive->autodma (was set by all host drivers - except HPT345/TRM290 special cases - unless "ide=nodma" was used). While at it: - remove needless printk() from icside.c - remove stale FIXME/comment from ide-probe.c - don't force DMA off if PCI bus-mastering had to be enabled in setup-pci.c (this setting was always later over-ridden by host drivers anyway) Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16ide: use PCI_VDEVICE() macroBartlomiej Zolnierkiewicz1-4/+4
While at it: - make struct pci_device_id tables const - use PCI_DEVICE_ID_ITE_8213 define in it8213.c - fix comment in generic.c Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16ide: remove ->ide_dma_check (take 2)Bartlomiej Zolnierkiewicz1-22/+0
* Add IDE_HFLAG_TRUST_BIOS_FOR_DMA host flag for host drivers that depend on BIOS for programming device/controller for DMA. Set it in cy82c693, generic, ns87415, opti621 and trm290 host drivers. * Add IDE_HFLAG_VDMA host flag for host drivers using VDMA. Set it in cs5520 host driver. * Teach ide_tune_dma() about IDE_HFLAG_TRUST_BIOS_FOR_DMA flag. * Add generic ide_dma_check() helper and remove all open coded ->ide_dma_check implementations. Fix all places checking for presence of ->ide_dma_check hook to check for ->ide_dma_on instead. * Remove no longer needed code from config_drive_for_dma(). * Make ide_tune_dma() static. v2: * Fix config_drive_for_dma() return values. * Fix ide-dma.c build for CONFIG_BLK_DEV_IDEDMA_PCI=n by adding dummy config_drive_for_dma() inline. * Fix IDE_HFLAG_TRUST_BIOS_FOR_DMA handling in ide_dma_check(). * Fix init_hwif_it8213() comment. There should be no functionality changes caused by this patch. Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16ide: remove ide_use_fast_pio()Bartlomiej Zolnierkiewicz1-2/+1
Remove ide_use_fast_pio() and just re-tune PIO unconditionally if DMA tuning has failed in ->ide_dma_check. All host drivers using ide_use_fast_pio() set drive->autotune so PIO is always tuned anyway and in some cases we _really_ need to re-tune PIO because PIO and DMA timings are shared. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-13ide: move ide_config_drive_speed() calls to upper layers (take 2)Bartlomiej Zolnierkiewicz1-18/+11
* Convert {ide_hwif_t,ide_pci_device_t}->host_flag to be u16. * Add IDE_HFLAG_POST_SET_MODE host flag to indicate the need to program the host for the transfer mode after programming the device. Set it in au1xxx-ide, amd74xx, cs5530, cs5535, pdc202xx_new, sc1200, pmac and via82cxxx host drivers. * Add IDE_HFLAG_NO_SET_MODE host flag to indicate the need to completely skip programming of host/device for the transfer mode ("smart" hosts). Set it in it821x host driver and check it in ide_tune_dma(). * Add ide_set_pio_mode()/ide_set_dma_mode() helpers and convert all direct ->set_pio_mode/->speedproc users to use these helpers. * Move ide_config_drive_speed() calls from ->set_pio_mode/->speedproc methods to callers. * Rename ->speedproc method to ->set_dma_mode, make it void and update all implementations accordingly. * Update ide_set_xfer_rate() comments. * Unexport ide_config_drive_speed(). v2: * Fix issues noticed by Sergei: - export ide_set_dma_mode() instead of moving ->set_pio_mode abuse wrt to setting DMA modes from sc1200_set_pio_mode() to do_special() - check IDE_HFLAG_NO_SET_MODE in ide_tune_dma() - check for (hwif->set_pio_mode) == NULL in ide_set_pio_mode() - check for (hwif->set_dma_mode) == NULL in ide_set_dma_mode() - return -1 from ide_set_{pio,dma}_mode() if ->set_{pio,dma}_mode == NULL - don't set ->set_{pio,dma}_mode on it821x in "smart" mode - fix build problem in pmac.c - minor fixes in au1xxx-ide.c/cs5530.c/siimage.c - improve patch description Changes in behavior caused by this patch: - HDIO_SET_PIO_MODE ioctl would now return -ENOSYS for attempts to change PIO mode if it821x controller is in "smart" mode - removal of two debugging printk-s (from cs5530.c and sc1200.c) - transfer modes 0x00-0x07 passed from user space may be programmed twice on the device (not really an issue since 0x00 is not supported correctly by any host driver ATM, 0x01 is not supported at all and 0x02-0x07 are invalid) Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-11ide: use only ->set_pio_mode method for programming PIO modes (take 2)Bartlomiej Zolnierkiewicz1-7/+0
Use ->set_pio_mode method to program PIO modes in ide_set_xfer_rate() (the only place which used ->speedproc to program PIO modes) and remove handling of PIO modes from all ->speedproc implementations. v2: * Fix pmac_ide_tune_chipset() comment. There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-11siimage: fix ->set_pio_mode method to select PIO data transferBartlomiej Zolnierkiewicz1-3/+17
* Remember to select PIO data transfer (with IORDY monitored) in sil_tune_pio() (->set_pio_mode method) so the controller is always programmed correctly for PIO transfers (this is important if DMA is not going to be used). * Don't set DMA/UDMA timings for PIO modes in siimage_tune_chipset(). * Bump driver version. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-11ide: add ide_set{_max}_pio() (take 4)Bartlomiej Zolnierkiewicz1-4/+3
* Add IDE_HFLAG_ABUSE_{PREFETCH,FAST_DEVSEL,DMA_MODES} flags and set them in ht6560, cmd640, cmd64x and sc1200 host drivers. * Add set_pio_mode_abuse() for checking if host driver has a non-standard ->tuneproc() implementation and use it in do_special(). * Add ide_set_pio() for setting PIO mode (it uses hwif->pio_mask to find the maximum PIO mode supported by the host), also add ide_set_max_pio() wrapper for ide_set_pio() to use for auto-tuning. Convert users of ->tuneproc to use ide_set{_max}_pio() where possible. This leaves only do_special(), set_using_pio(), ide_hwif_restore() and ide_set_pio() as a direct users of ->tuneproc. * Remove no longer needed ide_get_best_pio_mode() calls and printk-s reporting PIO mode selected from ->tuneproc implementations. * Rename ->tuneproc hook to ->set_pio_mode and make 'pio' argument const. * Remove stale comment from ide_config_drive_speed(). v2: * Fix "ata_" prefix (Noticed by Jeff). v3: * Minor cleanups/fixups per Sergei's suggestions. v4: * Fix compile problem in drivers/ide/pci/cmd640.c (Noticed by Andrew Morton). * Improve some ->set_pio_mode comments. Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-11ide: move ide_rate_filter() calls to the upper layer (take 2)Bartlomiej Zolnierkiewicz1-7/+4
* Move ide_rate_filter() calls from host drivers to IDE core. * Make ide_rate_filter() static. * Make 'speed' argument of ->speedproc const. v2: * Fix it8213_tune_chipset() comment. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20ide: add PIO masksBartlomiej Zolnierkiewicz1-0/+1
* Add ATA_PIO[0-6] defines to <linux/ata.h>. * Add ->pio_mask field to ide_pci_device_t and ide_hwif_t. * Add PIO masks to host drivers. <linux/ata.h> change ACK-ed by Jeff Garzik <jeff@garzik.org>. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20ide: drop "PIO data" argument from ide_get_best_pio_mode()Bartlomiej Zolnierkiewicz1-2/+2
* Drop no longer needed "PIO data" argument from ide_get_best_pio_mode() and convert all users accordingly. * Remove no longer needed ide_pio_data_t. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20ide: add ide_pci_device_t.host_flags (take 2)Bartlomiej Zolnierkiewicz1-1/+0
* Rename ide_pci_device_t.flags to ide_pci_device_t.host_flags and IDEPCI_FLAG_ISA_PORTS flag to IDE_HFLAG_ISA_PORTS. * Add IDE_HFLAG_SINGLE flag for single channel devices. * Convert core code and all IDE PCI drivers to use IDE_HFLAG_SINGLE and remove no longer needed ide_pci_device_t.channels field. v2: * Fix issues noticed by Sergei: - correct code alignment in scc_pata.c - s/IDE_HFLAG_SINGLE/~IDE_HFLAG_SINGLE/ in serverworks.c Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-20siimage: PIO mode setup fixes (take 2)Bartlomiej Zolnierkiewicz1-98/+39
* Add sil_tuneproc() wrapper for siimage_tuneproc() which also sets PIO mode on the device. * Add missing ide_get_best_pio_mode() call to sil_tuneproc() so "pio" == 255 (autotune) is handled correctly (previously PIO0 was used) and "pio" values > 4 && < 255 are filtered to PIO4 (instead of PIO0). * Add code limiting maximum PIO mode according to the pair device capabilities to sil_tuneproc(). * Convert users of config_siimage_chipset_for_pio() to use sil_tune_pio() and sil_tuneproc(). This fixes PIO fallback in siimage_config_drive_for_dma() to use max PIO mode available instead of PIO4 (config_siimage_chipset_for_pio() used wrong arguments for ide_get_best_pio_mode() and as a results always tried to set PIO4). * Remove no longer needed siimage_taskfile_timing() and config_siimage_chipset_for_pio(). * Enable ->autotune unconditionally and remove PIO tuning for UDMA/MDMA modes from siimage_speedproc() * Bump driver version. v2: * Fix issues noticed by Sergei: - correct pair device check - trim only taskfile PIO to the slowest of the master/slave - enable ->autotune unconditionally and remove PIO tuning for UDMA/MDMA modes from siimage_speedproc() - add TODO item for IORDY bugs - minor cleanups Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-07-09ide: add short cables supportBartlomiej Zolnierkiewicz1-8/+10
This patch allows users to override both host and device side cable detection with "ideX=ata66" kernel parameter. Thanks to this it should be now possible to use UDMA > 2 modes on systems (laptops mainly) which use short 40-pin cable instead of 80-pin one. Next patches add automatic detection of some systems using short cables. Changes: * Rename hwif->udma_four to hwif->cbl and make it u8. * Convert all existing users accordingly (use ATA_CBL_* defines while at it). * Add ATA_CBL_PATA40_SHORT support to ide-iops.c:eighty_ninty_three(). * Use ATA_CBL_PATA40_SHORT for "ideX=ata66" kernel parameter. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
2007-05-16ide: remove ide_dma_enable()Bartlomiej Zolnierkiewicz1-23/+1
* check ->speedproc return value in ide_tune_dma() * use ide_tune_dma() in cmd64x/cs5530/sc1200/siimage/sl82c105/scc_pata drivers * remove no longer needed ide_dma_enable() Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-05-09Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6Linus Torvalds1-24/+21
* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6: ide: fix PIO setup on resume for ATAPI devices ide: legacy PCI bus order probing fixes ide: add ide_proc_register_port() ide: add "initializing" argument to ide_register_hw() ide: cable detection fixes (take 2) ide: move IDE settings handling to ide-proc.c ide: split off ioctl handling from IDE settings (v2) ide: make /proc/ide/ optional ide: add ide_tune_dma() helper ide: rework the code for selecting the best DMA transfer mode (v3) ide: fix UDMA/MWDMA/SWDMA masks (v3)
2007-05-10ide: rework the code for selecting the best DMA transfer mode (v3)Bartlomiej Zolnierkiewicz1-24/+21
Depends on the "ide: fix UDMA/MWDMA/SWDMA masks" patch. * add ide_hwif_t.udma_filter hook for filtering UDMA mask (use it in alim15x3, hpt366, siimage and serverworks drivers) * add ide_max_dma_mode() for finding best DMA mode for the device (loosely based on some older libata-core.c code) * convert ide_dma_speed() users to use ide_max_dma_mode() * make ide_rate_filter() take "ide_drive_t *drive" as an argument instead of "u8 mode" and teach it to how to use UDMA mask to do filtering * use ide_rate_filter() in hpt366 driver * remove no longer needed ide_dma_speed() and *_ratemask() * unexport eighty_ninty_three() v2: * rename ->filter_udma_mask to ->udma_filter [ Suggested by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ] v3: * updated for scc_pata driver (fixes XFER_UDMA_6 filtering for user-space originated transfer mode change requests when 100MHz clock is used) Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-05-09Fix occurrences of "the the "Michael Opdenacker1-1/+1
Signed-off-by: Michael Opdenacker <michael@free-electrons.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-05-05siimage: fix wrong ->swdma_maskBartlomiej Zolnierkiewicz1-10/+2
This driver doesn't support SWDMA so use the correct ->swdma_mask. While at it: * no need to call config_chipset_for_pio() in config_chipset_for_dma(), if DMA is not available config_chipset_for_pio() will be called by siimage_config_drive_for_dma() and if DMA is available config_siimage_chipset_for_pio() will be called by siimage_tune_chipset() * remove needless config_chipset_for_pio() wrapper * bump driver version Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-03siimage: DRAC4 noteAlan Cox1-0/+5
Revised DRAC4 warning as Jeff suggested, this one includes more info about why the problem occurs Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17ide: add ide_set_dma() helper (v2)Bartlomiej Zolnierkiewicz1-4/+2
* add ide_set_dma() helper and make ide_hwif_t.ide_dma_check return -1 when DMA needs to be disabled (== need to call ->ide_dma_off_quietly) 0 when DMA needs to be enabled (== need to call ->ide_dma_on) 1 when DMA setting shouldn't be changed * fix IDE code to use ide_set_dma() instead if using ->ide_dma_check directly v2: * updated for scc_pata Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17ide: disable DMA in ->ide_dma_check for "no IORDY" case (v2)Bartlomiej Zolnierkiewicz1-5/+3
If DMA is unsupported ->ide_dma_check should disable DMA. v2: * updated for scc_pata Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17ide: convert ide_hwif_t.mmio into flag (v2)Bartlomiej Zolnierkiewicz1-1/+2
All users of ->mmio == 1 are gone so convert ->mmio into flag. Noticed by Alan Cox. v2: * updated for scc_pata Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17ide: use PIO/MMIO operations directly where possible (v2)Bartlomiej Zolnierkiewicz1-11/+13
This results in smaller/faster/simpler code and allows future optimizations. Also remove no longer needed ide[_mm]_{inl,outl}() and ide_hwif_t.{INL,OUTL}. v2: * updated for scc_pata Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17ide: add ide_use_fast_pio() helper (v3)Bartlomiej Zolnierkiewicz1-11/+3
* add ide_use_fast_pio() helper for use by host drivers * add DMA capability and hwif->autodma checks to ide_use_dma() - au1xxx-ide/it8213/it821x drivers didn't check for (id->capability & 1) [ for the IT8211/2 in SMART mode this check shouldn't be made but since in it821x_fixups() we set DMA bit explicitly: if(strstr(id->model, "Integrated Technology Express")) { /* In raid mode the ident block is slightly buggy We need to set the bits so that the IDE layer knows LBA28. LBA48 and DMA ar valid */ id->capability |= 3; /* LBA28, DMA */ we are better off using generic helper if we can ] - ide-cris driver didn't set ->autodma [ before the patch hwif->autodma was only checked in the chipset specific hwif->ide_dma_check implementations, for ide-cris it is cris_dma_check() function so there no behavior change here ] v2: * updated patch description (thanks to Alan Cox for the feedback) v3: * updated for scc_pata driver Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17ide: unexport ide_set_xfer_rate() (v2)Bartlomiej Zolnierkiewicz1-4/+1
In cmd64x, siimage and scc_pata drivers: * don't set drive->init_speed as it should be already set by successful execution of ide_set_xfer_rate() * use hwif->speedproc functions directly Above changes allows removal of EXPORT_SYMBOL_GPL(ide_set_xfer_rate). v2: * updated for scc_pata driver Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17siimage: PIO1/2 taskfile transfer overclocking fixSergei Shtylyov1-30/+29
Fix two typos found by SiI680A documentation check. They caused the taskfile transfer overclocking: - in PIO mode 1 as 0x2283 must be used for both data and taskfile transfers; - in PIO mode 2 as data and taskfile timings are swapped when writing to the MMIO regs. Fix coding style and trailing whitespace in enclosing statements while at it... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> drivers/ide/pci/siimage.c | 59 ++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 30 deletions(-)
2007-01-27ide: add missing __init tags to IDE PCI host driversBartlomiej Zolnierkiewicz1-1/+1
also change __devinit tag for sgiioc4.c:ioc4_ide_init() to __init Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2006-10-03[PATCH] ide: remove dma_base2 field from ide_hwif_tSergei Shtylyov1-1/+0
Remove dma_base2 field from ide_hwif_t as it's used only in 2 drivers and without great need. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: John Keller <jpk@sgi.com> Signed-off-by: Jeremy Higdon <jeremy@sgi.com> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-11[PATCH] Fix 2.6.18-rc6 IDE breakage, add missing ident needed for current ↵Alan Cox1-3/+3
VIA boards There are two changes here. The first reverses the broken PCI_DEVICE conversion back to the old format. The second adds a missing PCI ID so you can actually boot 2.6.18 on 2 month old VIA motherboards (right now only 2.6.18-mm works). CC'd to Jeff to check the PCI ident but its a) in several distro kernels and b) in 2.6.18-mm [twice ??] Signed-off-by: Alan Cox <alan@redhat.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel1-1/+0
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-28[PATCH] ide: clean up siimageAlan Cox1-50/+12
Remove all the ifdef preparation for enhanced features that never occcurred and is only in libata. For the SATA chips (but not yet PATA ones) politely suggest to the user that libata may offer more features. Signed-off-by: Alan Cox <alan@redhat.com> Cc: Sergei Shtylylov <sshtylyov@ru.mvista.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-18[PATCH] siimage: docs urlsJeff Garzik1-1/+7
Signed-off-by: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2005-11-10[PATCH] siimage: enable interrupts on Adaptec SA-1210 cardJohn W. Linville1-0/+9
The siimage driver proports to support the Adaptec SA-1210 SATA controller. However, at least some of those cards boot-up with their interrupts disabled internally. The siimage driver currently ignores that fact, so that driver does not actually work with those cards. This patch enables those interrupts on cards that need it. [ This is implemented based on similar code in the libata-based sata_sil driver. ] Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2005-04-16Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds1-0/+1133
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!