XPT(4)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

✨ NAME ✨

okay so bestie, welcome to the xpt page β€” section 4, Kernel Interfaces Manual β€” and it's literally the CAM transport layer interface. That's the whole name, periodt. πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

None.

Like, literally none, bestie. The synopsis ate and left no crumbs. πŸ’€

πŸ’… DESCRIPTION πŸ’…

The xpt driver provides a way for userland applications to issue certain CAM CCBs to the kernel. iconic behavior, honestly. ✨

🚨 real talk, bestie: 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. not me warning you dramatically, but like... fr fr. 😭

πŸ”§ KERNEL CONFIGURATION πŸ”§

There is no kernel configuration required for the xpt driver. It is enabled when SCSI support is enabled in the kernel. There is one instance of the xpt driver per CAM transport layer instance. Since there is currently only one CAM transport layer, there will only be one instance of this driver. so rn it's one instance and done β€” no extra config arc, no cap. 🫢

πŸŽ€ IOCTLS πŸŽ€

Two ioctls are serving looks here, bestie:

  • CAMIOCOMMAND β€” this ioctl takes certain kinds of CAM CCBs and passes them through to the CAM transport layer for action. 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

The above CCBs are the only ones supported since it makes more sense to send them through a generic passthrough device rather than a passthrough device tied to a particular underlying SCSI device. that's the reasoning, iykyk. πŸ’…

  • CAMGETPASSTHRU β€” this ioctl takes an XPT_GDEVLIST CCB, and returns the passthrough device corresponding to the device in question. cute, direct, no drama. πŸŽ€

πŸ“ FILES πŸ“

  • /dev/xpt0 β€” character device node for the xpt driver. πŸ“

🩺 DIAGNOSTICS 🩺

None.

literally none. the diagnostics said "no thoughts, head empty." πŸ™ˆ

πŸ‘€ SEE ALSO πŸ‘€

go read these too, bestie:

πŸ•°οΈ HISTORY πŸ•°οΈ

The CAM transport layer driver first appeared in FreeBSD 3.0. vintage but still iconic. πŸ‘‘

πŸ‘‘ AUTHORS πŸ‘‘

Kenneth Merry <ken@FreeBSD.org>

big shoutout to Kenneth Merry β€” bestie wrote the page, we love to see it. 🫢


Debian β€’ October 10, 1998 β€’ XPT(4) β€” mwah, bestie, that's the page πŸ’‹

πŸ“¦ where this page comes from