summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/scsi/scsiconf.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index 8d40860939d..18864714b94 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.c,v 1.119 2006/11/27 11:56:20 dlg Exp $ */
+/* $OpenBSD: scsiconf.c,v 1.120 2006/11/27 13:33:15 dlg Exp $ */
/* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */
/*
@@ -47,6 +47,8 @@
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*/
+#include "bio.h"
+
#include <sys/types.h>
#include <sys/param.h>
#include <sys/systm.h>
@@ -56,6 +58,10 @@
#include <scsi/scsi_all.h>
#include <scsi/scsiconf.h>
+#if NBIO > 0
+#include <dev/biovar.h>
+#endif
+
/*
* Declarations
*/
@@ -75,6 +81,10 @@ int scsibusdetach(struct device *, int);
int scsibussubmatch(struct device *, void *, void *);
+#if NBIO > 0
+int scsibus_bioctl(struct device *, u_long, caddr_t);
+#endif
+
struct cfattach scsibus_ca = {
sizeof(struct scsibus_softc), scsibusmatch, scsibusattach,
scsibusdetach, scsibusactivate
@@ -159,6 +169,11 @@ scsibusattach(struct device *parent, struct device *self, void *aux)
bzero(sb->sc_link[i], nbytes);
}
+#if NBIO > 0
+ if (bio_register(&sb->sc_dev, scsibus_bioctl) != 0)
+ printf("%s: unable to register bio\n", sb->sc_dev.dv_xname);
+#endif
+
scsi_probe_bus(sb);
}
@@ -174,6 +189,10 @@ scsibusdetach(struct device *dev, int type)
struct scsibus_softc *sb = (struct scsibus_softc *)dev;
int i, j, error;
+#if NBIO > 0
+ bio_unregister(&sb->sc_dev);
+#endif
+
if ((error = config_detach_children(dev, type)) != 0)
return (error);
@@ -210,6 +229,14 @@ scsibussubmatch(struct device *parent, void *match, void *aux)
return ((*cf->cf_attach->ca_match)(parent, match, aux));
}
+#if NBIO > 0
+int
+scsibus_bioctl(struct device *dev, u_long cmd, caddr_t addr)
+{
+ return (ENOTTY);
+}
+#endif
+
int
scsi_probe_bus(struct scsibus_softc *sc)
{