summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2000-11-29 21:18:15 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2000-11-29 21:18:15 +0000
commit58bd05d97b151a8113d4ac758be68d3e803acb1e (patch)
tree9e92e5785cdce9b952fb72ea51d056ebf9778c52 /sys/dev
parent2e17e17a287aa224500c73cfb776f2092653ea19 (diff)
Power down PC cards at shutdown time; from NetBSD. I'm also reverting my own
fix for this (rev 1.7) as this is the better way to do it. This fixes the problem seen with reboot while an xl(4) CardBus card is in a slot on my Toshiba Tecra 550CDT (so it should fix the same problem espie@ has seen on a different model Toshiba laptop).
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/pccbb.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/pci/pccbb.c b/sys/dev/pci/pccbb.c
index 6344aac77bb..3335bb0fff2 100644
--- a/sys/dev/pci/pccbb.c
+++ b/sys/dev/pci/pccbb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pccbb.c,v 1.8 2000/10/09 17:31:04 aaron Exp $ */
+/* $OpenBSD: pccbb.c,v 1.9 2000/11/29 21:18:14 aaron Exp $ */
/* $NetBSD: pccbb.c,v 1.42 2000/06/16 23:41:35 cgd Exp $ */
/*
@@ -361,6 +361,10 @@ pccbb_shutdown(void *arg)
pcireg_t command;
DPRINTF(("%s: shutdown\n", sc->sc_dev.dv_xname));
+
+ /* turn off power */
+ pccbb_power((cardbus_chipset_tag_t)sc, CARDBUS_VCC_0V | CARDBUS_VPP_0V);
+
bus_space_write_4(sc->sc_base_memt, sc->sc_base_memh, CB_SOCKET_MASK,
0);
@@ -369,11 +373,6 @@ pccbb_shutdown(void *arg)
command &= ~(PCI_COMMAND_IO_ENABLE | PCI_COMMAND_MEM_ENABLE |
PCI_COMMAND_MASTER_ENABLE);
pci_conf_write(sc->sc_pc, sc->sc_tag, PCI_COMMAND_STATUS_REG, command);
-
- if (sc->sc_chipset == CB_TOPIC95B) {
- pci_conf_write(sc->sc_pc, sc->sc_tag, TOPIC_SOCKET_CTRL, 0);
- pci_conf_write(sc->sc_pc, sc->sc_tag, TOPIC_SLOT_CTRL, 0);
- }
}
void