Page MenuHomeFreeBSD

qlnx: fix panic at startup
ClosedPublic

Authored by kp on Jun 12 2025, 4:59 PM.
Tags
None
Referenced Files
F153556305: D50819.diff
Tue, Apr 21, 9:20 PM
F153538640: D50819.id156922.diff
Tue, Apr 21, 6:21 PM
F153492346: D50819.id156922.diff
Tue, Apr 21, 11:15 AM
F153423800: D50819.id156922.diff
Tue, Apr 21, 2:24 AM
Unknown Object (File)
Mon, Apr 20, 12:40 AM
Unknown Object (File)
Thu, Apr 16, 1:06 PM
Unknown Object (File)
Thu, Apr 9, 10:39 PM
Unknown Object (File)
Sun, Apr 5, 2:12 PM
Subscribers

Details

Summary

While attaching the qlnx driver we can end up trying to call ifmedia functions
before those are set up (through ether_ifattach() -> rtnl_handle_ifattach()
-> dump_iface() -> get_operstate_ether() -> ifmedia_ioctl()). Postpone the
ether_ifattach() until after the ifmedia setup.

Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kp requested review of this revision.Jun 12 2025, 4:59 PM
This revision is now accepted and ready to land.Jun 12 2025, 8:02 PM
zlei added a subscriber: zlei.
zlei added inline comments.
sys/dev/qlnx/qlnxe/qlnx_os.c
2366

Indeed ether_ifattach() will override if_hdrlen, but I think that is probably wrong design and have WIP fix for that.

There're lots of drivers set if_hdrlen after ether_ifattach() and I'll fix them all individually.

This revision was automatically updated to reflect the committed changes.