Date: Tue, 13 Aug 2013 21:49:32 +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: r254303 - head/sys/dev/nvme Message-ID: <201308132149.r7DLnWDB059058@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jimharris Date: Tue Aug 13 21:49:32 2013 New Revision: 254303 URL: http://svnweb.freebsd.org/changeset/base/254303 Log: If a controller fails to initialize, do not notify consumers (nvd) of its namespaces. Sponsoredy by: Intel Reviewed by: carl MFC after: 3 days Modified: head/sys/dev/nvme/nvme.c Modified: head/sys/dev/nvme/nvme.c ============================================================================== --- head/sys/dev/nvme/nvme.c Tue Aug 13 21:47:08 2013 (r254302) +++ head/sys/dev/nvme/nvme.c Tue Aug 13 21:49:32 2013 (r254303) @@ -278,6 +278,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?201308132149.r7DLnWDB059058>