b43-dev.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Problem with understanding DMA on some machines (known solution!), specs needed?
@ 2011-07-25 21:54 Rafał Miłecki
  2011-07-25 22:40 ` Rafał Miłecki
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Rafał Miłecki @ 2011-07-25 21:54 UTC (permalink / raw)
  To: b43-dev

Hey, I've finally came back to my 14e4:4329 with not working DMA. I
hoped disabling parity will make my DMA work, but this didn't do the
trick.

The card is PCI one with following params:
SSB 2.4
BCM4321
SPROM: 4
PMU: ?
Core rev: 11
PHY: N / 1
Radio: 0x2055 / 4

I've dumped wl and b43 ops and compare them. Noticed something
interesting in DMA setup.

wl:
 read32 0xc0200200 -> 0x00000000
write32 0xc0200200 <- 0x00000801
write32 0xc0200208 <- 0x5f310000
write32 0xc020020c <- 0x00000000

b43:
write32 0xc0200200 <- 0x00000801
write32 0xc0200208 <- 0x198b2000
write32 0xc020020c <- 0x80000000

Can you see the difference? wl does not put routing (translation) bits
in 0x20c@all. 0x208 on the other hand is suspicious.

It looks that wl is:
1) Using 0x40000000 routing instead of 0x80000000 routing
2) wl puts routing bits in addrlo instead of addrhi

According to the specs, routing goes always to the addrhi:

> The address 2 field is as follows (address 1 contains all address bits):
> Mask 	Function
> 0x3FFFFFFF 	Address
> 0xC0000000 	Routing

So I've hacked b43 to use 0x40000000 as translation and to put routing
in addrlo. Wohoo, this helped! For the first time I saw packets using
DMA engine.


Now, the question: when for real we should use such a solution?

Larry, could you check your driver? Can you see anything about this?
Is this maybe PCI (not PCIe!) specific?

-- 
Rafa?

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2011-07-31  5:54 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-25 21:54 Problem with understanding DMA on some machines (known solution!), specs needed? Rafał Miłecki
2011-07-25 22:40 ` Rafał Miłecki
2011-07-26  1:07   ` Larry Finger
2011-07-26  0:35 ` Larry Finger
2011-07-26  7:20   ` Rafał Miłecki
2011-07-26  7:24     ` Rafał Miłecki
2011-07-26  8:24 ` Rafał Miłecki
2011-07-26 15:33   ` Larry Finger
2011-07-26 15:49     ` Michael Büsch
2011-07-26 16:30       ` Rafał Miłecki
2011-07-26 16:32     ` Rafał Miłecki
2011-07-26 17:10       ` Larry Finger
2011-07-26 18:55       ` Michael Büsch
2011-07-30 16:44         ` Michael Büsch
2011-07-30 23:48           ` Rafał Miłecki
2011-07-31  5:54             ` Michael Büsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).