diff options
-rw-r--r-- | sys/dev/nvme/nvme.c | 2 | ||||
-rw-r--r-- | sys/dev/nvme/nvme_private.h | 2 | ||||
-rw-r--r-- | sys/dev/nvme/nvme_sysctl.c | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/nvme/nvme.c b/sys/dev/nvme/nvme.c index 449f2367c54f..175e78336b39 100644 --- a/sys/dev/nvme/nvme.c +++ b/sys/dev/nvme/nvme.c @@ -54,9 +54,7 @@ struct nvme_consumer nvme_consumer[NVME_MAX_CONSUMERS]; 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"); diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index 730990f9541a..6b363be018c8 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -114,7 +114,7 @@ MALLOC_DECLARE(M_NVME); 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 { diff --git a/sys/dev/nvme/nvme_sysctl.c b/sys/dev/nvme/nvme_sysctl.c index 09bcb270b43a..85c28435e2af 100644 --- a/sys/dev/nvme/nvme_sysctl.c +++ b/sys/dev/nvme/nvme_sysctl.c @@ -42,10 +42,14 @@ __FBSDID("$FreeBSD$"); #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 |