diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2006-08-18 10:27:07 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2006-08-18 10:27:07 +0000 |
commit | bcadf760f778448cbabd449e141fcf498789d550 (patch) | |
tree | c3426efd54a9ac6822c00987715735ff861d6aa4 /sys/dev/pci/arc.c | |
parent | 99cc0124184da5f0a7f5d24653c894da1ee52221 (diff) |
arc, meet bio. bio, meet arc.
Diffstat (limited to 'sys/dev/pci/arc.c')
-rw-r--r-- | sys/dev/pci/arc.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/sys/dev/pci/arc.c b/sys/dev/pci/arc.c index 4d69032eb28..597f63b11a0 100644 --- a/sys/dev/pci/arc.c +++ b/sys/dev/pci/arc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arc.c,v 1.24 2006/08/18 04:07:11 dlg Exp $ */ +/* $OpenBSD: arc.c,v 1.25 2006/08/18 10:27:06 dlg Exp $ */ /* * Copyright (c) 2006 David Gwynne <dlg@openbsd.org> @@ -16,6 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "bio.h" + #include <sys/param.h> #include <sys/systm.h> #include <sys/buf.h> @@ -34,6 +36,11 @@ #include <scsi/scsi_all.h> #include <scsi/scsiconf.h> +#if NBIO > 0 +#include <sys/ioctl.h> +#include <dev/biovar.h> +#endif + #ifdef ARC_DEBUG #define ARC_D_INIT (1<<0) #define ARC_D_RW (1<<1) @@ -335,6 +342,11 @@ u_int8_t arc_msg_cksum(void *, size_t); int arc_msgbuf(struct arc_softc *, void *, size_t, void *, size_t); +/* bioctl */ +#if NBIO > 0 +int arc_bioctl(struct device *, u_long, caddr_t); +#endif + int arc_match(struct device *parent, void *match, void *aux) { @@ -379,6 +391,11 @@ arc_attach(struct device *parent, struct device *self, void *aux) arc_write(sc, ARC_REG_INTRMASK, ~(ARC_REG_INTRMASK_POSTQUEUE|ARC_REG_INTRSTAT_DOORBELL)); +#if NBIO > 0 + if (bio_register(self, arc_bioctl) != 0) + panic("%s: bioctl registration failed\n", DEVNAME(sc)); +#endif + return; } @@ -768,6 +785,14 @@ arc_query_firmware(struct arc_softc *sc) return (0); } +#if NBIO > 0 +int +arc_bioctl(struct device *self, u_long cmd, caddr_t addr) +{ + return (ENOTTY); +} +#endif /* NBIO > 0 */ + u_int8_t arc_msg_cksum(void *cmd, size_t len) { |