Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jul 2026 12:38:18 +0000
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 6671bbf2f9bb - main - nda: Tag the command set used for devctl errors
Message-ID:  <6a5e16ba.3fd30.48709ba2@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=6671bbf2f9bb130129a4896bca7edb9e0a638e9f

commit 6671bbf2f9bb130129a4896bca7edb9e0a638e9f
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2026-07-20 12:36:43 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2026-07-20 12:37:10 +0000

    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
---
 sys/cam/cam_periph.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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;


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a5e16ba.3fd30.48709ba2>