Index: head/sys/dev/nvme/nvme.c =================================================================== --- head/sys/dev/nvme/nvme.c +++ head/sys/dev/nvme/nvme.c @@ -54,9 +54,7 @@ uma_zone_t nvme_request_zone; int32_t nvme_retry_count; -int nvme_verbose_cmd_dump; -TUNABLE_INT("hw.nvme.verbose_cmd_dump", &nvme_verbose_cmd_dump); MALLOC_DEFINE(M_NVME, "nvme", "nvme(4) memory allocations"); Index: head/sys/dev/nvme/nvme_private.h =================================================================== --- head/sys/dev/nvme/nvme_private.h +++ head/sys/dev/nvme/nvme_private.h @@ -114,7 +114,7 @@ extern uma_zone_t nvme_request_zone; extern int32_t nvme_retry_count; -extern int32_t nvme_verbose_cmd_dump; +extern bool nvme_verbose_cmd_dump; struct nvme_completion_poll_status { Index: head/sys/dev/nvme/nvme_sysctl.c =================================================================== --- head/sys/dev/nvme/nvme_sysctl.c +++ head/sys/dev/nvme/nvme_sysctl.c @@ -42,10 +42,14 @@ #endif int nvme_use_nvd = NVME_USE_NVD; +bool nvme_verbose_cmd_dump = false; SYSCTL_NODE(_hw, OID_AUTO, nvme, CTLFLAG_RD, 0, "NVMe sysctl tunables"); SYSCTL_INT(_hw_nvme, OID_AUTO, use_nvd, CTLFLAG_RDTUN, &nvme_use_nvd, 1, "1 = Create NVD devices, 0 = Create NDA devices"); +SYSCTL_BOOL(_hw_nvme, OID_AUTO, verbose_cmd_dump, CTLFLAG_RWTUN, + &nvme_verbose_cmd_dump, 0, + "enable verbose command printting when a command fails"); /* * CTLTYPE_S64 and sysctl_handle_64 were added in r217616. Define these