Page MenuHomeFreeBSD

cam: Add xpt_gdev_type() and use it instead of many copies of same
ClosedPublic

Authored by imp on Jul 8 2025, 10:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 22, 2:23 PM
Unknown Object (File)
Sun, Mar 22, 8:45 AM
Unknown Object (File)
Fri, Mar 20, 4:56 PM
Unknown Object (File)
Fri, Mar 20, 9:50 AM
Unknown Object (File)
Fri, Mar 13, 1:45 PM
Unknown Object (File)
Fri, Mar 13, 12:11 AM
Unknown Object (File)
Sun, Mar 8, 9:36 PM
Unknown Object (File)
Wed, Mar 4, 3:25 PM
Subscribers
None

Details

Summary

Add a convenience wrapper to XPT_GDEV_TYPE in the same way we have one
for XPT_PATH_INQ. The changes from PRIORITY_NORMAL to PRIORITY_NONE are
intentional because this isn't a queued CCB. Please note: we have
several places still that construct a XPT_GDEV_TYPE message by
overwriting a CCB that happens to be laying around. I've not used this
method, by and large, in those places since I didn't want to risk
upsetting allocation flags that might be present (since we use a specail
allocator for some CCB types in *_da.c).

Sponsored by: Netflix

Diff Detail

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

Event Timeline

imp requested review of this revision.Jul 8 2025, 10:52 PM

s/specail/special/ in commit log

sys/cam/cam_xpt.h
168

New functions shouldn't have the leading blank line I think.

This revision is now accepted and ready to land.Jul 10 2025, 7:51 PM
sys/cam/cam_xpt.h
168

I'll followup removing this and the function I copied it from.
Good eye.