diff options
| author | Attilio Rao <attilio@FreeBSD.org> | 2009-08-02 14:28:40 +0000 |
|---|---|---|
| committer | Attilio Rao <attilio@FreeBSD.org> | 2009-08-02 14:28:40 +0000 |
| commit | 444b91868b5294e3a2151fffa3b063763a562448 (patch) | |
| tree | c00d808d1df8000c2086c86613be9ec8536a5e28 /sys/dev/twe | |
| parent | d40b91cb1354e9bae491567cc88c215eda16d649 (diff) | |
Notes
Diffstat (limited to 'sys/dev/twe')
| -rw-r--r-- | sys/dev/twe/twe.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/twe/twe.c b/sys/dev/twe/twe.c index 59b5027adac9..2641fae5e852 100644 --- a/sys/dev/twe/twe.c +++ b/sys/dev/twe/twe.c @@ -294,8 +294,10 @@ twe_init(struct twe_softc *sc) /* * Scan for drives */ + newbus_xlock(); for (i = 0; i < TWE_MAX_UNITS; i++) twe_add_unit(sc, i); + newbus_xunlock(); /* * Initialise connection with controller. @@ -621,11 +623,15 @@ twe_ioctl(struct twe_softc *sc, int ioctlcmd, void *addr) break; case TWEIO_ADD_UNIT: + newbus_xlock(); error = twe_add_unit(sc, td->td_unit); + newbus_xunlock(); break; case TWEIO_DEL_UNIT: + newbus_xlock(); error = twe_del_unit(sc, td->td_unit); + newbus_xunlock(); break; /* XXX implement ATA PASSTHROUGH */ |
