Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Sep 2012 13:52:02 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Jim Harris <jimharris@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r240697 - head/sys/dev/nvme
Message-ID:  <201209191352.02814.jhb@freebsd.org>
In-Reply-To: <201209191621.q8JGLOaR024645@svn.freebsd.org>
References:  <201209191621.q8JGLOaR024645@svn.freebsd.org>

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



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