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
F144347173: D51216.id158924.diff
Sat, Feb 7, 11:32 PM
F144340485: D51216.id158192.diff
Sat, Feb 7, 10:40 PM
Unknown Object (File)
Sat, Jan 31, 1:12 AM
Unknown Object (File)
Fri, Jan 23, 6:20 AM
Unknown Object (File)
Mon, Jan 19, 4:12 AM
Unknown Object (File)
Fri, Jan 9, 3:21 PM
Unknown Object (File)
Dec 14 2025, 10:13 PM
Unknown Object (File)
Nov 23 2025, 10:03 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.