summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2007-11-23 18:21:56 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2007-11-23 18:21:56 +0000
commit11193c8305abc0f04801b9de03641d1d631fce7a (patch)
tree962fe8681470c641e2b06608ecd6e43d4275f6ef /sys/dev/ic
parent5a9127f088e3735e2e9bfd36e35fef9ad9fef596 (diff)
starting bits to implement hotplug of sili controllers. this adds the code
to clean up the atascsi stuff, and has sili call it when its going away. tested on an expresscard sili variant by kettenis@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/sili.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/dev/ic/sili.c b/sys/dev/ic/sili.c
index 208c12a9334..99fb1166119 100644
--- a/sys/dev/ic/sili.c
+++ b/sys/dev/ic/sili.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sili.c,v 1.35 2007/10/09 05:43:37 ray Exp $ */
+/* $OpenBSD: sili.c,v 1.36 2007/11/23 18:21:55 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -205,6 +205,17 @@ sili_attach(struct sili_softc *sc)
int
sili_detach(struct sili_softc *sc, int flags)
{
+ int rv;
+
+ if (sc->sc_atascsi != NULL) {
+ rv = atascsi_detach(sc->sc_atascsi, flags);
+ if (rv != 0)
+ return (rv);
+ }
+
+ if (sc->sc_ports != NULL)
+ sili_ports_free(sc);
+
return (0);
}