summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/dev/nvme/nvme_ns.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/dev/nvme/nvme_ns.c')
-rw-r--r--freebsd/sys/dev/nvme/nvme_ns.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/freebsd/sys/dev/nvme/nvme_ns.c b/freebsd/sys/dev/nvme/nvme_ns.c
index 7cc59071..d23061da 100644
--- a/freebsd/sys/dev/nvme/nvme_ns.c
+++ b/freebsd/sys/dev/nvme/nvme_ns.c
@@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$");
#include "nvme_private.h"
+#ifndef __rtems__
static void nvme_bio_child_inbed(struct bio *parent, int bio_error);
static void nvme_bio_child_done(void *arg,
const struct nvme_completion *cpl);
@@ -63,6 +64,7 @@ static struct bio ** nvme_construct_child_bios(struct bio *bp,
static int nvme_ns_split_bio(struct nvme_namespace *ns,
struct bio *bp,
uint32_t alignment);
+#endif /* __rtems__ */
static int
nvme_ns_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int flag,
@@ -76,10 +78,12 @@ nvme_ns_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int flag,
ctrlr = ns->ctrlr;
switch (cmd) {
+#ifndef __rtems__
case NVME_IO_TEST:
case NVME_BIO_TEST:
nvme_ns_test(ns, cmd, arg);
break;
+#endif /* __rtems__ */
case NVME_PASSTHROUGH_CMD:
pt = (struct nvme_pt_command *)arg;
return (nvme_ctrlr_passthrough_cmd(ctrlr, pt, ns->id,
@@ -125,6 +129,7 @@ nvme_ns_close(struct cdev *dev __unused, int flags, int fmt __unused,
return (0);
}
+#ifndef __rtems__
static void
nvme_ns_strategy_done(void *arg, const struct nvme_completion *cpl)
{
@@ -161,15 +166,20 @@ nvme_ns_strategy(struct bio *bp)
}
}
+#endif /* __rtems__ */
static struct cdevsw nvme_ns_cdevsw = {
.d_version = D_VERSION,
.d_flags = D_DISK,
+#ifndef __rtems__
.d_read = physread,
.d_write = physwrite,
+#endif /* __rtems__ */
.d_open = nvme_ns_open,
.d_close = nvme_ns_close,
+#ifndef __rtems__
.d_strategy = nvme_ns_strategy,
+#endif /* __rtems__ */
.d_ioctl = nvme_ns_ioctl
};
@@ -240,6 +250,7 @@ nvme_ns_get_stripesize(struct nvme_namespace *ns)
return (ns->boundary);
}
+#ifndef __rtems__
static void
nvme_ns_bio_done(void *arg, const struct nvme_completion *status)
{
@@ -496,6 +507,7 @@ nvme_ns_bio_process(struct nvme_namespace *ns, struct bio *bp,
return (err);
}
+#endif /* __rtems__ */
int
nvme_ns_ioctl_process(struct nvme_namespace *ns, u_long cmd, caddr_t arg,