Skip to contentSkip to conversation

mt76x0u: Probing issues on Raspberry Pi 3 B+

BUG Stefan Wahren 1 participant 1 message Feb 16, 2019 USB

lore
Share & tools
lore
#0 lore raw

Hi Stanislaw,

Quoted 19 lines

Stanislaw Gruszka <[email protected]> hat am 16. Februar 2019 um 15:07 geschrieben:

Quoted 1 line · Stefan Wahren

sorry for the delay, but i do this all in my spare time.

Stefan, thanks for sacrifing your spare time for testing this!

Quoted 10 lines

The results for your recent patch series are better (no firmware timeout), but still no working wifi and still a warning:
https://gist.github.com/lategoodbye/c4864e446821717419cbe65df07f8d8d

I've identified the reason for the warning in dwc2:

/*
* We assume that DMA is always aligned in non-split
* case or split out case. Warn if not.
*/
WARN_ON_ONCE(hsotg->params.host_dma && (chan->xfer_dma & 0x3));

Quoted 3 lines

I think I understand why that happen, we first allocate 1024 mcu buffer then standard 4096 rx buffers, that couse 4096 buffers are not contained in single page and need split by dwc2 driver.

this is a misunderstanding. The warning is about memory alignment to 32 bit addresses, not about page alignment. This is a typical ARM restriction. Maybe we need to make sure in mt76 that the DMA buffer needs to be aligned. But it's also possible that the warning isn't the root cause of our problem.

Quoted 2 lines

Attached patch should fix this, plese test, thanks in advance.

Anyway i tested the following patch combinations against next with the same results as 1,2,3 (no wifi, alignment warning):
1,3
1,2,3,4

Quoted 4 lines
Quoted 2 lines

Btw i can confirm a regression was introduced after 4.19, because in 4.19 there was no firmware timeout but even no working wifi:

You ment 'no working wifi' or 'working wifi'?

Wifi is broken in 4.19, 4.20, 5.0 and next. It only worked with Lorenzo's SG avoid patches so far. Btw the regression (firmware timeout) started in 4.20. I also tested it today.

Thanks
Stefan

Quoted 2 lines

Stanislaw