mirror of
https://github.com/torvalds/linux.git
synced 2024-11-02 02:01:29 +00:00
14d66ab7e2
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> |
||
---|---|---|
.. | ||
ahci.c | ||
ata_generic.c | ||
ata_piix.c | ||
Kconfig | ||
libata-acpi.c | ||
libata-core.c | ||
libata-eh.c | ||
libata-scsi.c | ||
libata-sff.c | ||
libata.h | ||
Makefile | ||
pata_ali.c | ||
pata_amd.c | ||
pata_artop.c | ||
pata_atiixp.c | ||
pata_cmd64x.c | ||
pata_cs5520.c | ||
pata_cs5530.c | ||
pata_cs5535.c | ||
pata_cypress.c | ||
pata_efar.c | ||
pata_hpt3x2n.c | ||
pata_hpt3x3.c | ||
pata_hpt37x.c | ||
pata_hpt366.c | ||
pata_isapnp.c | ||
pata_it821x.c | ||
pata_it8213.c | ||
pata_ixp4xx_cf.c | ||
pata_jmicron.c | ||
pata_legacy.c | ||
pata_marvell.c | ||
pata_mpc52xx.c | ||
pata_mpiix.c | ||
pata_netcell.c | ||
pata_ns87410.c | ||
pata_oldpiix.c | ||
pata_opti.c | ||
pata_optidma.c | ||
pata_pcmcia.c | ||
pata_pdc202xx_old.c | ||
pata_pdc2027x.c | ||
pata_platform.c | ||
pata_qdi.c | ||
pata_radisys.c | ||
pata_rz1000.c | ||
pata_sc1200.c | ||
pata_scc.c | ||
pata_serverworks.c | ||
pata_sil680.c | ||
pata_sis.c | ||
pata_sl82c105.c | ||
pata_triflex.c | ||
pata_via.c | ||
pata_winbond.c | ||
pdc_adma.c | ||
sata_inic162x.c | ||
sata_mv.c | ||
sata_nv.c | ||
sata_promise.c | ||
sata_promise.h | ||
sata_qstor.c | ||
sata_sil24.c | ||
sata_sil.c | ||
sata_sis.c | ||
sata_svw.c | ||
sata_sx4.c | ||
sata_uli.c | ||
sata_via.c | ||
sata_vsc.c | ||
sis.h |