Page MenuHomeFreeBSD

D32241.id96031.diff
No OneTemporary

D32241.id96031.diff

Index: share/man/man4/nvme.4
===================================================================
--- share/man/man4/nvme.4
+++ share/man/man4/nvme.4
@@ -172,6 +172,14 @@
hw.nvme.verbose_cmd_dump=1
.Ed
.Pp
+Prior versions of the driver reset the card twice on boot.
+This proved to be unnecessary and inefficient, so the driver now resets drive
+controller only once.
+The old behavior may be restored in the kernel config file with
+.Bd -literal -offset indent
+.Cd options NVME_2X_RESET
+.Ed
+.Pp
.Sh SYSCTL VARIABLES
The following controller-level sysctls are currently implemented:
.Bl -tag -width indent
Index: sys/conf/options
===================================================================
--- sys/conf/options
+++ sys/conf/options
@@ -1006,6 +1006,7 @@
# NVME options
NVME_USE_NVD opt_nvme.h
+NVME_2X_RESET opt_nvme.h
# amdsbwd options
AMDSBWD_DEBUG opt_amdsbwd.h
Index: sys/dev/nvme/nvme_ctrlr.c
===================================================================
--- sys/dev/nvme/nvme_ctrlr.c
+++ sys/dev/nvme/nvme_ctrlr.c
@@ -30,6 +30,7 @@
__FBSDID("$FreeBSD$");
#include "opt_cam.h"
+#include "opt_nvme.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -1147,8 +1148,10 @@
return;
}
+#ifdef NVME_2X_RESET
if (nvme_ctrlr_hw_reset(ctrlr) != 0)
goto fail;
+#endif
nvme_qpair_reset(&ctrlr->adminq);
nvme_admin_qpair_enable(&ctrlr->adminq);
@@ -1680,8 +1683,10 @@
*/
if (nvme_ctrlr_hw_reset(ctrlr) != 0)
goto fail;
+#ifdef NVME_2X_RESET
if (nvme_ctrlr_hw_reset(ctrlr) != 0)
goto fail;
+#endif
/*
* Now that we've reset the hardware, we can restart the controller. Any

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 18, 4:10 PM (15 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41000565
Default Alt Text
D32241.id96031.diff (1 KB)

Event Timeline