git: 161fcf79941b - main - nvme: Publish the drive's capabilities
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 01 Apr 2022 03:17:59 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=161fcf79941bd219b335b1aef4f8027944320d09
commit 161fcf79941bd219b335b1aef4f8027944320d09
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-03-29 23:03:47 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-04-01 03:13:16 +0000
nvme: Publish the drive's capabilities
Add cap_lo and cap_hi sysctl to each nvme drive. This publishes the raw
capabilities of the drive. Now we can only discover these with
bootverbose.
Sponsored by: Netflix
---
sys/dev/nvme/nvme_sysctl.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sys/dev/nvme/nvme_sysctl.c b/sys/dev/nvme/nvme_sysctl.c
index 4367a21861b3..38f0874cc861 100644
--- a/sys/dev/nvme/nvme_sysctl.c
+++ b/sys/dev/nvme/nvme_sysctl.c
@@ -372,6 +372,14 @@ nvme_sysctl_initialize_ctrlr(struct nvme_controller *ctrlr)
"reset_stats", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, ctrlr,
0, nvme_sysctl_reset_stats, "IU", "Reset statistics to zero");
+ SYSCTL_ADD_UINT(ctrlr_ctx, ctrlr_list, OID_AUTO, "cap_lo",
+ CTLFLAG_RD, &ctrlr->cap_lo, 0,
+ "Low 32-bits of capacities for the drive");
+
+ SYSCTL_ADD_UINT(ctrlr_ctx, ctrlr_list, OID_AUTO, "cap_hi",
+ CTLFLAG_RD, &ctrlr->cap_hi, 0,
+ "Hi 32-bits of capacities for the drive");
+
que_tree = SYSCTL_ADD_NODE(ctrlr_ctx, ctrlr_list, OID_AUTO, "adminq",
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Admin Queue");