Date: Sat, 20 Jun 2026 10:20:29 -0400 From: Mark Johnston <markj@freebsd.org> To: Warner Losh <imp@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 949804c81909 - main - nvme: Use newbus to ask if a device is storage Message-ID: <ajahrZ7Ux85D6K_M@framework> In-Reply-To: <6a32b7af.3e162.34185707@gitrepo.freebsd.org>
index | next in thread | previous in thread | raw e-mail
On Wed, Jun 17, 2026 at 03:05:19PM +0000, Warner Losh wrote: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=949804c819096b40210e0b0729e54ba10b79c2e8 > > commit 949804c819096b40210e0b0729e54ba10b79c2e8 > Author: Warner Losh <imp@FreeBSD.org> > AuthorDate: 2026-06-17 15:03:31 +0000 > Commit: Warner Losh <imp@FreeBSD.org> > CommitDate: 2026-06-17 15:03:31 +0000 > > nvme: Use newbus to ask if a device is storage > > As NVMe is in more places, it has a variety of attachments. On non PCI > busses, we assume we're a storage device. For PCI, we look at the > interface ID. Add newbus glue to make this happen. > > Sponsored by: Netflix > Discussed with: jhb > Reviewed by: adrian > Differential Revision: https://reviews.freebsd.org/D56994 > --- > sys/dev/nvme/nvme_if.m | 15 +++++++++++++++ > sys/dev/nvme/nvme_pci.c | 15 +++++++++++++++ > sys/dev/nvme/nvme_sim.c | 3 +++ > 3 files changed, 33 insertions(+) > > diff --git a/sys/dev/nvme/nvme_if.m b/sys/dev/nvme/nvme_if.m > index 5a06ff112f4c..9705aeb7ce0b 100644 > --- a/sys/dev/nvme/nvme_if.m > +++ b/sys/dev/nvme/nvme_if.m > @@ -12,6 +12,14 @@ HEADER { > #include "dev/nvme/nvme_private.h" > }; > > +CODE { > + static bool > + default_is_storage_device(device_t dev) > + { > + return (true); > + } > +} > + After this commit I see a warning during buildkernel of a GENERIC kernel: nvme_if.c:21:1: warning: unused function 'default_is_storage_device' [-Wunused-function]home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ajahrZ7Ux85D6K_M>
