mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-11 15:34:55 +00:00
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>
This commit is contained in:
parent
a149456d6a
commit
63a23cb465
1 changed files with 3 additions and 0 deletions
|
@ -314,6 +314,9 @@ static int tsec_recv(struct udevice *dev, int flags, uchar **packetp)
|
|||
ret = length - 4;
|
||||
} else {
|
||||
printf("Got error %x\n", (status & RXBD_STATS));
|
||||
|
||||
/* Rearm the packet buffer */
|
||||
tsec_free_pkt(dev, NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue