kernel-fxtec-pro1x/drivers/ata
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
..
ahci.c ahci: RAID mode SATA patch for Intel ICH9M 2007-03-06 04:04:30 -05:00
ata_generic.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
ata_piix.c ata_piix: Remove ugly layering violation 2007-03-09 08:41:15 -05:00
Kconfig libata: Fix Cell SATA driver dependencies 2007-02-21 04:58:17 -05:00
libata-acpi.c [PATCH] libata-acpi: Try and stop all the non PCI devices crashing 2007-03-08 14:19:13 -08:00
libata-core.c Fix simplex adapters with libata 2007-03-09 08:41:15 -05:00
libata-eh.c libata: add CONFIG_PM to libata core layer 2007-03-02 18:30:35 -05:00
libata-scsi.c libata: add CONFIG_PM to libata core layer 2007-03-02 18:30:35 -05:00
libata-sff.c [libata] Trim trailing whitespace. 2007-02-26 05:51:33 -05:00
libata.h SiS warning fixes 2007-02-21 04:58:17 -05:00
Makefile libata: PATA driver for Celleb 2007-02-21 04:58:16 -05:00
pata_ali.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_amd.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_artop.c libata: add another IRQ calls (libata drivers) 2007-02-09 17:39:38 -05:00
pata_atiixp.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_cmd64x.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_cs5520.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_cs5530.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_cs5535.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_cypress.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_efar.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_hpt3x2n.c libata: add another IRQ calls (libata drivers) 2007-02-09 17:39:38 -05:00
pata_hpt3x3.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_hpt37x.c [libata] bump versions 2007-02-26 06:04:24 -05:00
pata_hpt366.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_isapnp.c libata: clear drvdata in ata_host_release(), take#2 2007-03-01 20:16:28 -05:00
pata_it821x.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_it8213.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_ixp4xx_cf.c [libata] bump versions 2007-02-26 06:04:24 -05:00
pata_jmicron.c [libata] pata_jmicron: build fix 2007-03-03 10:36:19 -05:00
pata_legacy.c pata_legacy: fix io/irq mismatch 2007-03-06 04:04:30 -05:00
pata_marvell.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_mpc52xx.c libata: add missing PM callbacks 2007-03-02 18:27:34 -05:00
pata_mpiix.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_netcell.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_ns87410.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_oldpiix.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_opti.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_optidma.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_pcmcia.c [libata] bump versions 2007-02-26 06:04:24 -05:00
pata_pdc202xx_old.c pata_pdc202xx_old: fix data corruption and other problems 2007-03-06 04:04:30 -05:00
pata_pdc2027x.c [libata] bump versions 2007-02-26 06:04:24 -05:00
pata_platform.c libata: clear drvdata in ata_host_release(), take#2 2007-03-01 20:16:28 -05:00
pata_qdi.c pata_qdi: Fix initialisation 2007-03-02 18:18:38 -05:00
pata_radisys.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_rz1000.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_sc1200.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_scc.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_serverworks.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_sil680.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_sis.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_sl82c105.c [libata] pata_{legacy,sc1200,sl82c105}: add missing hooks 2007-03-02 18:09:05 -05:00
pata_triflex.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_via.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
pata_winbond.c [libata] bump versions 2007-02-26 06:04:24 -05:00
pdc_adma.c [libata] bump versions 2007-02-26 06:04:24 -05:00
sata_inic162x.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
sata_mv.c [libata] bump versions 2007-02-26 06:04:24 -05:00
sata_nv.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
sata_promise.c [libata] bump versions 2007-02-26 06:04:24 -05:00
sata_promise.h
sata_qstor.c [libata] bump versions 2007-02-26 06:04:24 -05:00
sata_sil.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
sata_sil24.c libata: add missing CONFIG_PM in LLDs 2007-03-02 18:30:35 -05:00
sata_sis.c [libata] Trim trailing whitespace. 2007-02-26 05:51:33 -05:00
sata_svw.c [libata] bump versions 2007-02-26 06:04:24 -05:00
sata_sx4.c [libata] bump versions 2007-02-26 06:04:24 -05:00
sata_uli.c [libata] bump versions 2007-02-26 06:04:24 -05:00
sata_via.c [libata] bump versions 2007-02-26 06:04:24 -05:00
sata_vsc.c [libata] bump versions 2007-02-26 06:04:24 -05:00
sis.h SiS warning fixes 2007-02-21 04:58:17 -05:00