aboutsummaryrefslogtreecommitdiff
path: root/</(public-mirror)
diff options
context:
space:
mode:
authorKenneth D. Merry <ken@FreeBSD.org>2026-11-07 01:05:56 +0000
committerKenneth D. Merry <ken@FreeBSD.org>2026-11-07 01:05:56 +0000
commit6eae951cd51b5b8603c119f21c77871a8595ff88 (patch)
treead30d7f662cff842c479d627c35e74cd791a2890 /</(public-mirror)
parent80f090111ae46ae8b4e115c9d80d783d0d00d445 (diff)
camcontrol: Add a feature subcommand for NVMe Get/Set FeaturesHEADmain
Add a feature subcommand for the NVMe Get Features and Set Features commands: camcontrol feature ndaX -a <get|set> -f feature [-d data] [-s num] [-U] There is no transport-specific prefix in the name: SCSI has no feature command (the closest equivalents are mode pages), and the ATA SET FEATURES subcommands are already exposed through dedicated camcontrol subcommands (apm, aam, epc and the power commands), so the name is unclaimed. The subcommand returns an error for non-NVMe devices. Currently, only the hostid feature is fully implemented. The hostid value for set is specified with -d as a UUID or an integer in decimal, hex, or octal, and -U outputs the hostid as a UUID on get. The -s argument exposes the feature select / save fields from the NVMe specification. If bit 4 of the Optional NVM Command Support (ONCS) field of the Identify Controller data is set, each feature has a default, saved and current value, plus a capabilities mask: - For get, -s selects which to display: 0 (current), 1 (default), 2 (saved) or 3 (capabilities). - For set, -s is the save flag; a value of 1 sets the saved value as well as the current value, so the feature persists across an NVMe reset. Setting the save flag only works if the feature's capability mask includes saveable. sbin/camcontrol/nvfeature.c: New file, the camcontrol(8) feature subcommand for getting and setting NVMe features. sbin/camcontrol/camcontrol.c: Add the feature subcommand, dispatched only to NVMe devices. sbin/camcontrol/camcontrol.h: Add the nvmefeature() prototype. sbin/camcontrol/Makefile: Add nvfeature.c to the build. sbin/camcontrol/camcontrol.8: Document the feature subcommand. Co-authored-by: Reid Linnemann <reidl@spectralogic.com> Co-authored-by: Dave Baukus <daveb@spectralogic.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Reviewed by: imp MFC after: 1 week Sponsored by: Spectra Logic Differential Revision: https://reviews.freebsd.org/D59536
Diffstat (limited to '</(public-mirror)')
0 files changed, 0 insertions, 0 deletions