aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2026-07-20 12:36:43 +0000
committerWarner Losh <imp@FreeBSD.org>2026-07-20 12:37:10 +0000
commit6671bbf2f9bb130129a4896bca7edb9e0a638e9f (patch)
treed9940f7e3f08bdbab113153797362482b904e914
parent6e845b1333fdf215216dc463ebd9ed34b045c477 (diff)
nda: Tag the command set used for devctl errors
Different command sets have different encoding for op codes, etc. While one can normally puzzle out which is which, it's better to explicitly tag the command set used. Sponsored by: Netflix
-rw-r--r--sys/cam/cam_periph.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c
index 91ec7a71f612..6fa5fa4a60d6 100644
--- a/sys/cam/cam_periph.c
+++ b/sys/cam/cam_periph.c
@@ -2187,9 +2187,10 @@ cam_periph_devctl_notify(union ccb *ccb)
struct nvme_command *cmd = &n->cmd;
// XXX Likely should be nvme_cmd_sbuf
- sbuf_printf(&sb, "opc=\"%02x\" fuse=\"%02x\" cid=\"%04x\" "
+ sbuf_printf(&sb, "cmdset=\"%s\" opc=\"%02x\" fuse=\"%02x\" cid=\"%04x\" "
"nsid=\"%08x\" cdw10=\"%08x\" cdw11=\"%08x\" cdw12=\"%08x\" "
"cdw13=\"%08x\" cdw14=\"%08x\" cdw15=\"%08x\" ",
+ ccb->ccb_h.func_code == XPT_NVME_ADMIN ? "admin" : "io",
cmd->opc, cmd->fuse, cmd->cid, cmd->nsid, cmd->cdw10,
cmd->cdw11, cmd->cdw12, cmd->cdw13, cmd->cdw14, cmd->cdw15);
break;