diff options
-rw-r--r-- | sys/dev/ic/nvme.c | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c index ba64e73b0a6..d54c8254fa8 100644 --- a/sys/dev/ic/nvme.c +++ b/sys/dev/ic/nvme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nvme.c,v 1.21 2016/04/13 11:56:50 dlg Exp $ */ +/* $OpenBSD: nvme.c,v 1.22 2016/04/13 12:04:20 dlg Exp $ */ /* * Copyright (c) 2014 David Gwynne <dlg@openbsd.org> @@ -29,6 +29,7 @@ #include <machine/bus.h> #include <scsi/scsi_all.h> +#include <scsi/scsi_all.h> #include <scsi/scsiconf.h> #include <dev/ic/nvmereg.h> @@ -77,6 +78,18 @@ struct nvme_dmamem * 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 *); +int nvme_scsi_probe(struct scsi_link *); +void nvme_scsi_free(struct scsi_link *); + +struct scsi_adapter nvme_switch = { + nvme_scsi_cmd, /* cmd */ + scsi_minphys, /* minphys */ + nvme_scsi_probe, /* dev probe */ + nvme_scsi_free, /* dev free */ + NULL, /* ioctl */ +}; + #define nvme_read4(_s, _r) \ bus_space_read_4((_s)->sc_iot, (_s)->sc_ioh, (_r)) #define nvme_write4(_s, _r, _v) \ @@ -325,6 +338,25 @@ free_admin_q: return (1); } +int +nvme_scsi_probe(struct scsi_link *link) +{ + return (ENXIO); +} + +void +nvme_scsi_cmd(struct scsi_xfer *xs) +{ + xs->error = XS_DRIVER_STUFFUP; + scsi_done(xs); +} + +void +nvme_scsi_free(struct scsi_link *link) +{ + +} + void nvme_q_submit(struct nvme_softc *sc, struct nvme_queue *q, struct nvme_ccb *ccb, void (*fill)(struct nvme_softc *, struct nvme_ccb *, void *)) |