Page MenuHomeFreeBSD

qlnx: fix panic at startup
ClosedPublic

Authored by kp on Jun 12 2025, 4:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 9, 10:39 PM
Unknown Object (File)
Sun, Apr 5, 2:12 PM
Unknown Object (File)
Sat, Apr 4, 1:06 PM
Unknown Object (File)
Sat, Apr 4, 4:48 AM
Unknown Object (File)
Thu, Apr 2, 12:11 PM
Unknown Object (File)
Mon, Mar 30, 3:17 PM
Unknown Object (File)
Mon, Mar 30, 4:22 AM
Unknown Object (File)
Sun, Mar 29, 12:54 AM
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.