Date: Fri, 19 Jul 2019 00:32:56 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350120 - head/sys/dev/nvme Message-ID: <201907190032.x6J0Wu1P035577@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Fri Jul 19 00:32:56 2019 New Revision: 350120 URL: https://svnweb.freebsd.org/changeset/base/350120 Log: Use sysctl + CTLRWTUN for hw.nvme.verbose_cmd_dump. Also convert it to a bool. While the rest of the driver isn't yet bool clean, this will help. Reviewed by: cem@ Differential Revision: https://reviews.freebsd.org/D20988 Modified: head/sys/dev/nvme/nvme.c head/sys/dev/nvme/nvme_private.h head/sys/dev/nvme/nvme_sysctl.c Modified: head/sys/dev/nvme/nvme.c ============================================================================== --- head/sys/dev/nvme/nvme.c Fri Jul 19 00:15:25 2019 (r350119) +++ head/sys/dev/nvme/nvme.c Fri Jul 19 00:32:56 2019 (r350120) @@ -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"); Modified: head/sys/dev/nvme/nvme_private.h ============================================================================== --- head/sys/dev/nvme/nvme_private.h Fri Jul 19 00:15:25 2019 (r350119) +++ head/sys/dev/nvme/nvme_private.h Fri Jul 19 00:32:56 2019 (r350120) @@ -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 { Modified: head/sys/dev/nvme/nvme_sysctl.c ============================================================================== --- head/sys/dev/nvme/nvme_sysctl.c Fri Jul 19 00:15:25 2019 (r350119) +++ head/sys/dev/nvme/nvme_sysctl.c Fri Jul 19 00:32:56 2019 (r350120) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907190032.x6J0Wu1P035577>