Date: Mon, 17 Mar 2014 21:45:08 +0000 (UTC) From: Jim Harris <jimharris@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263274 - stable/9/sys/dev/nvme Message-ID: <201403172145.s2HLj8lO070570@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jimharris Date: Mon Mar 17 21:45:08 2014 New Revision: 263274 URL: http://svnweb.freebsd.org/changeset/base/263274 Log: MFC r254303: If a controller fails to initialize, do not notify consumers (nvd) of its namespaces. Sponsored by: Intel Modified: stable/9/sys/dev/nvme/nvme.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/nvme/nvme.c ============================================================================== --- stable/9/sys/dev/nvme/nvme.c Mon Mar 17 21:42:31 2014 (r263273) +++ stable/9/sys/dev/nvme/nvme.c Mon Mar 17 21:45:08 2014 (r263274) @@ -284,6 +284,15 @@ nvme_notify_consumer(struct nvme_consume else ctrlr_cookie = NULL; ctrlr->cons_cookie[cons->id] = ctrlr_cookie; + if (ctrlr->is_failed) { + if (cons->fail_fn != NULL) + (*cons->fail_fn)(ctrlr_cookie); + /* + * Do not notify consumers about the namespaces of a + * failed controller. + */ + continue; + } for (ns_idx = 0; ns_idx < ctrlr->cdata.nn; ns_idx++) { ns = &ctrlr->ns[ns_idx]; if (cons->ns_fn != NULL)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403172145.s2HLj8lO070570>