aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2001-09-04 17:46:31 +0000
committerWarner Losh <imp@FreeBSD.org>2001-09-04 17:46:31 +0000
commita23c7755538078cf3a9fbf9bb4fdebf2f0ffdfa6 (patch)
treeb9d417bcfe9cf2d2a47740cb994bfa38c8f71847 /sys
parent232c495d99b9611185b667b2593e43ea6b847998 (diff)
downloadsrc-a23c7755538078cf3a9fbf9bb4fdebf2f0ffdfa6.tar.gz
src-a23c7755538078cf3a9fbf9bb4fdebf2f0ffdfa6.zip
Make the csc and function interrupts ISA on shutdown. This should
help with the hanging problem on reboot. Note: we need to do the other things as well. Also, turn off the bits in the stat change interrupt mask and the cardbus interrupt mask as well in an attempt to shut off all interrupt sources.
Notes
Notes: svn path=/head/; revision=82997
Diffstat (limited to 'sys')
-rw-r--r--sys/pccard/pcic_pci.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/pccard/pcic_pci.c b/sys/pccard/pcic_pci.c
index 4f66cc522633..d939ccde0f74 100644
--- a/sys/pccard/pcic_pci.c
+++ b/sys/pccard/pcic_pci.c
@@ -1007,6 +1007,12 @@ pcic_pci_shutdown(device_t dev)
sp = &sc->slots[0];
/*
+ * Make the chips use ISA again.
+ */
+ sc->chip->func_intr_way(&sc->slots[0], pcic_iw_isa);
+ sc->chip->csc_intr_way(&sc->slots[0], pcic_iw_isa);
+
+ /*
* Turn off the power to the slot in an attempt to
* keep the system from hanging on reboot. We also turn off
* card interrupts in an attempt to control interrupt storms.
@@ -1015,8 +1021,11 @@ pcic_pci_shutdown(device_t dev)
* to INT_GEN is that the card is placed into "reset" mode
* where nothing happens until it is taken out of "reset"
* mode.
+ *
+ * Also, turn off the generation of status interrupts too.
*/
sp->putb(sp, PCIC_INT_GEN, 0);
+ sp->putb(sp, PCIC_STAT_INT, 0);
sp->putb(sp, PCIC_POWER, 0);
/*
@@ -1026,8 +1035,11 @@ pcic_pci_shutdown(device_t dev)
* normal course of operations, so we do it here too. We can't
* lose any interrupts after this point, so go ahead and ack
* everything. The bits in INT_GEN clear upon reading them.
+ * We also set the interrupt mask to 0, in an effort to avoid
+ * getting further interrupts.
*/
- bus_space_write_4(sp->bst, sp->bsh, 0, 0xffffffff);
+ bus_space_write_4(sp->bst, sp->bsh, CB_SOCKET_MASK, 0);
+ bus_space_write_4(sp->bst, sp->bsh, CB_SOCKET_EVENT, 0xffffffff);
sp->getb(sp, PCIC_STAT_CHG);
}