aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/nvme/nvme.c
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2022-08-05 14:58:19 +0000
committerAlexander Motin <mav@FreeBSD.org>2022-08-05 14:58:19 +0000
commita69c0964625f4e20a7d5f22d51e036e13eedbeeb (patch)
tree65a5d531a6037460eb9aa8e4f5e5c7338c79953d /sys/dev/nvme/nvme.c
parent101480e926858c90e6b0db780f48742cf60a0487 (diff)
downloadsrc-a69c0964625f4e20a7d5f22d51e036e13eedbeeb.tar.gz
src-a69c0964625f4e20a7d5f22d51e036e13eedbeeb.zip
nvme: Print CRD, M and DNR status bits on errors.
It may help with some issues debugging. MFC after: 1 week
Diffstat (limited to 'sys/dev/nvme/nvme.c')
-rw-r--r--sys/dev/nvme/nvme.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/nvme/nvme.c b/sys/dev/nvme/nvme.c
index 6ad010dae1b8..fc491eb72f1c 100644
--- a/sys/dev/nvme/nvme.c
+++ b/sys/dev/nvme/nvme.c
@@ -98,7 +98,7 @@ nvme_dump_command(struct nvme_command *cmd)
void
nvme_dump_completion(struct nvme_completion *cpl)
{
- uint8_t p, sc, sct, m, dnr;
+ uint8_t p, sc, sct, crd, m, dnr;
uint16_t status;
status = le16toh(cpl->status);
@@ -106,13 +106,14 @@ nvme_dump_completion(struct nvme_completion *cpl)
p = NVME_STATUS_GET_P(status);
sc = NVME_STATUS_GET_SC(status);
sct = NVME_STATUS_GET_SCT(status);
+ crd = NVME_STATUS_GET_CRD( status);
m = NVME_STATUS_GET_M(status);
dnr = NVME_STATUS_GET_DNR(status);
printf("cdw0:%08x sqhd:%04x sqid:%04x "
- "cid:%04x p:%x sc:%02x sct:%x m:%x dnr:%x\n",
+ "cid:%04x p:%x sc:%02x sct:%x crd:%x m:%x dnr:%x\n",
le32toh(cpl->cdw0), le16toh(cpl->sqhd), le16toh(cpl->sqid),
- cpl->cid, p, sc, sct, m, dnr);
+ cpl->cid, p, sc, sct, crd, m, dnr);
}
int