linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* wifi: rtw88: question about SDIO RX aggregation limiting
@ 2023-06-11 20:23 Martin Blumenstingl
  2023-06-13  2:20 ` Ping-Ke Shih
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Blumenstingl @ 2023-06-11 20:23 UTC (permalink / raw)
  To: linux-wireless, pkshih
  Cc: Lukas F. Hartmann, linux-kernel, tony0620emma, jernej.skrabec

Hello Ping-Ke,

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.

Lukas found that limiting BIT_RXDMA_AGG_PG_TH to 0x6 makes his
RTL8822CS work on the affected Amlogic SoCs.

My question now is: how can we properly limit BIT_RXDMA_AGG_PG_TH
without hard-coding a one-fits-all value (which may reduce
performance)?

Initially I thought that we could just calculate it:
  host_max_pages = mmc_host->max_req_size / rtwdev->chip->page_size
max_req_size for the affected controller is 1536 and chip->page_size
is 128, so the result would be 12 (I thought it would be close to this
number, maybe +/-1).
Unfortunately this doesn't fix the issue and for his board
BIT_RXDMA_AGG_PG_TH the limit is 6 or 7.

If you could describe how BIT_RXDMA_AGG_PG_TH generally works I can
come up with the algorithm to calculate the limit on my own (at least
I hope so).
Lukas has been very patient with testing so far and I understood that
he's willing to test further patches if we think that it fixes the
rtw88 driver issue he's seeing.


Thank you and best regards,
Martin

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-07-04  9:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-11 20:23 wifi: rtw88: question about SDIO RX aggregation limiting Martin Blumenstingl
2023-06-13  2:20 ` Ping-Ke Shih
2023-06-19 20:38   ` Martin Blumenstingl
2023-06-20  5:26     ` Ping-Ke Shih
2023-07-03 21:25       ` Martin Blumenstingl
2023-07-04  9:20         ` Ping-Ke Shih

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).