net: tsec: Re-arm packet buffer in error case
authorJ. Neuschäfer <j.ne@posteo.net>
Sun, 16 Feb 2025 21:18:13 +0000 (22:18 +0100)
committerPeng Fan <peng.fan@nxp.com>
Mon, 3 Mar 2025 06:18:49 +0000 (14:18 +0800)
commit63a23cb4656703661f1f8f271ca29e2334d42520
treed4e78fc164243994d0c578199bc21263b4a83cf6
parenta149456d6a5457abe0187eb38a8ccb5d1da1bf0f
net: tsec: Re-arm packet buffer in error case

When an error is detected in the TSEC receive path, the driver currently
prints an error message, but leaves the corresponding packet descriptor
in its old state (i.e. owned by the CPU side). As a result, the packet
queue can be starved of available buffers if enough errors happen.

To recover from errors, re-arm the packet buffer descriptor after an
error has been detected.

Errors can be provoked by changing a PHY with phy-mode = "rgmii-id" to
phy-mode = "rgmii".

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/net/tsec.c