svn commit: r286043 - head/sys/dev/nvme

Jim Harris jimharris at FreeBSD.org
Wed Jul 29 21:29:51 UTC 2015


Author: jimharris
Date: Wed Jul 29 21:29:50 2015
New Revision: 286043
URL: https://svnweb.freebsd.org/changeset/base/286043

Log:
  nvme: do not notify a consumer about failures that occur during initialization
  
  MFC after:	3 days
  Sponsored by:	Intel

Modified:
  head/sys/dev/nvme/nvme.c

Modified: head/sys/dev/nvme/nvme.c
==============================================================================
--- head/sys/dev/nvme/nvme.c	Wed Jul 29 21:15:50 2015	(r286042)
+++ head/sys/dev/nvme/nvme.c	Wed Jul 29 21:29:50 2015	(r286043)
@@ -390,6 +390,15 @@ nvme_notify_fail_consumers(struct nvme_c
 	struct nvme_consumer	*cons;
 	uint32_t		i;
 
+	/*
+	 * This controller failed during initialization (i.e. IDENTIFY
+	 *  command failed or timed out).  Do not notify any nvme
+	 *  consumers of the failure here, since the consumer does not
+	 *  even know about the controller yet.
+	 */
+	if (!ctrlr->is_initialized)
+		return;
+
 	for (i = 0; i < NVME_MAX_CONSUMERS; i++) {
 		cons = &nvme_consumer[i];
 		if (cons->id != INVALID_CONSUMER_ID && cons->fail_fn != NULL)


More information about the svn-src-head mailing list