summaryrefslogtreecommitdiff
path: root/drivers/ide/pci
AgeCommit message (Collapse)Author
2007-10-19ide: add IDE_HFLAG_BOOTABLE host flagBartlomiej Zolnierkiewicz
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 Zolnierkiewicz
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-19ide: add DECLARE_GENERIC_PCI_DEV() macro to generic IDE PCI host driverBartlomiej Zolnierkiewicz
* Add DECLARE_GENERIC_PCI_DEV() macro to generic IDE PCI host driver and use it to cleanup generic_chipsets[]. * Remove dead/obsolete code while at it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-19siimage: bump driver versionBartlomiej Zolnierkiewicz
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-19ide: Fix cs5535 driver accessing beyond array boundaryBenjamin Herrenschmidt
The cs5535 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-19ide: Fix siimage driver accessing beyond array boundaryBenjamin Herrenschmidt
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-16amd74xx: remove /proc/ide/amd74xxBartlomiej Zolnierkiewicz
This belongs to user-space (and only if really needed). text data bss dec hex filename 6723 2000 28 8751 222f drivers/ide/pci/amd74xx.o.before 3833 2000 16 5849 16d9 drivers/ide/pci/amd74xx.o.after Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16amd74xx/via82cxxx: don't initialize drive->dnBartlomiej Zolnierkiewicz
drive->dn is initialized by ide-probe.c::probe_hwif() so no need to do it in ->init_hwif method. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16sis5513: remove /proc/ide/sisBartlomiej Zolnierkiewicz
This belongs to user-space (and only if really needed). text data bss dec hex filename 7129 404 8 7541 1d75 drivers/ide/pci/sis5513.o.before 3916 404 1 4321 10e1 drivers/ide/pci/sis5513.o.after Additionaly to being bloat the code contained two bugs: - wrong cable bit was checked (0x0001 instead of 0x8000) on ATA_133 chipsets - incorrect UDMA cycle time was reported on ATA_100a/ATA_133 chipsets Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16ide: remove hwif->autodma and drive->autodmaBartlomiej Zolnierkiewicz
* 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 Zolnierkiewicz
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-16sis5513: clear prefetch and postwrite for ATAPI devicesBartlomiej Zolnierkiewicz
Clear prefetch and postwrite for ATAPI devices instead of depending on BIOS. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16it8213/piix/slc90e66: "de-couple" PIO and UDMA modesBartlomiej Zolnierkiewicz
Don't force PIO4 when programming UDMA mode (suggested by Sergei). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16ide: remove ->ide_dma_check (take 2)Bartlomiej Zolnierkiewicz
* 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-16sl82c105: add PIO autotune fallback to ->ide_dma_checkBartlomiej Zolnierkiewicz
Since sl82c105 re-programs DMA/PIO timings for DMA enable/disable, and sets ->autotune this change shouldn't have any other effect than bringing sl82c105 driver in-line with other host drivers wrt ->ide_dma_check implementation. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16cs5530/sc1200: add PIO autotune fallback to ->ide_dma_checkBartlomiej Zolnierkiewicz
* Add PIO autotune fallback to ->ide_dma_check. Since cs5530/sc1200 allow separate PIO and DMA timings, and cs5530/sc1200 always set ->autotune this change shouldn't have any other effect than bringing these drivers in-line with other host drivers wrt ->ide_dma_check implementations. * Fix ->ide_dma_check to return "-1" if DMA cannot be set. * Bump driver version. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16ide: remove ide_use_fast_pio()Bartlomiej Zolnierkiewicz
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-16ide: remove drive->init_speed zeroingBartlomiej Zolnierkiewicz
Several host drivers used to reset drive->init_speed in their ->ide_dma_check implementations which resulted in incorrect init speed being reported to the user, fix it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16it8213/piix/slc90e66: remove {it8213,piix,slc90e66}_dma_2_pio()Bartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16atiixp: DMA setup fixesBartlomiej Zolnierkiewicz
* Fix handling of unsupported/invalid modes in atiixp_set_dma_mode(). * ATI controllers allow separate PIO and DMA timings so remove programming of PIO modes from atiixp_set_dma_mode(). Also remove no longer needed atiixp_dma_2_pio() helper. * SWDMA timings are not programmed by atiixp_set_dma_mode() and if SWDMA mode is chosen atiixp_dma_host_on() erroneously enables UDMA, just disable support for SWDMA modes for now. * Enable support for MWDMA0 mode. * Bump driver version. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16sc1200: always tune PIOBartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16cs5530: always tune PIOBartlomiej Zolnierkiewicz
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16slc90e66: always tune PIOBartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16aec62xx: always tune PIOBartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16sis5513: always tune PIOBartlomiej Zolnierkiewicz
* Always set ->autotune in init_hwif_sis5513(), this means practically no change in behavior since PIO was always tuned in ->ide_dma_check and >autotune was always set for ->dma_base == 0 case. * Bump driver version. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16sis5513: DMA setup fixesBartlomiej Zolnierkiewicz
* Add sis_ata133_get_base() helper function for obtaining the address of the drive control registers on chipset_family == ATA_133 chipsets. * Add three helper functions for programming PIO/MWDMA timings: - sis_ata16_program_timings() (for ATA_16/33/66/100a chipset families) - sis_ata100_program_timings() (for ATA_100/133a chipset families) - sis_ata133_program_timings() (for ATA_133 chipset family) MWDMA timings are taken from datasheets and they match ATA spec. * Add generic helper function sis_program_timings() and use it in ->set_pio_mode and ->set_dma_mode methods (previously the driver depended on BIOS to program the correct MWDMA timings). * Remove redundant !chipset_family check from init_hwif_sis5513() (init_chipset_sis5513() guarantees that we will never get here if chipset_family cannot be determined). * SWDMA seems to be unsupported by SiS chipsets (no info about SWDMA in datasheets and for SWDMA0 mode timing requirements are impossible to fulfill) so remove ->swdma_mask from init_hwif_sis5513() and handling of SWDMA modes from sis_set_dma_mode(). * Enable DMA support for chipset_family == ATA_16. * Bump driver version. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16hpt366: always tune PIOBartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16ide: fix serverworks.c UDMA regressionTony Battersby
The patch described by the following excerpt from ChangeLog-2.6.22 makes it impossible to use UDMA on a Tyan S2707 motherboard (SvrWks CSB5): commit 2d5eaa6dd744a641e75503232a01f52d0768884c Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Date: Thu May 10 00:01:08 2007 +0200 ide: rework the code for selecting the best DMA transfer mode (v3) ... This one-line patch against 2.6.23 fixes the problem. Signed-off-by: Tony Battersby <tonyb@cybernetics.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-16IDE: sg chaining supportJens Axboe
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-13alim15x3: remove redundant m5229_revision checkBartlomiej Zolnierkiewicz
init_dma_ali15x3() guarantees that hwif->dma_base will never be set for m5229_revision < 0x20 so remove redundant m5229_revision >= 0x20 check from init_hwif_common_ali15x3(). While at it remove incorrect comment. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-13sc1200: fix ->dma_base equal zero handlingBartlomiej Zolnierkiewicz
Set hwif->atapi_dma/{ultra,mwdma}_mask and drive->autodma after checking that ->dma_base exists. If ->dma_base is not set (== PCI BAR4 cannot be reserved) then DMA hooks shouldn't be initialized or bad things will happen. OTOH hwif->set_{pio,dma}_mode hooks should be set even if hwif->dma_base == 0. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-13cs5520: fix ->dma_base equal zero handlingBartlomiej Zolnierkiewicz
Set hwif->ide_dma_{check,on} and hwif->autodma to 1 after checking that ->dma_base exists. If ->dma_base is not set (== PCI BAR4 cannot be reserved) then DMA hooks shouldn't be initialized or bad things will happen. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-13sgiioc4: add missing ->dma_base checkBartlomiej Zolnierkiewicz
If ->dma_base is not set (== PCI BAR4 cannot be reserved) then DMA hooks shouldn't be initialized or bad things will happen. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-13cs5535: add missing ->dma_base checkBartlomiej Zolnierkiewicz
If ->dma_base is not set (== PCI BAR4 cannot be reserved) then DMA hooks shouldn't be initialized or bad things will happen. 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 Zolnierkiewicz
* 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-13pdc202xx_new: check ide_config_drive_speed() return valueBartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-13cs5535: check ide_config_drive_speed() return valueBartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-13amd74xx/via82cxxx: check ide_config_drive_speed() return valueBartlomiej Zolnierkiewicz
* Check ide_config_drive_speed() return value. * While at also call ide_config_drive_speed() if the transfer mode is XFER_PIO_SLOW (this case happens iff the transfer mode has already been set on the device by ide-proc.c::set_xfer_rate()) and remove redundant setting of ->{init,current}_speed. * Bump driver version. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-11Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (24 commits) ide: use only ->set_pio_mode method for programming PIO modes (take 2) sis5513: don't change UDMA settings when programming PIO it8213/piix/slc90e66: don't change DMA settings when programming PIO alim15x3: PIO mode setup fixes siimage: fix ->set_pio_mode method to select PIO data transfer cs5520: don't enable VDMA in ->speedproc sc1200: remove redundant warning message from sc1200_tune_chipset() ide-pmac: PIO mode setup fixes (take 3) icside: fix ->speedproc to return on unsupported modes (take 5) sgiioc4: use ide_tune_dma() amd74xx/via82cxxx: use ide_tune_dma() ide: add ide_set{_max}_pio() (take 4) ide: Kconfig face-lift ide: move ide_rate_filter() calls to the upper layer (take 2) sis5513: add ->udma_filter method for chipset_family >= ATA_133 ide: mode limiting fixes for user requested speed changes ide: add missing ide_rate_filter() calls to ->speedproc()-s ide: call udma_filter() before resorting to the UltraDMA mask ide: make jmicron match vendor and device class pdc202xx_new: switch to using pci_get_slot() (take 2) ...
2007-10-11ide: use only ->set_pio_mode method for programming PIO modes (take 2)Bartlomiej Zolnierkiewicz
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-11sis5513: don't change UDMA settings when programming PIOBartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-11it8213/piix/slc90e66: don't change DMA settings when programming PIOBartlomiej Zolnierkiewicz
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-11alim15x3: PIO mode setup fixesBartlomiej Zolnierkiewicz
* Return failure in ->speedproc method for unsupported/invalid transfer modes passed from user-space (fixes theoretical OOPS in ali_tune_pio() and/or setting random PIO timings on host controller + disabling UDMA bit + setting unsupported/invalid transfer mode on the device). * Don't disable UDMA bit when programming PIO modes. * Add FIXME about DMA timings never being set. * Bump driver version. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-11siimage: fix ->set_pio_mode method to select PIO data transferBartlomiej Zolnierkiewicz
* 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-11cs5520: don't enable VDMA in ->speedprocBartlomiej Zolnierkiewicz
There is no need to do it in cs5520_tune_chipset() (->speedproc method) since it is correctly handled by cs5520_dma_on() (->ide_dma_on method). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-11sc1200: remove redundant warning message from sc1200_tune_chipset()Bartlomiej Zolnierkiewicz
ide_config_drive_speed() called by sc1200_set_xfer_mode() already gives a meaningful warning message in case of failure. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-11sgiioc4: use ide_tune_dma()Bartlomiej Zolnierkiewicz
* Add DRV_NAME define and use it instead of sgiioc4_chipset.name. * Remove no longer needed sgiioc4_chipset. * Remove needless clearing of ->atapi_dma from ide_dma_sgiioc4(). * Fix ide_dma_sgiioc4() to return success/failure. Check return value in sgiioc4_ide_setup_pci_device() and set hwif->autodma accordingly. Also add missing setting of drive->autodma. * Add sgiioc4_speedproc() (implementation of ->speedproc method). * Fix ->mwdma_mask (MWDMA2 mask is 0x04 not 0x02) and remove incorrect ->swdma_mask. Also remove needless initialization of ->ultra_mask. * Use ide_tune_dma() in sgiioc4_ide_dma_check(), this fixes following bugs: - DMA capability bit not being checked on the device - DMA blacklist not being checked - MWDMA2 mode support by device not being checked Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeremy Higdon <jeremy@sgi.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-10-11amd74xx/via82cxxx: use ide_tune_dma()Bartlomiej Zolnierkiewicz
* Use ide_tune_dma() in amd74xx/via82cxxx driver, this fixes following bugs: - DMA capability bit not being checked on the device - DMA blacklist not being checked - DMA mode being programmed even if drive->autodma == 0 (thus possibly destroying PIO timings) * 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 Zolnierkiewicz
* 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 Zolnierkiewicz
* 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>