summaryrefslogtreecommitdiffstats
path: root/sys/dev/ciss
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2004-04-14 19:45:07 +0000
committerps <ps@FreeBSD.org>2004-04-14 19:45:07 +0000
commit290ea04ebfdbc80f18ec99925f08b0884da605d9 (patch)
tree982b8bdeb2dc03d5bc8c385e553e147c113943dd /sys/dev/ciss
parentf80c402a7a3c8a73bcb46ca2b2c2445a1e18c2d4 (diff)
downloadFreeBSD-src-290ea04ebfdbc80f18ec99925f08b0884da605d9.zip
FreeBSD-src-290ea04ebfdbc80f18ec99925f08b0884da605d9.tar.gz
Don't allow the driver to be unloaded if the device node is open.
Diffstat (limited to 'sys/dev/ciss')
-rw-r--r--sys/dev/ciss/ciss.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index 0988b34..367d3ce 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -428,7 +428,10 @@ ciss_detach(device_t dev)
struct ciss_softc *sc = device_get_softc(dev);
debug_called(1);
-
+
+ if (sc->ciss_flags & CISS_FLAG_CONTROL_OPEN)
+ return (EBUSY);
+
/* flush adapter cache */
ciss_flush_adapter(sc);
OpenPOWER on IntegriCloud