[OpenWrt-Devel] [PATCH 2/3] mvebu: reduce speed to gen1 for armada 37xx devices pcie

Tomasz Maciej Nowak tmn505 at gmail.com
Sat Jun 9 17:09:35 EDT 2018


W dniu 09.06.2018 o 19:02, Martin Blumenstingl pisze:
> On Sat, Jun 9, 2018 at 4:15 PM Tomasz Maciej Nowak <tomek_n at o2.pl> wrote:
>>
>> Since the beginning there's been an issue with initializing the Atheros
>> based MiniPCIe wlan cards. Here's an example of kerenel log:
>>
>> advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x3c
>> advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x44
>> advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x4
>> ath9k 0000:00:00.0: enabling device (0000 -> 0002)
>> advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x3c
>> advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0xc
>> advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x4
>> advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x40
>> ath9k 0000:00:00.0: request_irq failed
>> advk-pcie d0070000.pcie: Posted PIO Response Status: CA,0xe00 @ 0x4
>> ath9k: probe of 0000:00:00.0 failed with error -22
>>
>> The same happens for ath5k cards, while ath10k card didn't appear at
>> all (not detected). Following the issue on esppressobin.net forum [1]
>> the workaround seems to be limiting the speed of PCIe bridge to 1st
>> generation. This fixed the initialization of ath5k, ath9k and ath10k
>> cards. The change shouldn't affect the performance for wireless cards,
>> it could reduce the performance of storage controller cards but since
>> OpenWrt focuses on wireless connectivity, fixing compatibility with
>> wireless cards should be a priority.
>> For the record, the iwlwifi and mt76 cards were not affected by this
>> issue.
> does this meant that the PCIe link speed depends on the board?

No, that depends on the SoC board has and PCIe card which negotiates the speed and capabilities. It shouldn't depend on the board, of course if there are no design faults. Maybe some code in Atheros drivers also affects this or there's bug in aardvark enumerating code. The assessment of this is outside of my skills.

> 
> the PCI dt-bindings already specify a "max-link-speed" property, see [0]
> there's even a helper function to parse that property: of_pci_get_max_link_speed
> 
> this would give you control over the PCIe link speed per board (I am
> assuming that the mvebu target uses devicetree).

I tried this before submitting the patch, just to be sure retried it after Your mail. Setting this had no effect, the state was as if there was no change.

> additionally this would allow you to send the patch upstream so
> OpenWrt doesn't have to carry custom patches around forever
> 
> what do you think?

This driver still is in early stage, there are still some issues, until it'll be more mature I'm reluctant to send this workaround upstream or sending bug report. Thomas Petazzoni from Bootlin is working on this driver and still has some pending changes but that will take few months. Until his changes will hit upstream I'm inclined to keep this.
There is also upcoming device from CZ.nic, namely Turris MOX, which is based on the same processor as ESPRESSObin. They already submitted watchdog driver to LKML and U-Boot tree and minor fixes to U-Boot. Maybe their involvement will speed up the changes and we'll see this workaround unnecessary.

Just to be clear this issue and workaround affects only devices based on Armada 37xx SoC living in cortexa53 subtarget.

Regards, Tomasz

> 
> 
> Regards
> Martin
> 
> 
> [0] https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/pci/pci.txt
> 

-- 
TMN

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


More information about the openwrt-devel mailing list