summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorMartin Reindl <martin@cvs.openbsd.org>2006-06-03 01:51:55 +0000
committerMartin Reindl <martin@cvs.openbsd.org>2006-06-03 01:51:55 +0000
commitdc6c763056c86017636eaf1e517e04bc4021028a (patch)
treeb78f01ea2740abda1d5b65335a566d758fd23aef /sys/dev/ic
parent3ed81cc35202943b15b616655050eb149b5e5d7c (diff)
make detachable, inspired by netbsd
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/aic6360.c13
-rw-r--r--sys/dev/ic/aic6360var.h3
2 files changed, 14 insertions, 2 deletions
diff --git a/sys/dev/ic/aic6360.c b/sys/dev/ic/aic6360.c
index 881b2a79ce7..b2d185cd9b8 100644
--- a/sys/dev/ic/aic6360.c
+++ b/sys/dev/ic/aic6360.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic6360.c,v 1.11 2006/05/23 20:42:21 miod Exp $ */
+/* $OpenBSD: aic6360.c,v 1.12 2006/06/03 01:51:54 martin Exp $ */
/* $NetBSD: aic6360.c,v 1.52 1996/12/10 21:27:51 thorpej Exp $ */
#ifdef DDB
@@ -296,6 +296,17 @@ aicattach(sc)
config_found(&sc->sc_dev, &sc->sc_link, scsiprint);
}
+int
+aic_detach(struct device *self, int flags)
+{
+ struct aic_softc *sc = (struct aic_softc *) self;
+ int rv = 0;
+
+ rv = config_detach_children(&sc->sc_dev, flags);
+
+ return (rv);
+}
+
/* Initialize AIC6360 chip itself
* The following conditions should hold:
* aicprobe should have succeeded, i.e. the ioh handle in aic_softc must
diff --git a/sys/dev/ic/aic6360var.h b/sys/dev/ic/aic6360var.h
index 7522c88cfdc..07a53c9bf85 100644
--- a/sys/dev/ic/aic6360var.h
+++ b/sys/dev/ic/aic6360var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic6360var.h,v 1.5 2006/06/02 06:26:15 martin Exp $ */
+/* $OpenBSD: aic6360var.h,v 1.6 2006/06/03 01:51:54 martin Exp $ */
/* $NetBSD: aic6360.c,v 1.52 1996/12/10 21:27:51 thorpej Exp $ */
/*
@@ -214,5 +214,6 @@ struct aic_softc {
#define AIC_START(s) AIC_PRINT(AIC_SHOWSTART, s)
void aicattach(struct aic_softc *);
+int aic_detach(struct device *, int);
int aicintr(void *);
int aic_find(bus_space_tag_t, bus_space_handle_t);