From: dlg Date: Fri, 28 May 2021 02:03:11 +0000 (+0000) Subject: move the nvme_dmamem prototypes so bus glue can use them. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a4b5505e4eb832e8afabfb4d75b1e999c780bcb5;p=openbsd move the nvme_dmamem prototypes so bus glue can use them. ok jmatthew@ --- diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c index 29f98d1caac..e2807ab1938 100644 --- a/sys/dev/ic/nvme.c +++ b/sys/dev/ic/nvme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nvme.c,v 1.94 2021/05/28 01:57:20 dlg Exp $ */ +/* $OpenBSD: nvme.c,v 1.95 2021/05/28 02:03:11 dlg Exp $ */ /* * Copyright (c) 2014 David Gwynne @@ -79,11 +79,6 @@ void nvme_q_submit(struct nvme_softc *, int nvme_q_complete(struct nvme_softc *, struct nvme_queue *); void nvme_q_free(struct nvme_softc *, struct nvme_queue *); -struct nvme_dmamem * - nvme_dmamem_alloc(struct nvme_softc *, size_t); -void nvme_dmamem_free(struct nvme_softc *, struct nvme_dmamem *); -void nvme_dmamem_sync(struct nvme_softc *, struct nvme_dmamem *, int); - void nvme_scsi_cmd(struct scsi_xfer *); void nvme_minphys(struct buf *, struct scsi_link *); int nvme_scsi_probe(struct scsi_link *); diff --git a/sys/dev/ic/nvmevar.h b/sys/dev/ic/nvmevar.h index 5efe4f6be03..1ea682d7ab5 100644 --- a/sys/dev/ic/nvmevar.h +++ b/sys/dev/ic/nvmevar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nvmevar.h,v 1.24 2021/05/28 01:58:27 dlg Exp $ */ +/* $OpenBSD: nvmevar.h,v 1.25 2021/05/28 02:03:11 dlg Exp $ */ /* * Copyright (c) 2014 David Gwynne @@ -102,6 +102,8 @@ struct nvme_softc { struct scsi_iopool sc_iopool; }; +#define DEVNAME(_sc) ((_sc)->sc_dev.dv_xname) + int nvme_attach(struct nvme_softc *); int nvme_activate(struct nvme_softc *, int); int nvme_intr(void *); @@ -119,4 +121,7 @@ void nvme_write8(struct nvme_softc *, bus_size_t, u_int64_t); #define nvme_barrier(_s, _r, _l, _f) \ bus_space_barrier((_s)->sc_iot, (_s)->sc_ioh, (_r), (_l), (_f)) -#define DEVNAME(_sc) ((_sc)->sc_dev.dv_xname) +struct nvme_dmamem * + nvme_dmamem_alloc(struct nvme_softc *, size_t); +void nvme_dmamem_free(struct nvme_softc *, struct nvme_dmamem *); +void nvme_dmamem_sync(struct nvme_softc *, struct nvme_dmamem *, int);