Date: Mon, 12 Aug 2019 18:54:25 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r350935 - stable/12/sys/dev/nvme Message-ID: <201908121854.x7CIsPjS065058@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Mon Aug 12 18:54:24 2019 New Revision: 350935 URL: https://svnweb.freebsd.org/changeset/base/350935 Log: MFC r350120 (by imp): 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. Modified: stable/12/sys/dev/nvme/nvme.c stable/12/sys/dev/nvme/nvme_private.h stable/12/sys/dev/nvme/nvme_sysctl.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme.c ============================================================================== --- stable/12/sys/dev/nvme/nvme.c Mon Aug 12 18:53:53 2019 (r350934) +++ stable/12/sys/dev/nvme/nvme.c Mon Aug 12 18:54:24 2019 (r350935) @@ -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: stable/12/sys/dev/nvme/nvme_private.h ============================================================================== --- stable/12/sys/dev/nvme/nvme_private.h Mon Aug 12 18:53:53 2019 (r350934) +++ stable/12/sys/dev/nvme/nvme_private.h Mon Aug 12 18:54:24 2019 (r350935) @@ -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: stable/12/sys/dev/nvme/nvme_sysctl.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_sysctl.c Mon Aug 12 18:53:53 2019 (r350934) +++ stable/12/sys/dev/nvme/nvme_sysctl.c Mon Aug 12 18:54:24 2019 (r350935) @@ -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?201908121854.x7CIsPjS065058>