<minute>
narmstrong: i was using Armbian_23.02.0-trunk_Bananapicm4_bullseye_current_6.0.14_minimal.img
<minute>
that's what bpi were linking to
<minute>
ah i see, there's a newer one at armbian. should i try it as well?
f_|catgirl has joined #linux-amlogic
f_|catgirl is now known as f_
f_ has quit [Client Quit]
<narmstrong>
minute: not sure they are based on the same kernel/dt/whatever, I pushed the initial dt on armbian
<narmstrong>
but armbian have plenty of fixes & hacks, and I got reports of broken BT, not wifi
ebach has quit [Quit: Leaving]
Daanct12 has quit [Quit: WeeChat 3.8]
f_|catgirl has joined #linux-amlogic
f_|catgirl is now known as f_
vagrantc has joined #linux-amlogic
JohnnyonFlame has quit [Ping timeout: 240 seconds]
JohnnyonFlame has joined #linux-amlogic
<minute>
narmstrong: the version you linked has kernel 6.1 and the one i tried so far has 6.0. of course, they are using the out-of-tree driver for rtl8822cs that is the realtek driver with small changes. i also built this driver for current mainline but it doesn't seem to do anything useful (doesn't report any APs)
<minute>
as the mainline rtw88 driver has been reported to work in general with rtl8822cs i would think that the problem is located on the a311d setup side... or the out of tree driver (rtl88x2cs) does something fundamentally different so the problem is not triggered
<minute>
the problem also seems to appear only with bigger packets. as long as you only ping or deal with small packets, it seems like it's working. but using HTTP it falls apart
<minute>
moreover, the rtw_sdio_writew and rtw_sdio_readw patch _is_ required, as 16 bits writes also fail like with sunxi-mmc
<narmstrong>
hmm
<narmstrong>
xdarklight: can you try on your sm1 platform with the `amlogic,dram-access-quirk` property ?
<narmstrong>
it should put you in the same situation as minute on the g12b
<narmstrong>
since the quirk is the only way to use the sdcard controller, it also limits the sdio buffer size to 1536bytes, max_segs and a very low max_blk_count
<narmstrong>
*max_segs to 1
<narmstrong>
so if the upstream rtl8822cs driver doesn't have a way to split packets it will fail
<narmstrong>
so far it works fine with the vendor & upstream brcm drivers, and the athk11
<minute>
i have observed that, for example if you get a 12000 byte buffer, the data is ok up to a point shortly before the end
<minute>
i.e. the packets contain garbage only when getting close to the end of the buffer, i.e. the last part
<minute>
so i tried discarding the last part of buffers with an arbitrary cutoff (like 512 bytes), but then also some packets were lost and things stalled
<narmstrong>
minute: did you try reducing the mtu to something small ?
<minute>
yeah, the minimum is 1280 apparently
<minute>
it doesn't fix the problem also
<narmstrong>
oh ok, yeah it's bad
<minute>
i'm reading and comparing the downstream code a bit...
JohnnyonFlame has quit [Ping timeout: 240 seconds]
<minute>
narmstrong: oh, that's new then
<minute>
exciting
<minute>
hmm, the patchset they use for 6.3 is a bit different than what is merged in 6.4
<minute>
one significant difference: their patchset does not have rtw_sdio_use_memcpy_io
<minute>
ok so it is a regression in the rtw88 driver
<minute>
i now have a working rtw88 driver!
<minute>
i did it by carefully restoring sdio.c/h and mac.c to the state from an earlier (rfc) patchset that also armbian uses
<minute>
cc xdarklight
<minute>
now i just need to find out which change exactly caused the regression...
ldevulder has quit [Quit: Leaving]
<minute>
hmm, rtw_sdio_rx_aggregation size/timeout are different
<minute>
ah, in the older driver version, rx_aggregation was always false (not turned on), in the newer version, it is always turned on
<minute>
yep, that's it!
<minute>
xdarklight: narmstrong: the issue is rx_aggregation. when turned on, the problems appear.
<minute>
the fix is to disable the line "rtw_sdio_enable_rx_aggregation(rtwdev);" in rtw_sdio_start
f_ has quit [Quit: f_]
<xdarklight>
minute: narmstrong: d'oh, I thought that amlogic,dram-access-quirk is part of meson-g12-common.dtsi which means that it would've been included by meson-sm1.dtsi, but it's not! great find
<narmstrong>
xdarklight: it’s only on g12a and g12b but the flag should work on any meson-gx mmc slot (gxbb, gxl, … sdcard and mmc included)
<narmstrong>
The fix should probably enable agregation depending on host controller capabilities
<xdarklight>
narmstrong: I'm looking into making rtw88 honor the host capabilities as we speak ;)
<narmstrong>
Noice!
GNUtoo has quit [Remote host closed the connection]
<xdarklight>
minute: weird, with amlogic,dram-access-quirk; I can't even get the firmware download (to the rtw88 chip) to work
<xdarklight>
minute: only compile-tested: http://ix.io/4xMF - if I understand the rtw88 registers correctly this patch should a) keep RX aggregation enabled b) limit RX aggregation to a size that the host controller supports. if you still have trouble with this then please enable the rtw_dbg() message from that patch (easiest way: replace rtw_dbg with rtw_warn and drop the RTW_DBG_SDIO argument)
buzzmarshall has joined #linux-amlogic
JohnnyonFlame has joined #linux-amlogic
<minute>
xdarklight: wow, that was quick! and this makes a lot of sense to me suddenly ^^ will test & report tomorrow