armbian_build/patch/misc/rtw88/hack/001-revert-rtw88-sdio-size-and-timout-to-rfc-v1.disable
Patrick Yavitz 2b5e341220 rtw88: sdio: honor the host max_req_size in the rx path
Use multiple consecutive reads in rtw_sdio_read_port() to limit the number of bytes which are copied by the host from the card in one MMC/SDIO transfer. This allows receiving a buffer that's larger than the hosts max_req_size (number of bytes which can be transferred in one MMC/SDIO transfer). As a result of this the skb_over_panic error is gone as the rtw88 driver is now able to receive more than 1536 bytes from the card (either because the incoming packet is larger than that or because multiple packets have been aggregated).

Signed-off-by: Patrick Yavitz <pyavitz@xxxxx.com>
2023-07-11 11:15:15 +02:00

31 lines
1.2 KiB
Plaintext

Certain Amlogic SDIO host controllers have a limit of
receiving/transmitting at most 1536 bytes at a time.
It turns out that rtw_sdio_enable_rx_aggregation() from rtw88/sdio.c
is not taking this into account currently.
For any RX buffer that is bigger than 1536 bytes (which can happen due
to RX aggregation) we're unable to do any processing on the host side
because all bytes beyond the 1536 bytes mark are lost.
Revert size and timout to RFC v1 patch until solution is found.
https://lore.kernel.org/linux-wireless/CAFBinCBaXtebixKbjkWKW_WXc5k=NdGNaGUjVE8NCPNxOhsb2g@mail.gmail.com/T/#u
Signed-off-by: Patrick Yavitz <pyavitz@gxxxx.com>
diff -Naur a/drivers/net/wireless/realtek/rtw88/sdio.c b/drivers/net/wireless/realtek/rtw88/sdio.c
--- a/drivers/net/wireless/realtek/rtw88/sdio.c 2023-06-13 14:16:07.695892972 -0400
+++ b/drivers/net/wireless/realtek/rtw88/sdio.c 2023-06-13 15:04:26.278383326 -0400
@@ -657,11 +657,11 @@
u8 size, timeout;
if (rtw_chip_wcpu_11n(rtwdev)) {
+ size = 0xff;
+ timeout = 0x20;
+ } else {
size = 0x6;
timeout = 0x6;
- } else {
- size = 0xff;
- timeout = 0x1;
}
/* Make the firmware honor the size limit configured below */