linux/drivers
Petr Vandrovec 14d66ab7e2 Fix simplex adapters with libata
Recently I got my hands on nVidia's MCP61 PM-AM board, and
it contains IDE chip configured by BIOS with only primary
channel enabled.  This confuses code which probes for
device DMA capabilities - it gets 0x60 (happy duplex
device) from primary channel BMDMA, but 0xFF (nobody here)
from secondary channel BMDMA.  Due to this code then believes
that chip is simplex.  I do not address this problem in
my patch, as I'm not sure how to handle this.  Probably
ata_pci_init_one should have bitmap of enabled/possible
interfaces instead of their count, but it looks like
quite intrusive change, and maybe we do not care - for device
with only one channel simplex and regular DMA engines are
same.

But making device simplex pointed out that support for
DMA on simplex devices is currently broken - ata_dev_xfermask
tests whether device is simplex and if it is whether DMA
engine was assigned to this port.  If not then it strips
out DMA bits from device.  Problem is that code which assigns
DMA engine to port in ata_set_mode first detect device
mode and assigns DMA engine to channel only if some DMA
capable device was found.

And as xfermask stripped out DMA bits, host->simplex_claimed
is always NULL with current implementation.

By allowing DMA either if simplex_claimed is NULL or if it
points to current port DMA can be finally used - it gets
assigned to first port which contains any DMA capable
device.

Before:
pata_amd 0000:00:06.0: version 0.2.8
PCI: Setting latency timer of device 0000:00:06.0 to 64
ata5: PATA max UDMA/133 cmd 0x000101f0 ctl 0x000103f6 bmdma 0x0001f000 irq 14
ata6: PATA max UDMA/133 cmd 0x00010170 ctl 0x00010376 bmdma 0x0001f008 irq 15
scsi4 : pata_amd
ata5.00: ATAPI, max UDMA/66
ata5.00: simplex DMA is claimed by other device, disabling DMA
ata5.00: configured for PIO4
scsi5 : pata_amd
ata6: port disabled. ignoring.
ata6: reset failed, giving up
scsi 4:0:0:0: CD-ROM            ATAPI    DVD W  DH16W1P   LG12 PQ: 0 ANSI: 5

After:
pata_amd 0000:00:06.0: version 0.2.8
PCI: Setting latency timer of device 0000:00:06.0 to 64
ata5: PATA max UDMA/133 cmd 0x000101f0 ctl 0x000103f6 bmdma 0x0001f000 irq 14
ata6: PATA max UDMA/133 cmd 0x00010170 ctl 0x00010376 bmdma 0x0001f008 irq 15
scsi4 : pata_amd
ata5.00: ATAPI, max UDMA/66
ata5.00: configured for UDMA/33
scsi5 : pata_amd
ata6: port disabled. ignoring.
ata6: reset failed, giving up
scsi 4:0:0:0: CD-ROM            ATAPI    DVD W  DH16W1P   LG12 PQ: 0 ANSI: 5

Signed-off-by: Petr Vandrovec <petr@vandrovec.name>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-09 08:41:15 -05:00
..
acorn [ARM] Acorn: move the i2c bus driver into drivers/i2c 2007-03-04 20:40:50 +00:00
acpi [PATCH] ACPI: make bay depend on dock 2007-03-01 14:53:38 -08:00
amba
ata Fix simplex adapters with libata 2007-03-09 08:41:15 -05:00
atm
auxdisplay
base Driver core: fix error by cleanup up symlinks properly 2007-02-23 14:52:09 -08:00
block [PATCH] initramfs should not depend on CONFIG_BLOCK 2007-03-06 09:30:25 -08:00
bluetooth [Bluetooth] Make use of MODULE_FIRMWARE 2007-02-26 11:42:42 -08:00
cdrom [PATCH] Fix soft lockup with iSeries viocd driver 2007-03-05 07:57:51 -08:00
char [CHAR] ds1286: Fix handling of seconds in RTC_ALM_SET ioctl. 2007-03-08 01:10:30 +00:00
clocksource [PATCH] clocksource init adjustments (fix bug #7426) 2007-03-05 07:57:53 -08:00
connector [CONNECTOR]: Bugfix for cn_call_callback() 2007-03-07 16:08:08 -08:00
cpufreq Revert "[CPUFREQ] constify cpufreq_driver where possible." 2007-02-26 14:55:48 -08:00
crypto [PATCH] geode-aes: use unsigned long for spin_lock_irqsave 2007-03-06 09:30:25 -08:00
dio
dma
edac
eisa
fc4
firmware
hid HID: fix Logitech DiNovo Edge touchwheel and Logic3 /SpectraVideo middle button 2007-03-01 09:54:44 +01:00
hwmon
i2c [ARM] Acorn: move the i2c bus driver into drivers/i2c 2007-03-04 20:40:50 +00:00
ide ide: make legacy IDE VLB modules check for the "probe" kernel params (v2) 2007-03-03 17:48:55 +01:00
ieee1394
infiniband IPoIB: Turn on interface's carrier after broadcast group is joined 2007-03-08 14:59:30 -08:00
input Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input 2007-03-08 07:28:30 -08:00
isdn [PATCH] Fix buffer overflow and races in capi debug functions 2007-03-01 14:53:39 -08:00
kvm KVM: Move kvmfs magic number to <linux/magic.h> 2007-03-04 11:12:43 +02:00
leds
macintosh
mca
md [PATCH] md: fix for raid6 reshape 2007-03-05 07:57:53 -08:00
media V4L/DVB (5260): Cx88-blackbird: allow usage of both 376836 and 262144 sized firmware images 2007-03-03 10:14:36 -02:00
message
mfd [PATCH] drivers/mfd/sm501.c: Replace pci_module_init with pci_register_driver 2007-02-26 12:35:47 -08:00
misc
mmc sdhci: release irq during suspend 2007-03-06 13:38:49 +01:00
mtd [ARM] 4233/1: nand/s3c2410.c: warning fix 2007-02-25 16:41:41 +00:00
net Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2007-03-06 19:53:34 -08:00
nubus
oprofile
parisc Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6 2007-02-26 12:48:06 -08:00
parport
pci [PATCH] msi: support masking msi irqs without a mask bit 2007-03-05 07:57:50 -08:00
pcmcia Driver core: more fallout from class_device changes for pcmcia 2007-02-23 14:52:09 -08:00
pnp
ps3
rapidio
rtc [ARM] rtc-pcf8583: Final fixes for this RTC on RiscPC 2007-03-04 20:33:07 +00:00
s390 [S390] cio: Call cancel_halt_clear even when actl == 0. 2007-03-05 23:36:02 +01:00
sbus [SPARC] uctrl: Check request_irq() return value. 2007-02-26 11:35:51 -08:00
scsi [ARM] ARM SCSI: Don't try to dma_map_sg too many scatterlist entries 2007-03-04 20:33:31 +00:00
serial [PATCH] 2.6 Altix: console fix for CONFIG_DEBUG_SHIRQ usage 2007-03-08 07:39:15 -08:00
sh
sn
spi
tc
telephony
usb Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid 2007-03-06 17:34:28 -08:00
video [PATCH] fbdev: fix kconfig error if FB_DDC=n 2007-03-06 09:30:24 -08:00
w1
zorro
Kconfig
Makefile