summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordyoung <dyoung@NetBSD.org>2009-05-03 00:31:12 +0000
committerdyoung <dyoung@NetBSD.org>2009-05-03 00:31:12 +0000
commit85d5fd7b8317aed2e89dd7d07d64d5ca7ced8493 (patch)
tree08d364c188267cdab6fdeb464578248e99c4188f
parent1e54487f2a4bba3b635077f95d71adf12b5e60d7 (diff)
In pccbb_pci_callback(), set CBB_SPECMAPPED in sc_flags if we've
acquired bus space from bus_space_alloc(9) or from rbus_space_alloc(), so that we use the appropriate routine to release the bus space in pccbbdetach(). This stops panics during cbb(4) detachment (esp. at shutdown) on some systems. Thanks to Kurt Schreiner for testing the fix, Kurt, Patrick Welche, Pouya D. Tafti, and Matt Green for reporting.
-rw-r--r--sys/dev/pci/pccbb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/pccbb.c b/sys/dev/pci/pccbb.c
index b7088e14e74..55f58944ec4 100644
--- a/sys/dev/pci/pccbb.c
+++ b/sys/dev/pci/pccbb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pccbb.c,v 1.185 2009/04/02 00:09:33 dyoung Exp $ */
+/* $NetBSD: pccbb.c,v 1.186 2009/05/03 00:31:12 dyoung Exp $ */
/*
* Copyright (c) 1998, 1999 and 2000
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pccbb.c,v 1.185 2009/04/02 00:09:33 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pccbb.c,v 1.186 2009/05/03 00:31:12 dyoung Exp $");
/*
#define CBB_DEBUG
@@ -643,7 +643,7 @@ pccbb_pci_callback(device_t self)
(unsigned long)pci_conf_read(pc,
sc->sc_tag, PCI_SOCKBASE)));
#endif
- sc->sc_flags |= CBB_MEMHMAPPED;
+ sc->sc_flags |= CBB_MEMHMAPPED|CBB_SPECMAPPED;
}
/* clear data structure for child device interrupt handlers */