Failing to get DMA working with MPC5200 (TQM5200) and CompactFlash
Hello,
We've tried both 2.6.33 and DENX-v2.6.33.1, and we haven't managed to successfully use any form of DMA with the TQM5200 and a CompactFlash card. We know the CF card supports DMA (or, at least, it says "UDMA" right on the card, and various reports say Lexar Professional CF cards do DMA), but the kernel always puts the card in PIO4 mode. We tried libata.force=mwdma2 and libata.force=udma2 , and many other modes, but this always led to failures like this:
[ 31.994311] ata1: lost interrupt (Status 0x58)
[ 32.020435] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 32.027712] ata1.00: failed command: READ DMA
[ 32.032236] ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 in
[ 32.032249] res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 32.047212] ata1.00: status: { DRDY }
[ 32.051050] ata1: soft resetting link
[ 32.218796] ata1.00: FORCE: xfer_mask set to udma2
[ 32.230618] ata1.00: configured for UDMA/33
[ 32.235000] ata1.00: device reported invalid CHS sector 0
[ 32.240629] ata1: EH complete
[ 62.994310] ata1: lost interrupt (Status 0x58)
[ 63.020443] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[ 63.027722] ata1.00: failed command: READ DMA
[ 63.032246] ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 in
[ 63.032259] res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 63.047221] ata1.00: status: { DRDY }
[ 63.051060] ata1: soft resetting link
[ 63.218778] ata1.00: FORCE: xfer_mask set to udma2
[ 63.238603] ata1.00: configured for UDMA/33
[ 63.242978] ata1.00: device reported invalid CHS sector 0
[ 63.248609] ata1: EH completeWe have the MPC5200C revision of the silicon.
Does this sound like a known issue? Can we do anything to troubleshoot this further?
Thanks,
Josh Triplett and Jamey Sharp
Portland State Aerospace Society
On Tue, Mar 16, 2010 at 11:17 PM, Josh Triplett <[email protected]> wro= te:
Quoted 8 lines
Hello,
We've tried both 2.6.33 and DENX-v2.6.33.1, and we haven't managed to successfully use any form of DMA with the TQM5200 and a CompactFlash card. =A0We know the CF card supports DMA (or, at least, it says "UDMA" right on the card, and various reports say Lexar Professional CF cards do DMA), but the kernel always puts the card in PIO4 mode. =A0We tried libata.force=3Dmwdma2 and libata.force=3Dudma2 , and many other modes, bu=
t
Quoted 4 lines
this always led to failures like this:
[ =A0 31.994311] ata1: lost interrupt (Status
0x58)
[ =A0 32.020435] ata1.00: exception Emask0x0SAct0x0SErr0x0action 0x=
6 frozen
Quoted 2 lines
[ =A0 32.027712] ata1.00: failed command: READ DMA
[ =A0 32.032236] ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 d=
ma 4096 in
Quoted 1 line
[ =A0 32.032249] =A0 =A0 =A0 =A0 =A0res 40/00:00:00:00:00/00:00:00:00:00/=
00 Emask 0x4 (timeout)
Quoted 8 lines
[ =A0 32.047212] ata1.00: status: { DRDY }
[ =A0 32.051050] ata1: soft resetting link
[ =A0 32.218796] ata1.00: FORCE:xfer_maskset to udma2
[ =A0 32.230618] ata1.00: configured for UDMA/33
[ =A0 32.235000] ata1.00: device reported invalid CHS sector 0 [ =A0 32.240629] ata1: EH complete
[ =A0 62.994310] ata1: lost interrupt (Status0x58)
[ =A0 63.020443] ata1.00: exception Emask0x0SAct0x0SErr0x0action 0x=
6 frozen
Quoted 2 lines
[ =A0 63.027722] ata1.00: failed command: READ DMA
[ =A0 63.032246] ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 d=
ma 4096 in
Quoted 1 line
[ =A0 63.032259] =A0 =A0 =A0 =A0 =A0res 40/00:00:00:00:00/00:00:00:00:00/=
00 Emask 0x4 (timeout)
Quoted 11 lines
[ =A0 63.047221] ata1.00: status: { DRDY }
[ =A0 63.051060] ata1: soft resetting link
[ =A0 63.218778] ata1.00: FORCE:xfer_maskset to udma2 [ =A0 63.238603] ata1.00: configured for UDMA/33
[ =A0 63.242978] ata1.00: device reported invalid CHS sector 0 [ =A0 63.248609] ata1: EH completeWe have the MPC5200C revision of the silicon.
Does this sound like a known issue? =A0Can we do anything to troubleshoot this further?
Not all CF adapters have all the pins wired up that are needed for *DMA modes. That is the most likely problem.
g.
Quoted 34 lines · Grant Likely
Quoted 33 lines · Josh Triplett
Hello,
We've tried both 2.6.33 and DENX-v2.6.33.1, and we haven't managed to successfully use any form of DMA with the TQM5200 and a CompactFlash card. We know the CF card supports DMA (or, at least, it says "UDMA" right on the card, and various reports say Lexar Professional CF cards do DMA), but the kernel always puts the card in PIO4 mode. We tried libata.force=mwdma2 and libata.force=udma2 , and many other modes, but this always led to failures like this:
[ 31.994311] ata1: lost interrupt (Status
0x58)
[ 32.020435] ata1.00: exception Emask0x0SAct0x0SErr0x0action0x6frozen [ 32.027712] ata1.00: failed command: READ DMA
[ 32.032236] ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 in [ 32.032249] res 40/00:00:00:00:00/00:00:00:00:00/00 Emask0x4(timeout) [ 32.047212] ata1.00: status: { DRDY }
[ 32.051050] ata1: soft resetting link
[ 32.218796] ata1.00: FORCE:xfer_maskset to udma2
[ 32.230618] ata1.00: configured for UDMA/33
[ 32.235000] ata1.00: device reported invalid CHS sector 0
[ 32.240629] ata1: EH complete
[ 62.994310] ata1: lost interrupt (Status0x58)
[ 63.020443] ata1.00: exception Emask0x0SAct0x0SErr0x0action0x6frozen [ 63.027722] ata1.00: failed command: READ DMA
[ 63.032246] ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 in [ 63.032259] res 40/00:00:00:00:00/00:00:00:00:00/00 Emask0x4(timeout) [ 63.047221] ata1.00: status: { DRDY }
[ 63.051060] ata1: soft resetting link
[ 63.218778] ata1.00: FORCE:xfer_maskset to udma2
[ 63.238603] ata1.00: configured for UDMA/33
[ 63.242978] ata1.00: device reported invalid CHS sector 0
[ 63.248609] ata1: EH complete
Quoted 7 lines
Quoted 4 lines
We have the MPC5200C revision of the silicon.
Does this sound like a known issue? Can we do anything to troubleshoot this further?
Not all CF adapters have all the pins wired up that are needed for *DMA modes. That is the most likely problem.
True, but we bought a card that specifically advertises support for UDMA, and says UDMA right on the card's label.
http://store.lexar.com/?productid=CF8GB-300-381
It seems unlikely, though not impossible, that they would have screwed up that badly. :)
By the way, we've also tested an IDE hard drive on this board, and it does UDMA2 just fine.
Any thoughts on how we could try to solve this problem?
- Josh Triplett
On Fri, Mar 26, 2010 at 3:32 PM, Josh Triplett <[email protected]> wrot= e:
Quoted 2 lines · Grant Likely
Quoted 1 line
On Tue, Mar 16, 2010 at 11:17 PM, Josh Triplett <[email protected]> =
Quoted 5 lines · wrote:
Quoted 5 lines
Quoted 5 lines
Hello,
We've tried both 2.6.33 and DENX-v2.6.33.1, and we haven't managed to successfully use any form of DMA with the TQM5200 and a CompactFlash card. =A0We know the CF card supports DMA (or, at least, it says "UDMA=
"
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
right on the card, and various reports say Lexar Professional CF cards do DMA), but the kernel always puts the card in PIO4 mode. =A0We tried libata.force=3Dmwdma2 and libata.force=3Dudma2 , and many other modes,=
but
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
this always led to failures like this:
[ =A0 31.994311] ata1: lost interrupt (Status
0x58)
[ =A0 32.020435] ata1.00: exception Emask0x0SAct0x0SErr0x0action=
0x6 frozen
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
[ =A0 32.027712] ata1.00: failed command: READ DMA
[ =A0 32.032236] ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag =
0 dma 4096 in
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ =A0 32.032249] =A0 =A0 =A0 =A0 =A0res 40/00:00:00:00:00/00:00:00:00:=
00/00 Emask 0x4 (timeout)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
[ =A0 32.047212] ata1.00: status: { DRDY }
[ =A0 32.051050] ata1: soft resetting link
[ =A0 32.218796] ata1.00: FORCE:xfer_maskset to udma2
[ =A0 32.230618] ata1.00: configured for UDMA/33
[ =A0 32.235000] ata1.00: device reported invalid CHS sector 0 [ =A0 32.240629] ata1: EH complete
[ =A0 62.994310] ata1: lost interrupt (Status0x58)
[ =A0 63.020443] ata1.00: exception Emask0x0SAct0x0SErr0x0action=
0x6 frozen
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
[ =A0 63.027722] ata1.00: failed command: READ DMA
[ =A0 63.032246] ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag =
0 dma 4096 in
Quoted 1 line
Quoted 1 line
Quoted 1 line
[ =A0 63.032259] =A0 =A0 =A0 =A0 =A0res 40/00:00:00:00:00/00:00:00:00:=
00/00 Emask 0x4 (timeout)
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
[ =A0 63.047221] ata1.00: status: { DRDY }
[ =A0 63.051060] ata1: soft resetting link
[ =A0 63.218778] ata1.00: FORCE:xfer_maskset to udma2 [ =A0 63.238603] ata1.00: configured for UDMA/33
[ =A0 63.242978] ata1.00: device reported invalid CHS sector 0 [ =A0 63.248609] ata1: EH completeWe have the MPC5200C revision of the silicon.
Does this sound like a known issue? =A0Can we do anything to troublesh=
oot
Quoted 10 lines
Quoted 4 lines
Quoted 1 line
this further?
Not all CF adapters have all the pins wired up that are needed for *DMA modes. =A0That is the most likely problem.
True, but we bought a card that specifically advertises support for UDMA, and says UDMA right on the card's label.
Quoted 7 lines
It seems unlikely, though not impossible, that they would have screwed up that badly. :)
By the way, we've also tested an IDE hard drive on this board, and it does UDMA2 just fine.
Any thoughts on how we could try to solve this problem?
Not off the top of my head. I'd have to get onto the board and poke around to figure out what is going on.
g.
--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
Hi Josh,
Quoted 9 lines · Josh Triplett
Quoted 3 lines · Grant Likely
Not all CF adapters have all the pins wired up that are needed for *DMA modes. That is the most likely problem.
True, but we bought a card that specifically advertises support for UDMA, and says UDMA right on the card's label.
Grant was referring to the adapter, not the card!
In fact I still have to see a single CF-to-IDE adapter that does have the wires needed for (U)DMA without me soldering them in place...
Regards,
Wolfgang
On Fri, Mar 26, 2010 at 4:17 PM, Wolfgang Wegner <[email protected]> w= rote:
Quoted 11 lines
Hi Josh,
Quoted 8 lines · Josh Triplett
Quoted 3 lines · Grant Likely
Not all CF adapters have all the pins wired up that are needed for *DMA modes. =A0That is the most likely problem.
True, but we bought a card that specifically advertises support for UDMA, and says UDMA right on the card's label.
Quoted 6 lines
Quoted 1 line
Grant was referring to the adapter, not the card!
In fact I still have to see a single CF-to-IDE adapter that does have the wires needed for (U)DMA without me soldering them in place...
I found one at logic supply a while back, but I can't remember which one!
g.
Quoted 11 lines · Wolfgang Wegner
Hi Josh,
Quoted 8 lines · Josh Triplett
Quoted 3 lines · Grant Likely
Not all CF adapters have all the pins wired up that are needed for *DMA modes. That is the most likely problem.
True, but we bought a card that specifically advertises support for UDMA, and says UDMA right on the card's label.
Quoted 6 lines
Quoted 1 line
Grant was referring to the adapter, not the card!
In fact I still have to see a single CF-to-IDE adapter that does have the wires needed for (U)DMA without me soldering them in place...
Oh! OK, that makes more sense.
However, according to one of our hardware hackers, Andrew Greenberg (CCed), the STK5200 development breakout board for the TQM5200 *does* have the DMA pins wired up correctly, at least according to its schematic. That doesn't guarantee that the board matches the schematic, of course.
Any other ideas for things we could check to try to track down this problem?
- Josh Triplett
Am 26.03.10 23:59 schrieb(en) Josh Triplett:
[snip]
Quoted 1 line
Any other ideas for things we could check to try to track down this problem?
Might your issue be related to this thread: <http://lists.ozlabs.org/pipermail/linuxppc-dev/2009-December/078757.html>?
Cheers, Albrecht.
Dear Josh Triplett,
Quoted 6 lines · In message <20100326225916.GA5690@feather> you wrote:
However, according to one of our hardware hackers, Andrew Greenberg (CCed), the STK5200 development breakout board for the TQM5200 *does* have the DMA pins wired up correctly, at least according to its schematic. That doesn't guarantee that the board matches the schematic, of course.
We tested CF cards for DMA support some time ago, and IIRC this included the STK5200. Situation was that only very few CF cards actually support DMA (even if they advertise it on the label).
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] I wish Captain Vimes were here. He wouldn't have known what to do either, but he's got a much better vocabulary to be baffled in. - Terry Pratchett, _Guards! Guards!_
Quoted 10 lines · Wolfgang Denk
Quoted 5 lines · In message <20100326225916.GA5690@feather> you wrote:
However, according to one of our hardware hackers, Andrew Greenberg (CCed), the STK5200 development breakout board for the TQM5200 *does* have the DMA pins wired up correctly, at least according to its schematic. That doesn't guarantee that the board matches the schematic, of course.
We tested CF cards for DMA support some time ago, and IIRC this included the STK5200. Situation was that only very few CF cards actually support DMA (even if they advertise it on the label).
How very odd and disappointing.
So a CF card might advertise DMA on its label and feature set, and show DMA modes in hdparm's info dump, but break when actually using DMA modes?
Do you know of any specific CF cards which *do* support DMA?
- Josh Triplett
Quoted 5 lines · Albrecht Dreß
Am 26.03.10 23:59 schrieb(en) Josh Triplett:
[snip]Quoted 1 line
Any other ideas for things we could check to try to track down this problem?
Might your issue be related to this thread: <http://lists.ozlabs.org/pipermail/linuxppc-dev/2009-December/078757.html>?
We have the MPC5200C rev of the board, not the MPC5200B rev which apparently had many problems like the ones described in that thread. I can't rule out other crazy board errata we don't know about, though. :)
- Josh Triplett
Hi Josh:
Am 29.03.10 00:24 schrieb(en) Josh Triplett:
Quoted 1 line
We have the MPC5200C rev of the board, not the MPC5200B rev which
Ummm - I didn't know that there is a 5200C available. The Freescale web site only mentions the 5200 and the 5200B. Do you have any pointers to data sheets/docs?
Thanks, Albrecht.
Quoted 4 lines · Albrecht Dreß
Am 29.03.10 00:24 schrieb(en) Josh Triplett:
Quoted 1 line
We have the MPC5200C rev of the board, not the MPC5200B rev which
Ummm - I didn't know that there is a 5200C available. The Freescale web site only mentions the 5200 and the 5200B. Do you have any pointers to data sheets/docs?
I don't know the details; just repeating what the hardware team told me. :) We may have the revisions and suffixes mixed up, or we may have run into some terminology difference between the TQM5200 and the MPC5200.
- Josh Triplett
Quoted 3 lines
We tested CF cards for DMA support some time ago, and IIRC this included the STK5200. Situation was that only very few CF cards actually support DMA (even if they advertise it on the label).
Huh, not nice. Were those consumer cards or also industrial grade cards? Maybe that is the reason? With the latter, I have never seen this, they always told the truth, so far. Although we mostly used MWDMA, no UDMA to avoid the hardware problems.
Regards,
Wolfram
Signature · 2 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ |