aboutsummaryrefslogtreecommitdiff
path: root/drivers/ide
AgeCommit message (Collapse)Author
2007-03-17ide: remove CONFIG_IDEDMA_{ICS,PCI}_AUTO config optionsBartlomiej Zolnierkiewicz
All modern distributions have been setting these options to "y" for ages. (additionally "n" cases have been obsoleted for few years). Therefore use DMA by default and remove CONFIG_IDEDMA_{ICS,PCI}_AUTO (also remove no longer needed CONFIG_IDEDMA_AUTO). This fixes DMA support for rare configurations where CONFIG_IDEDMA_{ICS,PCI}_AUTO was set to "n" but "hdparm -d 1" was used to enable DMA support and which were forced to PIO mode by "ide: don't allow DMA to be enabled if CONFIG_IDEDMA_{ICS,PCI}_AUTO=n" patch. There is no functionality loss because "ide=nodma" kernel option is still available. Cc: Patrick Horn <phrh@yahoo.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Russell King <rmk+lkml@arm.linux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-17ide: don't allow DMA to be enabled if CONFIG_IDEDMA_{ICS,PCI}_AUTO=nBartlomiej Zolnierkiewicz
For CONFIG_IDEDMA_{ICS,PCI}_AUTO=n and/or "ide=nodma" option the host/device are not programmed for DMA and it is also explicitly disabled by ide_set_dma() (->ide_dma_check returns "-1"). However the code responsible for manually enabling DMA ("hdparm -d 1") has a bug which results in DMA being erroneously enabled - ide_set_dma() incorrectly passes "0" return value to set_using_dma(). This may work if BIOS/firmware configured the host/device for DMA and chipset allows independent configuration of DMA/PIO modes but won't work after suspend and is generally unsafe on many chipsets (possibly including data corruption if the same registers are used for DMA/PIO timings). This patch fixes kernel bugzilla bug #8169 (piix host driver fixes for setting PIO mode exposed the problem described above). The side-effect of the fix is that some rare configuration may be forced to PIO mode when DMA mode was previously used - this is addressed by the next patch which removes CONFIG_IDEDMA_{PCI,ICS}_AUTO config option completely. Thanks goes out to Patrick Horn for reporting the issue, narrowing it down to the specific commit and testing the fix. Also thanks to Sergei Shtylyov for help in debugging the problem. Cc: Patrick Horn <phrh@yahoo.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Russell King <rmk+lkml@arm.linux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-17scc_pata: dependency fixKou Ishizaki
This patch fixes: * the dependency of scc_pata on BLK_DEV_IDEDMA_PCI * incorrect link to ide-core * move scc_pata from ide/ppc to ide/pci Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Signed-off-by: Akira Iguchi <akira2.iguchi@toshiba.co.jp> Cc: Al Viro <viro@ftp.linux.org.uk>, Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-17jmicron: make ide jmicron driver play nice with libata onesTejun Heo
When libata is configured, the device is configured such that SATA and PATA ports live in separate functions with different programming interfaces. pata_jmicron and ide jmicron drivers can drive only the PATA part. This patch makes jmicron match PCI class code such that it doesn't attach itself to the SATA part preventing the proper ahci driver from attaching. This change is suggested by Bartlomiej. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: justin@jmicron.com Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-17ide: au1xxx: fix use of mixed declarations and codeRalf Baechle
drivers/ide/mips/au1xxx-ide.c:684: warning: ISO C90 forbids mixed declarations and code Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-17cmd64x: fix recovery time calculation (take 3)Sergei Shtylyov
The driver wrongly takes the address setup time into account when calculating the PIO recovery time -- this leads to slight overclocking of the PIO modes 0 and 1 (so, the prayers failed to help, as usual :-). Rework the code to be calculating recovery clock count as a difference between the total cycle count and the active count (we don't need to calculate the recovery time itself since it's not specified for the PIO modes 0 to 2, and for modes 3 and 4 this formula gives enough recovery time anyway in the chip's supported PCI frequency range). This patch has been inspired by reading the datasheets and looking at what the libata driver does; it has been compile-tested only (as usual :-) but anyway, the new code gives the same or longer recovery times than the old one... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-14[PATCH] BLK_DEV_IDE_CELLEB dependency fixAl Viro
It's bool and it depends on IDE => should depend on IDE=y Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-03ide: make legacy IDE VLB modules check for the "probe" kernel params (v2)Bartlomiej Zolnierkiewicz
Legacy IDE VLB host drivers didn't check for "probe" options when compiled as modules, which was obviously wrong as we don't want module to poke at random I/O ports by simply loading it. Fix it by adding "probe" module param to legacy IDE VLB host drivers. v2: * don't obsolete old "ide0=dtc2278/ht6560b/qd65xx/ali14xx/umc8672" IDE driver options yet (per Alan Cox's request) and enhance documentation Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-03ide: remove some obsoleted kernel params (v2)Bartlomiej Zolnierkiewicz
Remove * "hdx=serialize" * "idex=noautotune" * "idex=autotune" kernel params, they have been obsoleted for ages. "idex=serialize", "hdx=noautotune" and "hdx=autotune" are still available so there is no funcionality loss caused by this patch. v2: * fix CONFIG_BLK_DEV_4DRIVES=y build broken by version 1 of the patch [ /me wearing brown paper bag ] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-03ide/pci/delkin_cb.c: pci_module_init to pci_register_driverRichard Knutsson
Convert pci_module_init() to pci_register_driver(). [ Compile-tested with "allyes", "allmod" & "allno" on i386. ] Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-03scc_pata: bugfix for checking DMA IRQ statusAkira Iguchi
On Tuesday 27 February 2007, Akira Iguchi wrote: > > But since I sent the first patch, I found a bug for checking DMA IRQ status. > (http://www.spinics.net/lists/linux-ide/msg06903.html) > Then I sent the fixed patch for libata only. So my drivers/ide patch > still has same bug and I want to fix it, too. > > The following patch fixes this bug. Please apply this patch. From: Akira Iguchi <akira2.iguchi@toshiba.co.jp> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-03ide: remove a ton of pointless #undef REALLY_SLOW_IOAlan Cox
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-03siimage: DRAC4 noteAlan Cox
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-03-03ide: fix pmac breakageAndrew Morton
Fix breakage added in the IDE devel tree. Add header, then fix drivers/ide/ppc/pmac.c: In function `pmac_ide_setup_dma': drivers/ide/ppc/pmac.c:2044: warning: assignment from incompatible pointer type drivers/ide/ppc/pmac.c: In function `pmac_ide_dma_host_on': drivers/ide/ppc/pmac.c:1989: warning: control reaches end of non-void function include/linux/pci.h: In function `pmac_ide_init': drivers/ide/ppc/pmac.c:1563: warning: ignoring return value of `pci_register_driver', declared with attribute warn_unused_result Then add some apparently-long-missing error handling. Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-03ide-cs: Update device tableMagnus Damm
Add CFA devices from I-O Data, Mitsubishi and Viking. Add SanDisk comment. Signed-off-by: Magnus Damm <damm@opensource.se> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-03ide: ide_get_best_pio_mode() returns incorrect IORDY setting (take 2)Sergei Shtylyov
The function ide_get_best_pio_mode() fails to return the correct IORDY setting for the explicitly specified modes -- fix this along with the heading comment, and also remove the long commented out code. Also, while at it, correct the misliading comment about the PIO cycle time in <linux/ide.h> -- it actually consists of only the active and recovery periods, with only some chips also including the address setup time into equation... [ bart: sl82c105 seems to be currently the only driver affected by this fix ] Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-03piix/slc90e66: more tuneproc() fixing (take 2)Sergei Shtylyov
The tuneproc() method in both these drivers failed to set the drive's own speed. Fix this by renaming the function and "wrapping around it" the new tuneproc() method. Switch back to calling tuneproc() in the PIO fallback code. While at it, also convert the rest of the PIO timing code into proper C. :-) Has been kind of tested on SLC90E66. I'm too lazy to reboot my box and test on ICH4... :-) [ bart: I quickly tested it on ICH4. ] Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-03ide: fix drive side 80c cable check, take 2Tejun Heo
eighty_ninty_three() had word 93 validitity check but not the 80c bit test itself (bit 13). This increases the chance of incorrect wire detection especially because host side cable detection is often unreliable and we sometimes soley depend on drive side cable detection. Fix it. [ bart: fix off-by-1 bit name in the patch description ] Signed-off-by: Tejun Heo <htejun@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-03cmd64x: fix PIO mode setup (take 3)Sergei Shtylyov
The driver's tuneproc() method fails to set the drive's own speed -- fix this by renaming the function to cmd64x_tune_pio(), making it return the mode set, and "wrapping" the new tuneproc() method around it; while at it, also get rid of the non-working prefetch control code (filtering out related argument values in the "wrapper"), remove redundant PIO5 mode limitation, make cmdprintk() give more sensible mode info, and remove mention about the obsolete /proc/ interface. Get rid of the broken config_chipset_for_pio() which always tried to set PIO4, switch to always auto-tuning PIO instead. Oh, and add the missing PIO5 support to the speedproc() method while at it. :-) Warning: compile tested only -- getting to the real hardware isn't that easy... On Tuesday 06 February 2007 22:11, Mikael Pettersson <mikpe@it.uu.se> wrote: > > Worked fine on my SPARC Ultra5 with a CMD646 IDE controller. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-03alim15x3: fix PIO mode setupSergei Shtylyov
The driver's tuneproc() method fails to set the drive's own speed -- fix this by renaming the function to ali15x3_tune_pio() and "wrapping" the new tuneproc() method around it and making it return the mode set, update the heading comment. Also, setting PIO mode via the speedproc() method does not work due to passing to the tuneproc() method's a mode number not biased by XFER_PIO_0 -- fix this along with a typo in the heading comment... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-19Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivialLinus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (25 commits) Documentation/kernel-docs.txt update. arch/cris: typo in KERN_INFO Storage class should be before const qualifier kernel/printk.c: comment fix update I/O sched Kconfig help texts - CFQ is now default, not AS. Remove duplicate listing of Cris arch from README kbuild: more doc. cleanups doc: make doc. for maxcpus= more visible drivers/net/eexpress.c: remove duplicate comment add a help text for BLK_DEV_GENERIC correct a dead URL in the IP_MULTICAST help text fix the BAYCOM_SER_HDX help text fix SCSI_SCAN_ASYNC help text trivial documentation patch for platform.txt Fix typos concerning hierarchy Fix comment typo "spin_lock_irqrestore". Fix misspellings of "agressive". drivers/scsi/a100u2w.c: trivial typo patch Correct trivial typo in log2.h. Remove useless FIND_FIRST_BIT() macro from cardbus.c. ...
2007-02-17add a help text for BLK_DEV_GENERICJohn Daiker
This fixes kernel Bugzilla #4933. Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-02-17ide: make ide_hwif_t.ide_dma_host_on void (v2)Bartlomiej Zolnierkiewicz
* since ide_hwif_t.ide_dma_host_on is called either when drive->using_dma == 1 or when return value is discarded make it void, also drop "ide_" prefix * make __ide_dma_host_on() void and drop "__" prefix v2: * while at it rename atiixp_ide_dma_host_on() to atiixp_dma_host_on() and sgiioc4_ide_dma_host_on() to sgiioc4_dma_host_on(). [ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17ide: make ide_hwif_t.ide_dma_{host_off,off_quietly} void (v2)Bartlomiej Zolnierkiewicz
* since ide_hwif_t.ide_dma_{host_off,off_quietly} always return '0' make these functions void and while at it drop "ide_" prefix * fix comment for __ide_dma_off_quietly() * make __ide_dma_{host_off,off_quietly,off}() void and drop "__" prefix v2: * while at it rename atiixp_ide_dma_host_off() to atiixp_dma_host_off(), sgiioc4_ide_dma_{host_off,off_quietly}() to sgiioc4_dma_{host_off,off_quietly}() and sl82c105_ide_dma_off_quietly() to sl82c105_dma_off_quietly() [ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17ide: add ide_set_dma() helper (v2)Bartlomiej Zolnierkiewicz
* 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-17sgiioc4: fix sgiioc4_ide_dma_check() to enable/disable DMA properlyBartlomiej Zolnierkiewicz
* use sgiioc4_ide_dma_{on,off_quietly}() instead of changing drive->using_dma directly * fix warning message * add FIXME Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17ide: disable DMA in ->ide_dma_check for "no IORDY" case (v2)Bartlomiej Zolnierkiewicz
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 Zolnierkiewicz
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 Zolnierkiewicz
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 Zolnierkiewicz
* 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 Zolnierkiewicz
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-17ide: remove ide_drive_t.usageBartlomiej Zolnierkiewicz
This field is no longer used by the core IDE code so fix ide-{disk,floppy} drivers to keep openers count in the driver specific objects and remove it from ide-{cd,scsi,tape} drivers (it was write-only). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17ide: remove ide_pci_device_t tables with only one entryBartlomiej Zolnierkiewicz
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17ide: remove write-only ide_hwif_t.no_dsc flagBartlomiej Zolnierkiewicz
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17ide: remove write-only ide_pio_data_t.blacklistedBartlomiej Zolnierkiewicz
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17sis5513: sis5513_config_xfer_rate() cleanupBartlomiej Zolnierkiewicz
* remove bogus comment for sis5513_config_xfer_rate() * there is no need to call config_drive_art_rwp() because it is called by config_art_rwp_pio() * remove needless wrapper * remove stale "TODO" comment (IDE core should provide generic tuning code) Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17piix: cleanupBartlomiej Zolnierkiewicz
* disable DMA masks if no_piix_dma is set and remove now not needed no_piix_dma_check from piix_config_drive_for_dma() * there is no need to read register 0x55 in init_hwif_piix() * move cable detection code to piix_cable_detect() * remove unreachable 82371MX code from init_hwif_piix() Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17svwks: small cleanupBartlomiej Zolnierkiewicz
* remove redundant svwks_ide_dma_end() [ __ide_dma_end() is used by default ] * remove init_dma_svwks() so the default ide_setup_dma() function is used [ init_setup_csb6() takes care of not initializing disabled channels ] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17cs5530: small cleanupBartlomiej Zolnierkiewicz
* BUG() on unknown DMA mode in cs5530_config_dma() * there is no need to call hwif->ide_dma_host_{off,on}() in cs5530_config_dma() because hwif->ide_dma_host_{off,on}() is called by hwif->ide_dma_off_{quietly,on}() Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17hpt366: remove redundant check from init_dma_hpt366()Bartlomiej Zolnierkiewicz
->init_dma() cannot be called with dmabase == 0 (see drivers/ide/setup-pci.c) Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17trm290: remove redundant CONFIG_BLK_DEV_IDEDMA #ifdef-sBartlomiej Zolnierkiewicz
In drivers/ide/Kconfig BLK_DEV_TRM290 depends on BLK_DEV_IDEDMA_PCI (on which is BLK_DEV_IDEDMA dependant on). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17au1xxx-ide: remove dead codeBartlomiej Zolnierkiewicz
'speed' is always equal to 'mode' when ide_config_drive_speed() is called Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17pdc202xx_old: remove dead codeBartlomiej Zolnierkiewicz
CONFIG_PDC202XX_MASTER config option doesn't exist Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17drivers/ide: PATA driver for CellebKou Ishizaki
This is the patch (based on 2.6.19-rc4) for PATA controller of Toshiba Cell reference set(Celleb). The reference set consists of Cell, 512MB memory, Super Companion Chip(SCC) and some peripherals such as HDD, GbE, etc. You can see brief explanation and picture of Cell reference set at following URLs. http://www.toshiba.co.jp/about/press/2005_09/pr2001.htm http://cell-industries.com/toshiba_announces.php We use a drivers/ide driver because its design is more suitable for SCC IDE controller than libata driver. Since SCC supports only 32bit read/write, we must override many callbacks of ata_port_operations by modifying generic helpers. Each time the libata common code is updated, we must update those modified helpers. It is very hard for us. But we will try to implement the libata driver as needed. Signed-off-by: Kou Ishizaki <kou.ishizaki at toshiba.co.jp> Signed-off-by: Akira Iguchi <akira2.iguchi at toshiba.co.jp> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17sl82c105: DMA support fixesSergei Shtylyov
Fix a number of issues with the DMA support code: - driver claims support for all SW/MW DMA modes while supporting only MWDMA2; - ide_dma_check() method tries to enable DMA on the "known good" drives which don't support MWDMA2; - ide_dma_on() method upon failure to set drive to MWDMA2 re-tunes already tuned PIO mode and calls ide_dma_off() method instead of returning error; - ide_dma_off() method sets drive->current_speed while it doesn't actually change (only the PIO timings are re-loaded into the chip's registers); - init_hwif() method forcibly sets/resets both "drive DMA capable" bits while this is properly handled by ide_dma_{on,off}() methods being called later... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17pdc202xx_old: fix PIO mode setupSergei Shtylyov
Fix the driver's tuneproc() method to always set the PIO mode requested and not pick the best possible one, rename it to pdc202xx_tune_drive(), and change the calls to it accordingly; remove the preceding comment which has nothing to do with the code. Sergei Shtylyov wrote: > The tuneproc() method should take arg 255 for auto-selecting the best PIO > mode, not 5 as it did here + this driver's method always auto-selected instead > of setting the mode it's been told to -- issue typical to drivers/ide/... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17siimage: PIO1/2 taskfile transfer overclocking fixSergei Shtylyov
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-02-17ide: remove clearing bmdma status from cdrom_decode_status() (rev #4)Albert Lee
patch 2/2: Remove clearing bmdma status from cdrom_decode_status() since ATA devices might need it as well. (http://lkml.org/lkml/2006/12/4/201 and http://lkml.org/lkml/2006/11/15/94) Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: "Adam W. Hawks" <awhawks@us.ibm.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17ide: clear bmdma status in ide_intr() for ICHx controllers (revised #4)Albert Lee
patch 1/2 (revised): - Fix drive->waiting_for_dma to work with CDB-intr devices. - Do the dma status clearing in ide_intr() and add a new hwif->ide_dma_clear_irq for Intel ICHx controllers. Revised per Alan, Sergei and Bart's advice. Patch against 2.6.20-rc6. Tested ok on my ICH4 and pdc20275 adapters. Please review/apply, thanks. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: "Adam W. Hawks" <awhawks@us.ibm.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-02-17ide-floppy: Fix unformatted media crashAlan Cox
A ZIP or similar with unformatted media will cause crashes when attempts are made to read/write it in some cases. This is because bs_factor is zero and we divide by it causing an oops. As the size of a non-accessible/non-existant media is really a bit of a zen question it doesn't matter if non-existant media is 512 bytes per sector or zero. Setting it to 1 causes us to generate 512 bytes/sector accesses and error properly. Based on a fix found lurking in an ancient bugzilla entry since about 2004 (ugghhh) Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>