linux/drivers
Bartlomiej Zolnierkiewicz 6f5050a96c ide: don't allow DMA to be enabled if CONFIG_IDEDMA_{ICS,PCI}_AUTO=n
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-17 21:57:39 +01:00
..
acorn
acpi [PATCH] misc NULL noise 2007-03-14 15:27:49 -07:00
amba
ata [PATCH] trivial ATA iomem annotations 2007-03-14 15:27:50 -07:00
atm [PATCH] zatm __init abuse 2007-03-14 15:27:49 -07:00
auxdisplay
base [PATCH] sysfs and driver core: add callback helper, used by SCSI and S390 2007-03-15 15:29:26 -07:00
block [PATCH] paride endianness annotations 2007-03-14 15:27:50 -07:00
bluetooth
cdrom
char Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 2007-03-16 19:28:15 -07:00
clocksource
connector
cpufreq
crypto
dio
dma [PATCH] rm pointless dmaengine exports 2007-03-16 19:25:03 -07:00
edac
eisa
fc4
firmware
hid Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid 2007-03-15 10:50:54 -07:00
hwmon [PATCH] hwmon: Build fix for SENSORS_W83793 2007-03-16 19:25:06 -07:00
i2c
ide ide: don't allow DMA to be enabled if CONFIG_IDEDMA_{ICS,PCI}_AUTO=n 2007-03-17 21:57:39 +01:00
ieee1394
infiniband [PATCH] fix ipath_dma_free_coherent() prototype 2007-03-14 15:27:49 -07:00
input
isdn
kvm
leds
macintosh
mca
md [PATCH] fix read past end of array in md/linear.c 2007-03-16 19:25:03 -07:00
media [PATCH] misc NULL noise 2007-03-14 15:27:49 -07:00
message
mfd
misc
mmc [ARM] 4256/1: i.MX/MX1 SDHC fix/workaround of SD card recognition problems 2007-03-12 16:49:37 +00:00
mtd
net natsemi: Avoid IntrStatus lossage if RX state machine resets. 2007-03-15 10:59:54 -04:00
nubus
oprofile
parisc
parport
pci [PATCH] pci: Repair pci_save/restore_state so we can restore one save many times. 2007-03-12 16:31:50 -07:00
pcmcia
pnp [PATCH] reduce pnp syslog spam 2007-03-16 19:25:02 -07:00
ps3 [PATCH] C99 initializers, proper use of const in drivers/ps3 2007-03-14 15:27:50 -07:00
rapidio
rtc
s390 [PATCH] sysfs and driver core: add callback helper, used by SCSI and S390 2007-03-15 15:29:26 -07:00
sbus
scsi [PATCH] sysfs and driver core: add callback helper, used by SCSI and S390 2007-03-15 15:29:26 -07:00
serial
sh
sn
spi [PATCH] spi_s3c24xx.c: warning fix 2007-03-16 19:25:06 -07:00
tc
telephony
usb Revert "USB: pxa2xx_udc: fix hardcoded irq number" 2007-03-10 14:22:07 -08:00
video [PATCH] bool fbdevs must depend on FB = y 2007-03-16 19:25:05 -07:00
w1
zorro
Kconfig
Makefile