Skip to contentSkip to conversation

IDE DMA doesn't work with pata_via and compact flash card

DISCUSSION Philipp Wollermann 3 participants 6 messages Oct 11, 2007

lore
Share & tools
lore
#0 lore raw

Hello,

I've got a problem with the linux kernel, which doesn't boot from a compact flash card (SanDisk Ultra 2 2048 MB) when trying to use DMA. I want to boot my PC from the CF card using a CF-to-IDE adapter. It works perfectly when using a card-reader instead of the adapter and booting from USB. I'm using kernel 2.6.23 and the new Parallel ATA drivers (pata_via). The board is a Tyan Tomcat K7M with the VIA KN400A chipset and VT8237 Southbridge. I also tried using the old IDE drivers, which give me the same error messages and also hang in a loop like the new ones, when using DMA. Turning off DMA for the old IDE drivers or patching ata_generic to handle my IDE controller and then deactivating DMA in the BIOS works, but then disk I/O is unbelievable slow.. do you have any idea how to fix it, so that DMA works?

Best regards,
Philipp

Boot messages:

scsi0: pata_via
scsi1: pata_via
ata1: PATA max UDMA/133 cmd 0x000101f0 ctl 0x000103f6 bmdma 0x0001e500 irq 14
ata2: PATA max UDMA/133 cmd 0x000101f0 ctl 0x000103f6 bmdma 0x0001e500 irq 15 ata1.00: CFA: SanDisk SDCFH-2048, HDX 4.04, max MWDMA2
ata1.00: 4001760 sectors, multi 0: LBA
ata1.00: configured for MWDMA2
scsi 0:0:0:0: Direct-Access ATA SanDisk SDCFH-20 HDX PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 4001760 512-byte hardware sectors (2049 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA sd 0:0:0:0: [sda] 4001760 512-byte hardware sectors (2049 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sda:[here it hangs for some time ...]<3>ata1.00: exception Emask 0x0
SAct 0x0 SErr 0x0 action 0x2 frozen
ata1.00: cmd c8/00:08:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0 data 4096 in

         res 40/00:00:00:00:00/00:00:00:00/00 Emask 0x4 (timeout)

ata1: soft resetting port
ata1.00: configured for MWDMA
ata1: EH complete
ata1.00: cmd c8/00:08:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0 data 4096 in

         res 40/00:00:00:00:00/00:00:00:00/00 Emask 0x4 (timeout)

ata1: soft resetting port
ata1.00: configured for MWDMA
ata1: EH complete
ata1.00: cmd c8/00:08:00:00/00:00:00:00:00/e0 tag 0 cdb 0x0 data 4096 in

         res 40/00:00:00:00:00/00:00:00:00/00 Emask 0x4 (timeout)

ata1: soft resetting port
ata1.00: configured for MWDMA
ata1: EH complete
[...]

lspci -vv:
[...]
00:00.0 Host bridge: VIA Technologies, Inc. VT8378 [KM400/A] Chipset Host Bridge
Subsystem: VIA Technologies, Inc. VT8378 [KM400/A] Chipset Host
Bridge
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66MHz+ UDF- FastB2B- ParErr- DEVSEL=medium

Quoted 1 line

TAbort- <TAbort- <MAbort+ >SERR- <PERR-

        Latency: 8
        Region 0: Memory at e0000000 (32-bit, prefetchable) [size=128M]
        Capabilities: [80] AGP version 3.5
                Status: RQ=32 Iso- ArqSz=0 Cal=2 SBA+ ITACoh- GART64- 
HTrans- 64bit- FW- AGP3- Rate=x1,x2,x4
                Command: RQ=1 ArqSz=0 Cal=0 SBA- AGP- GART64- 64bit- 

FW- Rate=<none>
Capabilities: [c0] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
[...]
00:0f.0 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06) (prog-if 8a [Master SecP PriP])
Subsystem: VIA Technologies, Inc.
VT82C586/B/VT82C686/A/B/VT8233/A/C/VT8235 PIPC Bus Master IDE
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium

Quoted 1 line

TAbort- <TAbort- <MAbort- >SERR- <PERR-

        Latency: 32
        Interrupt: pin A routed to IRQ 18
        Region 0: [virtual] Memory at 000001f0 (32-bit, 
non-prefetchable) [size=8]
        Region 1: [virtual] Memory at 000003f0 (type 3, 
non-prefetchable) [size=1]
        Region 2: [virtual] Memory at 00000170 (32-bit, 
non-prefetchable) [size=8]
        Region 3: [virtual] Memory at 00000370 (type 3, 

non-prefetchable) [size=1]
Region 4: I/O ports at e500 [size=16]
Capabilities: [c0] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
[...]

#1 lore raw
Quoted 4 lines

ones, when using DMA. Turning off DMA for the old IDE drivers or patching ata_generic to handle my IDE controller and then deactivating DMA in the BIOS works, but then disk I/O is unbelievable slow.. do you have any idea how to fix it, so that DMA works?

Does your CF/IDE adapter support DMA ?

#2 lore raw
Quoted 6 lines · Alan Cox
Quoted 4 lines

ones, when using DMA. Turning off DMA for the old IDE drivers or patching ata_generic to handle my IDE controller and then deactivating DMA in the BIOS works, but then disk I/O is unbelievable slow.. do you have any idea how to fix it, so that DMA works?

Does your CF/IDE adapter support DMA ?

Thank you for your answer :)

I thought CF/IDE adapters are mainly electrical adapters.. I've never seen one which explicitly states the modes it supports. On the other hand it says on the package: "Vista compatible" (whatever that means)

Is there some way I can figure it out? I'll have a deeper look on the datasheet when I'm home again later, but I'm rather sure there wasn't anything mentioning supporting data transfer modes..

Best regards,
Philipp

#5 lore raw
In reply to Alan Cox
Quoted 6 lines · Alan Cox
Quoted 4 lines

ones, when using DMA. Turning off DMA for the old IDE drivers or patching ata_generic to handle my IDE controller and then deactivating DMA in the BIOS works, but then disk I/O is unbelievable slow.. do you have any idea how to fix it, so that DMA works?

Does your CF/IDE adapter support DMA ?

Oh well, you're right.. there are still some CF/IDE adapters which do not support DMA. I'll guess this is the problem then, so I'll return it to the shop.

Best regards,
Philipp

#3 lore raw
In reply to [email protected]
Quoted 5 lines · [email protected] wrote:
Quoted 2 lines

Does your CF/IDE adapter support DMA ?

Thank you for your answer :)

Quoted 8 lines

I thought CF/IDE adapters are mainly electrical adapters.. I've never seen one which explicitly states the modes it supports. On the other hand it says on the package: "Vista compatible" (whatever that means)

Is there some way I can figure it out? I'll have a deeper look on the datasheet when I'm home again later, but I'm rather sure there wasn't anything mentioning supporting data transfer modes..

Some take care to document this. I checked dma capability before bying mine. mini-itx.com seems to get this right.

Helge Hafting

#4 lore raw
Quoted 9 lines · Helge Hafting
Quoted 6 lines · [email protected] wrote:
Quoted 1 line

Does your CF/IDE adapter support DMA ?

Is there some way I can figure it out? I'll have a deeper look on the datasheet when I'm home again later, but I'm rather sure there wasn't anything mentioning supporting data transfer modes..

Some take care to document this. I checked dma capability before bying mine. mini-itx.com seems to get this right.

I have returned the adapter card, it indeed didn't support DMA (I checked the pins on the board, pin 21 and 29 are necessary for DMA support and they weren't wired). I bought a new one which explicitly supports DMA and will report when it ships. :)

Best regards,
Philipp