Page MenuHomeFreeBSD

eqos: Properly reinitialize TX and RX ring descriptors
AcceptedPublic

Authored by renatoalencar.73_gmail.com on Mar 23 2024, 3:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 4:27 AM
Unknown Object (File)
Fri, Apr 12, 3:03 AM
Unknown Object (File)
Sun, Apr 7, 5:40 AM
Unknown Object (File)
Sat, Apr 6, 10:32 PM
Unknown Object (File)
Mar 25 2024, 5:47 PM
Subscribers

Details

Reviewers
manu
sos
ganbold
Summary

When stopping the interface, descriptors aren't properly reinitialized, which can lead to incorrect states that causes the driver to be stuck printing eqos: watchdog timeout. Only fixable after restarting.

Test Plan
  • On a SoC snps,dwmac-4.20a compatible
  • Run service netif restart with the cable plugged on.
  • Run service netif stop with cable unplugged, plug the cable and then run service netif start.
  • Run service netif stop with cable plugged, unplug the cable and run service netif start, then plug back the cable.

All of these can render the interface in this state.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Thanks,
LGTM but I haven't looked at the NetBSD version, I think that it would be best to keep it synced.

This revision is now accepted and ready to land.Tue, Apr 2, 12:23 PM

Thanks,
LGTM but I haven't looked at the NetBSD version, I think that it would be best to keep it synced.

Well, the NetBSD implementation has a couple of key differences on locking and data structures. I was willing to work on trying to make this more similar to theirs. Particularly on improve locking, better hardware support and debugging facilities.