DHCP now checks net_lwip_poll(), exposing Ethernet drivers which return fatal errors for an ordinary receive poll with no packet available. net_lwip_rx() treats -EAGAIN as an empty receive, as specified by the Ethernet driver interface.
Keep the CPSW fix from v1 and fix the same issue in seven more drivers: FMan, ColdFire FEC, Marvell GbE, TSEC, Xilinx EmacLite, Zynq GEM and HiSilicon GMAC, with one patch per driver. Change only their no-packet returns, preserving packet processing, actual error handling and polling limits. The driver fixes can be applied independently. The additional cases were found by code inspection following the BeagleBone Black report. Cross-compiled the seven additional drivers with both lwIP and the legacy stack, and checked their receive functions with stubbed registers and descriptors, including negative controls against the old code. These additional drivers have not been tested on real hardware. Based on u-boot-net/for-next. Assisted-by: Codex:gpt-6-astra Signed-off-by: James Hilliard <[email protected]> --- Changes in v2: - Add separate fixes for empty receives in seven more Ethernet drivers. - Add Tom Rini's Tested-by to the otherwise unchanged CPSW patch. - Link to v1: https://patch.msgid.link/[email protected] --- James Hilliard (8): net: ti: cpsw: return -EAGAIN when no RX packet is ready net: fm: return -EAGAIN for empty receives net: higmacv300: return -EAGAIN for empty receives net: mcffec: return -EAGAIN for empty receives net: mvgbe: return -EAGAIN for empty receives net: tsec: return -EAGAIN for empty receives net: xilinx_emaclite: return -EAGAIN for empty receives net: zynq_gem: return -EAGAIN for empty receives drivers/net/fm/eth.c | 2 +- drivers/net/higmacv300.c | 2 +- drivers/net/mcffec.c | 2 +- drivers/net/mvgbe.c | 2 +- drivers/net/ti/cpsw.c | 2 ++ drivers/net/tsec.c | 2 ++ drivers/net/xilinx_emaclite.c | 6 +++--- drivers/net/zynq_gem.c | 2 +- 8 files changed, 12 insertions(+), 8 deletions(-) --- base-commit: 28ddd369e2f7199539cdefe22ce014c592b890bd change-id: 20261012-submit-cpsw-rx-eagain-v1-bdda0f670600 Best regards, -- James Hilliard <[email protected]>
