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)
Tue, Oct 14, 1:56 AM
Unknown Object (File)
Tue, Oct 14, 1:56 AM
Unknown Object (File)
Tue, Oct 14, 1:56 AM
Unknown Object (File)
Mon, Oct 13, 12:24 PM
Unknown Object (File)
Thu, Oct 2, 8:21 PM
Unknown Object (File)
Mon, Sep 15, 6:20 PM
Unknown Object (File)
Mon, Sep 15, 8:19 AM
Unknown Object (File)
Sep 14 2025, 12:13 AM
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.