b43: DMA errors with BCM4331 on BCM4706
Hi,
I am trying to get the BCM4331 working on the BCM4706 (Mips SoC), on a x86 this is working. Currently the bcma bus gets initialized without any problems and b43 starts and send beacons like excepted.
When a client wants to connect to the Access point the whole system breaks. On the DMA core 1, which is used to send the packages I get a Fatal DMA error:
b43-phy0 ERROR: Fatal DMA error: 0x00000000, 0x00000800, 0x00000000, 0x00000000, 0x00000000, 0x00000000
After this error the driver tries to recover, by reseting the DMA controller, but that fails:
b43-phy0: Controller RESET (DMA error) ...
bcma: bus1: Timeout waiting for register 0x0804!
Data bus error, epc == 801ac888, ra == 801ac890
This is descried in [0] as PCIData (PD)
PCI Data Error
This field is set to 1 when a PCI bus error occurs while transferring data to or from host memory. The PCI status register (see ?Status Register (Status, offset 0x06)? on page 184) can be read to determine the cause of the error. This field is cleared to 0 by resetting the channel that caused the error.
I can not find the description of the PCI status register.
I used wireshark to see what actually happens and the device send out beacons and answers to probe requests without problems. I see the Authentication, Association Request and Association Response frames and then only Beacon frames and probe responses. When I do not try to connect to this access Point there is no problem and the device stays up for a long time, the problem is caused by the frames send or received.
I think this is a problem in the DMA controller or in the PCIe host controller, sadly I do not have a BCM4706 SoC with a pluggable PCIe slot to verify which part causes the problems (the card, or the PCIe controller).
Does anybody have any thought on this topic?
Hauke
Quoted 3 lines · On Sat, 03 Aug 2013 17:28:14 +0200 Hauke Mehrtens <[email protected]> wrote:
I used wireshark to see what actually happens and the device send out beacons and answers to probe requests without problems. I see the Authentication, Association Request and Association Response frames and
That suggests DMA works for some packets and then fails?
Quoted 1 line
Does anybody have any thought on this topic?
You should print out more of the DMA values.
Signature · 8 lines
Michael -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20130803/8827004d/attachment.sig>
Quoted 7 lines · Michael B?sch
Quoted 3 lines · On Sat, 03 Aug 2013 17:28:14 +0200 Hauke Mehrtens <[email protected]> wrote:
I used wireshark to see what actually happens and the device send out beacons and answers to probe requests without problems. I see the Authentication, Association Request and Association Response frames and
Quoted 5 lines
That suggests DMA works for some packets and then fails?
Quoted 1 line
Does anybody have any thought on this topic?
You should print out more of the DMA values.
Could it possibly work with short packets, but fail on longer ones?
Larry
Quoted 10 lines · Larry Finger
Quoted 9 lines · Michael B?sch
Quoted 3 lines · On Sat, 03 Aug 2013 17:28:14 +0200 Hauke Mehrtens <[email protected]> wrote:
I used wireshark to see what actually happens and the device send out beacons and answers to probe requests without problems. I see the Authentication, Association Request and Association Response frames and
That suggests DMA works for some packets and then fails?
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Does anybody have any thought on this topic?
You should print out more of the DMA values.
Could it possibly work with short packets, but fail on longer ones?
Larry
Hi,
Thanks for the hints, in fact it was the size and I got my BCM4331 in the Access Point connected to a BCM4706 working. The problem was that the the PCIe controller used a PCIe max request size of 128, we try to change it in driver_pci_host.c, see "MRRS 512", but that does not get applied to the hardware, when reading it back it is not set, the Max payload size is changed. The BCM4331 uses a max request size of 512 by default and that causes problems. I solved the problem by setting the max request size to 128 for the BCM4331, pcie_set_readrq(bus->host_pci,
128) and then it worked.
The patch is currently just in OpenWrt [0], I will send the patches to the mailing list in the next days.
@Rafa? If you haven't found a BCM4331, now you can use the one in your Access Point. ;-)
Hauke