Page MenuHomeFreeBSD

Switch to linker sets to find the xport callback object.
ClosedPublic

Authored by imp on Jul 22 2016, 8:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 2, 10:36 PM
Unknown Object (File)
Jan 13 2024, 3:44 PM
Unknown Object (File)
Jan 1 2024, 3:36 AM
Unknown Object (File)
Dec 24 2023, 7:28 AM
Unknown Object (File)
Dec 24 2023, 7:28 AM
Unknown Object (File)
Dec 20 2023, 12:03 AM
Unknown Object (File)
Nov 20 2023, 9:08 PM
Unknown Object (File)
Nov 13 2023, 1:32 PM
Subscribers

Details

Summary

Switch to linker sets to find the xport callback object. This
eliminates the need to special case everything in cam_xpt for new
transports. It is now a failure to not have a transport object when
registering the bus as well.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp retitled this revision from to Switch to linker sets to find the xport callback object..
imp updated this object.
imp edited the test plan for this revision. (Show Details)
  • Switch to linker sets to find the xport callback object. This
  • Include NVMe transport and direct access devices on amd64.
  • Switch to linker sets to find the protocol callback object.
chuck_tuffli.net added inline comments.
sys/cam/cam_xpt.c
3915 ↗(On Diff #18685)

Won't this behave differently compared to the original? Should this be

new_bus->xport = &xport_default;

?

sys/cam/cam_xpt.c
3915 ↗(On Diff #18685)

That assignment was never needed, since it was redundant after line 3889 (new file numbering). It also underscores that fact that you're no longer allowed to create a transport of an unknown / unspecified type.

sys/cam/cam_xpt.c
3915 ↗(On Diff #18685)

Ah, I figured there was a good reason, but wanted to ask.

scottl edited edge metadata.
This revision is now accepted and ready to land.Jul 25 2016, 4:41 PM
This revision was automatically updated to reflect the committed changes.