From 58bd05d97b151a8113d4ac758be68d3e803acb1e Mon Sep 17 00:00:00 2001 From: Aaron Campbell Date: Wed, 29 Nov 2000 21:18:15 +0000 Subject: 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). --- sys/dev/pci/pccbb.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'sys') 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 -- cgit v1.2.3