From owner-svn-src-head@FreeBSD.ORG Wed Sep 19 18:00:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 837871065670; Wed, 19 Sep 2012 18:00:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 46BF38FC08; Wed, 19 Sep 2012 18:00:06 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A9A9CB91E; Wed, 19 Sep 2012 14:00:05 -0400 (EDT) From: John Baldwin To: Jim Harris Date: Wed, 19 Sep 2012 13:52:02 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <201209191621.q8JGLOaR024645@svn.freebsd.org> In-Reply-To: <201209191621.q8JGLOaR024645@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201209191352.02814.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 19 Sep 2012 14:00:05 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240697 - head/sys/dev/nvme X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 19 Sep 2012 18:00:10 -0000 On Wednesday, September 19, 2012 12:21:24 pm Jim Harris wrote: > Author: jimharris > Date: Wed Sep 19 16:21:23 2012 > New Revision: 240697 > URL: http://svn.freebsd.org/changeset/base/240697 > > Log: > Report nvme(4) as a generic driver for NVMe devices if PCI class, subclass > and programming interface codes match. You need to set a description in the generic case. I would suggest doing something like: while (ep->type && ep->type != type) ++ep; if (ep->desc) { device_set_desc(device, ep->desc); return (BUS_PROBE_DEFAULT); } #ifdef PCIS_STORAGE_NVM if (pci_get_class(device) == PCIC_STORAGE && ...) { device_set_desc(device, "blah blah"); return (BUS_PROBE_GENERIC); } #endif return (ENXIO); I think that might be a bit clearer to the reader. -- John Baldwin