From owner-svn-src-head@FreeBSD.ORG Tue Aug 13 21:49:33 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2EDD9A89; Tue, 13 Aug 2013 21:49:33 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1C07D2852; Tue, 13 Aug 2013 21:49:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7DLnWu5059088; Tue, 13 Aug 2013 21:49:32 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7DLnWDB059058; Tue, 13 Aug 2013 21:49:32 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201308132149.r7DLnWDB059058@svn.freebsd.org> From: Jim Harris Date: Tue, 13 Aug 2013 21:49:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254303 - head/sys/dev/nvme X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Aug 2013 21:49:33 -0000 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)