aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/pccbb
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2009-08-20 20:23:28 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2009-08-20 20:23:28 +0000
commit247db0748a75747673b753a6af3e2c39dfae88ed (patch)
treefb1ae4beb655a18383d166a5eee425754fb8eeb6 /sys/dev/pccbb
parent2c68e2fb1e2cb7386b8863b4049198be949161e1 (diff)
Notes
Diffstat (limited to 'sys/dev/pccbb')
-rw-r--r--sys/dev/pccbb/pccbb.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c
index f60118528ff8..a0585b00b8ea 100644
--- a/sys/dev/pccbb/pccbb.c
+++ b/sys/dev/pccbb/pccbb.c
@@ -464,7 +464,14 @@ cbb_event_thread(void *arg)
sc->flags |= CBB_KTHREAD_RUNNING;
while ((sc->flags & CBB_KTHREAD_DONE) == 0) {
mtx_unlock(&sc->mtx);
- newbus_xlock();
+ /*
+ * We take out Giant here because we need it deep,
+ * down in the bowels of the vm system for mapping the
+ * memory we need to read the CIS. In addition, since
+ * we are adding/deleting devices from the dev tree,
+ * and that code isn't MP safe, we have to hold Giant.
+ */
+ mtx_lock(&Giant);
status = cbb_get(sc, CBB_SOCKET_STATE);
DPRINTF(("Status is 0x%x\n", status));
if (!CBB_CARD_PRESENT(status)) {
@@ -490,7 +497,7 @@ cbb_event_thread(void *arg)
not_a_card = 0; /* We know card type */
cbb_insert(sc);
}
- newbus_xunlock();
+ mtx_unlock(&Giant);
/*
* First time through we need to tell mountroot that we're