summaryrefslogtreecommitdiffstats
path: root/sys/dev/nvme/nvme_private.h
diff options
context:
space:
mode:
authorjimharris <jimharris@FreeBSD.org>2013-03-26 20:56:58 +0000
committerjimharris <jimharris@FreeBSD.org>2013-03-26 20:56:58 +0000
commitd0a775e7949e871c4beabbef339069ca9560c538 (patch)
treecdbd1c17b3436c5453294d11372072b2484b0800 /sys/dev/nvme/nvme_private.h
parentb7f7338cc5bd9736b236409a3bda233d5d88d2b3 (diff)
downloadFreeBSD-src-d0a775e7949e871c4beabbef339069ca9560c538.zip
FreeBSD-src-d0a775e7949e871c4beabbef339069ca9560c538.tar.gz
Make nvme_ctrlr_reset a nop if a reset is already in progress.
This protects against cases where a controller crashes with multiple I/O outstanding, each timing out and requesting controller resets simultaneously. While here, remove a debugging printf from a previous commit, and add more logging around I/O that need to be resubmitted after a controller reset. Sponsored by: Intel Reviewed by: carl
Diffstat (limited to 'sys/dev/nvme/nvme_private.h')
-rw-r--r--sys/dev/nvme/nvme_private.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h
index bae9aaa..406a2e0 100644
--- a/sys/dev/nvme/nvme_private.h
+++ b/sys/dev/nvme/nvme_private.h
@@ -100,7 +100,7 @@ MALLOC_DECLARE(M_NVME);
#define NVME_MAX_CONSUMERS (2)
#define NVME_MAX_ASYNC_EVENTS (8)
-#define NVME_DEFAULT_TIMEOUT_PERIOD (30) /* in seconds */
+#define NVME_DEFAULT_TIMEOUT_PERIOD (30) /* in seconds */
#define NVME_MIN_TIMEOUT_PERIOD (5)
#define NVME_MAX_TIMEOUT_PERIOD (120)
@@ -280,6 +280,8 @@ struct nvme_controller {
void *cons_cookie[NVME_MAX_CONSUMERS];
+ uint32_t is_resetting;
+
#ifdef CHATHAM2
uint64_t chatham_size;
uint64_t chatham_lbas;
OpenPOWER on IntegriCloud