Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jul 2015 21:29:50 +0000 (UTC)
From:      Jim Harris <jimharris@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r286043 - head/sys/dev/nvme
Message-ID:  <201507292129.t6TLToWb047232@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507292129.t6TLToWb047232>