XPT(4)

✨ XPT(4) ✨

okay bestie, so this is the manual page for xpt from the Kernel Interfaces Manual, and it's giving CAM transport layer interface πŸ’–


πŸŽ€ NAME πŸŽ€

xpt β€” the CAM transport layer interface. that's it, that's the name, slay πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

None.

literally none. no synopsis. nothing to see here, bestie πŸ™ˆ


🌸 DESCRIPTION 🌸

so the xpt driver is basically the ✨glow-up portal✨ that lets userland applications issue certain CAM CCBs to the kernel. iconic behaviour, no cap.

⚠️ okay listen, this part is serious. since the xpt driver allows direct access to the CAM subsystem, system administrators should exercise caution when granting access to this driver. if used improperly, this driver can allow userland applications to crash a machine or cause data loss. πŸ’€ like, that's not a vibe, that's a genuine disaster. be careful fr fr.

πŸ‘‘ KERNEL CONFIGURATION πŸ‘‘

good news bestie: there is no kernel configuration required for the xpt driver. it's just enabled when SCSI support is enabled in the kernel. automatic queen behaviour πŸ’…

and the way it works: there is one instance of the xpt driver per CAM transport layer instance. and since there is currently only one CAM transport layer, there will only be one instance of this driver. one girl, one crown, periodt πŸ‘‘


πŸ’– IOCTLS πŸ’–

two of them. let's get into it 🫢

  • CAMIOCOMMAND β€” this ioctl takes certain kinds of CAM CCBs and passes them through to the CAM transport layer for action. but bestie, only the following CCB types are supported:
    • XPT_SCAN_BUS
    • XPT_RESET_BUS
    • XPT_SCAN_LUN
    • XPT_ENG_INQ
    • XPT_ENG_EXEC
    • XPT_DEBUG
    • XPT_DEV_MATCH
    • XPT_PATH_INQ

and the reason those are the only ones supported? because it makes more sense to send them through a generic passthrough device rather than a passthrough device tied to a particular underlying SCSI device. logic ✨

  • CAMGETPASSTHRU β€” this ioctl takes an XPT_GDEVLIST CCB, and returns the passthrough device corresponding to the device in question. cute, efficient, we love her 🌈

πŸ“ FILES πŸ“

  • /dev/xpt0 β€” character device node for the xpt driver. that's the doorway bestie πŸšͺ✨

🧚 DIAGNOSTICS 🧚

None.

no diagnostics. she's not dramatic like that πŸ™ˆ


πŸ’œ SEE ALSO πŸ’œ

go read those too, iykyk πŸ“š


⭐ HISTORY ⭐

the CAM transport layer driver first appeared in FreeBSD 3.0. vintage icon behaviour, honestly πŸŽ€


🌈 AUTHORS 🌈

Kenneth Merry <ken@FreeBSD.org> β€” thank you king, we appreciate you πŸ’–πŸ‘‘


and that's a wrap on the xpt(4) page bestie!! this one came out of the Debian edition, dated October 10, 1998 β€” yes, 1998, she's been serving since before some of us were born πŸ’€βœ¨ go forth and be careful with that direct CAM access, mwah πŸ«ΆπŸ’…

πŸ“¦ where this page comes from