The existing interrupt handling of the ethernet driver worked well until the driver implemented receive fragment handling. This change uncovered a constellation that did not exist before. A received packet is written into the page pool with multiple fragments. On RTL93xx the head-of-line (HOL) feature limits the number of receivable fragments perfectly. There will never be a "buffer full" situation where the hardware only encounters ring buffers that are held by the Linux kernel. On RTL83xx this is slightly different: - The driver programs free floating rings - Only the ownership flag of the ring buffer decides if the hardware can hand over a packet to the CPU. - So the hardware can receive a packet even if it does not completely fit into the available fragments. With this there is a small chance that - The buffer has less space than a just received packet - The hardware generates an overflow (RUN OUT) interrupt - With no completely received packet the hardware DOES NOT generate a receive (DONE) interrupt. So it is not sufficient to just look on the DONE interrupts. The RUN OUT interrupts must be inspected as well. As the current logic is quite cryptic enhance this as follows: - Provide new RTL83xx/RTL93xx specific helpers - Add new callbacks to the driver configuration structure - Link the configuration with the new helpers - Use the callbacks where needed. While we are here: - Enable only interrupts for active receive rings. Until now the driver activated all receive interrupts (8/32) although it supports only 2 rings. - Use DIV_ROUND_UP instead of classic division for register calculation. Link: https://github.com/openwrt/openwrt/pull/24538 Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> |
||
|---|---|---|
| .. | ||
| base-files | ||
| dts | ||
| files-6.18 | ||
| image | ||
| patches-6.18 | ||
| profiles | ||
| rtl838x | ||
| rtl839x | ||
| rtl930x | ||
| rtl930x_nand | ||
| rtl931x | ||
| rtl931x_nand | ||
| Makefile | ||
| modules.mk | ||