Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Sep 2019 23:09:50 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r351908 - stable/12/sys/dev/nvme
Message-ID:  <201909052309.x85N9o9f029382@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Thu Sep  5 23:09:50 2019
New Revision: 351908
URL: https://svnweb.freebsd.org/changeset/base/351908

Log:
  MFC r351406,r351447:
  
    r351406:
      We need to define version 1 of nvme, not nvme_foo. Otherwise nvd won't load
      and people who pull in nvme/nvd from modules can't load nvd.ko since it
      depends on nvme, not nvme_foo. The duplicate doesn't matter since kldxref
      properly handles that case.
    r351447:
      It turns out the duplication is only mostly harmless.

Modified:
  stable/12/sys/dev/nvme/nvme.c
  stable/12/sys/dev/nvme/nvme_ahci.c
  stable/12/sys/dev/nvme/nvme_pci.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/nvme/nvme.c
==============================================================================
--- stable/12/sys/dev/nvme/nvme.c	Thu Sep  5 23:07:57 2019	(r351907)
+++ stable/12/sys/dev/nvme/nvme.c	Thu Sep  5 23:09:50 2019	(r351908)
@@ -364,3 +364,19 @@ nvme_completion_poll_cb(void *arg, const struct nvme_c
 	memcpy(&status->cpl, cpl, sizeof(*cpl));
 	atomic_store_rel_int(&status->done, 1);
 }
+
+static int
+nvme_modevent(module_t mod __unused, int type __unused, void *argp __unused)
+{
+       return (0);
+}
+
+static moduledata_t nvme_mod = {
+       "nvme",
+       nvme_modevent,
+       0
+};
+
+DECLARE_MODULE(nvme, nvme_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);
+MODULE_VERSION(nvme, 1);
+MODULE_DEPEND(nvme, cam, 1, 1, 1);

Modified: stable/12/sys/dev/nvme/nvme_ahci.c
==============================================================================
--- stable/12/sys/dev/nvme/nvme_ahci.c	Thu Sep  5 23:07:57 2019	(r351907)
+++ stable/12/sys/dev/nvme/nvme_ahci.c	Thu Sep  5 23:09:50 2019	(r351908)
@@ -55,7 +55,6 @@ static driver_t nvme_ahci_driver = {
 };
 
 DRIVER_MODULE(nvme, ahci, nvme_ahci_driver, nvme_devclass, NULL, 0);
-MODULE_VERSION(nvme_ahci, 1);
 
 static int
 nvme_ahci_probe (device_t device)

Modified: stable/12/sys/dev/nvme/nvme_pci.c
==============================================================================
--- stable/12/sys/dev/nvme/nvme_pci.c	Thu Sep  5 23:07:57 2019	(r351907)
+++ stable/12/sys/dev/nvme/nvme_pci.c	Thu Sep  5 23:09:50 2019	(r351908)
@@ -62,7 +62,6 @@ static driver_t nvme_pci_driver = {
 };
 
 DRIVER_MODULE(nvme, pci, nvme_pci_driver, nvme_devclass, NULL, 0);
-MODULE_VERSION(nvme_pci, 1);
 
 static struct _pcsid
 {



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