aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mfi
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2009-08-20 19:17:53 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2009-08-20 19:17:53 +0000
commita56fe095f0d5fb20fc70b784acb0cd2d367d3e79 (patch)
treeee9b2a74c07c732ee357d4810494c3b6aecd6e71 /sys/dev/mfi
parent497e910cd321dbdc45c010417bb7079365234fcf (diff)
downloadsrc-a56fe095f0d5fb20fc70b784acb0cd2d367d3e79.tar.gz
src-a56fe095f0d5fb20fc70b784acb0cd2d367d3e79.zip
Temporarily revert the new-bus locking for 8.0 release. It will be
reintroduced after HEAD is reopened for commits by re@. Approved by: re (kib), attilio
Notes
Notes: svn path=/head/; revision=196403
Diffstat (limited to 'sys/dev/mfi')
-rw-r--r--sys/dev/mfi/mfi.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/sys/dev/mfi/mfi.c b/sys/dev/mfi/mfi.c
index 0ae585e892df..eb18ffe4ce35 100644
--- a/sys/dev/mfi/mfi.c
+++ b/sys/dev/mfi/mfi.c
@@ -1327,11 +1327,11 @@ mfi_add_ld_complete(struct mfi_command *cm)
mfi_release_command(cm);
mtx_unlock(&sc->mfi_io_lock);
- newbus_xlock();
+ mtx_lock(&Giant);
if ((child = device_add_child(sc->mfi_dev, "mfid", -1)) == NULL) {
device_printf(sc->mfi_dev, "Failed to add logical disk\n");
free(ld_info, M_MFIBUF);
- newbus_xunlock();
+ mtx_unlock(&Giant);
mtx_lock(&sc->mfi_io_lock);
return;
}
@@ -1339,7 +1339,7 @@ mfi_add_ld_complete(struct mfi_command *cm)
device_set_ivars(child, ld_info);
device_set_desc(child, "MFI Logical Disk");
bus_generic_attach(sc->mfi_dev);
- newbus_xunlock();
+ mtx_unlock(&Giant);
mtx_lock(&sc->mfi_io_lock);
}
@@ -1805,9 +1805,9 @@ mfi_check_command_post(struct mfi_softc *sc, struct mfi_command *cm)
KASSERT(ld != NULL, ("volume dissappeared"));
if (cm->cm_frame->header.cmd_status == MFI_STAT_OK) {
mtx_unlock(&sc->mfi_io_lock);
- newbus_xlock();
+ mtx_lock(&Giant);
device_delete_child(sc->mfi_dev, ld->ld_dev);
- newbus_xunlock();
+ mtx_unlock(&Giant);
mtx_lock(&sc->mfi_io_lock);
} else
mfi_disk_enable(ld);
@@ -1815,11 +1815,11 @@ mfi_check_command_post(struct mfi_softc *sc, struct mfi_command *cm)
case MFI_DCMD_CFG_CLEAR:
if (cm->cm_frame->header.cmd_status == MFI_STAT_OK) {
mtx_unlock(&sc->mfi_io_lock);
- newbus_xlock();
+ mtx_lock(&Giant);
TAILQ_FOREACH_SAFE(ld, &sc->mfi_ld_tqh, ld_link, ldn) {
device_delete_child(sc->mfi_dev, ld->ld_dev);
}
- newbus_xunlock();
+ mtx_unlock(&Giant);
mtx_lock(&sc->mfi_io_lock);
} else {
TAILQ_FOREACH(ld, &sc->mfi_ld_tqh, ld_link)
@@ -1985,9 +1985,7 @@ mfi_ioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td
adapter = ioc->mfi_adapter_no;
if (device_get_unit(sc->mfi_dev) == 0 && adapter != 0) {
- newbus_slock();
devclass = devclass_find("mfi");
- newbus_sunlock();
sc = devclass_get_softc(devclass, adapter);
}
mtx_lock(&sc->mfi_io_lock);
@@ -2175,9 +2173,7 @@ out:
struct mfi_linux_ioc_packet l_ioc;
int adapter;
- newbus_slock();
devclass = devclass_find("mfi");
- newbus_sunlock();
if (devclass == NULL)
return (ENOENT);
@@ -2198,9 +2194,7 @@ out:
struct mfi_linux_ioc_aen l_aen;
int adapter;
- newbus_slock();
devclass = devclass_find("mfi");
- newbus_sunlock();
if (devclass == NULL)
return (ENOENT);