summaryrefslogtreecommitdiffstats
path: root/sys/dev/nvd/nvd.c
diff options
context:
space:
mode:
authorjimharris <jimharris@FreeBSD.org>2013-03-26 18:39:54 +0000
committerjimharris <jimharris@FreeBSD.org>2013-03-26 18:39:54 +0000
commit3af2a639e26237c58c97144dff22e8212a683d31 (patch)
treea4018c3bceb51a133bcda223f598f82d5d1692b0 /sys/dev/nvd/nvd.c
parent68cbcde2c3b19f1e130a75ba8e3a6adbbda96ccf (diff)
downloadFreeBSD-src-3af2a639e26237c58c97144dff22e8212a683d31.zip
FreeBSD-src-3af2a639e26237c58c97144dff22e8212a683d31.tar.gz
Add an interface for nvme shim drivers (i.e. nvd) to register for
notifications when new nvme controllers are added to the system. Sponsored by: Intel
Diffstat (limited to 'sys/dev/nvd/nvd.c')
-rw-r--r--sys/dev/nvd/nvd.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/nvd/nvd.c b/sys/dev/nvd/nvd.c
index d221375..5072889 100644
--- a/sys/dev/nvd/nvd.c
+++ b/sys/dev/nvd/nvd.c
@@ -45,7 +45,7 @@ struct nvd_disk;
static disk_ioctl_t nvd_ioctl;
static disk_strategy_t nvd_strategy;
-static void create_geom_disk(void *, struct nvme_namespace *ns);
+static void *create_geom_disk(struct nvme_namespace *ns, void *ctrlr);
static void destroy_geom_disk(struct nvd_disk *ndisk);
static int nvd_load(void);
@@ -105,7 +105,7 @@ nvd_load()
{
TAILQ_INIT(&nvd_head);
- consumer_handle = nvme_register_consumer(create_geom_disk, NULL);
+ consumer_handle = nvme_register_consumer(create_geom_disk, NULL, NULL);
return (consumer_handle != NULL ? 0 : -1);
}
@@ -233,8 +233,8 @@ nvd_bioq_process(void *arg, int pending)
}
}
-static void
-create_geom_disk(void *arg, struct nvme_namespace *ns)
+static void *
+create_geom_disk(struct nvme_namespace *ns, void *ctrlr)
{
struct nvd_disk *ndisk;
struct disk *disk;
@@ -287,6 +287,8 @@ create_geom_disk(void *arg, struct nvme_namespace *ns)
taskqueue_start_threads(&ndisk->tq, 1, PI_DISK, "nvd taskq");
TAILQ_INSERT_HEAD(&nvd_head, ndisk, tailq);
+
+ return (NULL);
}
static void
OpenPOWER on IntegriCloud