summaryrefslogtreecommitdiffstats
path: root/sys/dev/pccbb
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-10-29 03:36:00 +0000
committerimp <imp@FreeBSD.org>2005-10-29 03:36:00 +0000
commitf2206b9a97c93b52be6f9866616339c30c431506 (patch)
tree884c8b19314456122ee9e5096c18db8bc85d3ac0 /sys/dev/pccbb
parent5fe80693f50ce3d182d75e002cf1a5a1434c859b (diff)
downloadFreeBSD-src-f2206b9a97c93b52be6f9866616339c30c431506.zip
FreeBSD-src-f2206b9a97c93b52be6f9866616339c30c431506.tar.gz
Shutdown a little better by commenting the shutdown code and acknowledging
any interrupts after we turn off the interrupt mask.
Diffstat (limited to 'sys/dev/pccbb')
-rw-r--r--sys/dev/pccbb/pccbb.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c
index 7fa803a..74ba08c 100644
--- a/sys/dev/pccbb/pccbb.c
+++ b/sys/dev/pccbb/pccbb.c
@@ -342,15 +342,21 @@ int
cbb_shutdown(device_t brdev)
{
struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev);
- /* properly reset everything at shutdown */
+ /*
+ * Place the cards in reset, turn off the interrupts and power
+ * down the socket.
+ */
PCI_MASK_CONFIG(brdev, CBBR_BRIDGECTRL, |CBBM_BRIDGECTRL_RESET, 2);
exca_clrb(&sc->exca[0], EXCA_INTR, EXCA_INTR_RESET);
-
cbb_set(sc, CBB_SOCKET_MASK, 0);
-
+ cbb_set(sc, CBB_SOCKET_EVENT, 0xffffffff);
cbb_power(brdev, CARD_OFF);
+ /*
+ * For paranoia, turn off all address decoding. Really not needed,
+ * it seems, but it can't hurt
+ */
exca_putb(&sc->exca[0], EXCA_ADDRWIN_ENABLE, 0);
pci_write_config(brdev, CBBR_MEMBASE0, 0, 4);
pci_write_config(brdev, CBBR_MEMLIMIT0, 0, 4);
@@ -360,7 +366,6 @@ cbb_shutdown(device_t brdev)
pci_write_config(brdev, CBBR_IOLIMIT0, 0, 4);
pci_write_config(brdev, CBBR_IOBASE1, 0, 4);
pci_write_config(brdev, CBBR_IOLIMIT1, 0, 4);
- pci_write_config(brdev, PCIR_COMMAND, 0, 2);
return (0);
}
OpenPOWER on IntegriCloud