summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-09-04 17:46:31 +0000
committerimp <imp@FreeBSD.org>2001-09-04 17:46:31 +0000
commit6035e77df93ad41b979544acc7f4d400826f2cab (patch)
treeb9d417bcfe9cf2d2a47740cb994bfa38c8f71847 /sys
parent0a7ee7bb1b8492da8b94959e06a1c8df98055dd9 (diff)
downloadFreeBSD-src-6035e77df93ad41b979544acc7f4d400826f2cab.zip
FreeBSD-src-6035e77df93ad41b979544acc7f4d400826f2cab.tar.gz
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.
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 4f66cc5..d939ccd 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);
}
OpenPOWER on IntegriCloud