Module Name: src Committed By: dyoung Date: Mon Mar 22 17:20:42 UTC 2010
Modified Files: src/sys/dev/pci: if_ex_pci.c Log Message: psc_pwrmgmt_csr_reg was never initialized to the actual offset of the PCI PMCSR! Just delete psc_pwrmgmt_csr_reg and all uses of it. In this way, ex_pci_disable() becomes a no-op, so delete it, too. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/dev/pci/if_ex_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/if_ex_pci.c diff -u src/sys/dev/pci/if_ex_pci.c:1.51 src/sys/dev/pci/if_ex_pci.c:1.52 --- src/sys/dev/pci/if_ex_pci.c:1.51 Fri Feb 26 00:38:14 2010 +++ src/sys/dev/pci/if_ex_pci.c Mon Mar 22 17:20:42 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ex_pci.c,v 1.51 2010/02/26 00:38:14 dyoung Exp $ */ +/* $NetBSD: if_ex_pci.c,v 1.52 2010/03/22 17:20:42 dyoung Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ex_pci.c,v 1.51 2010/02/26 00:38:14 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ex_pci.c,v 1.52 2010/03/22 17:20:42 dyoung Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -74,9 +74,6 @@ pci_chipset_tag_t psc_pc; /* pci chipset tag */ pcireg_t psc_regs[0x40>>2]; /* saved PCI config regs (sparse) */ pcitag_t psc_tag; /* pci device tag */ - - int psc_pwrmgmt_csr_reg; /* ACPI power management register */ - pcireg_t psc_pwrmgmt_csr; /* ...and the contents at D0 */ }; /* @@ -96,7 +93,6 @@ static void ex_pci_intr_ack(struct ex_softc *); static int ex_pci_enable(struct ex_softc *); -static void ex_pci_disable(struct ex_softc *); static void ex_pci_confreg_restore(struct ex_pci_softc *); static int ex_d3tod0(pci_chipset_tag_t, pcitag_t, device_t, pcireg_t); @@ -277,7 +273,7 @@ break; case 0: sc->enable = ex_pci_enable; - sc->disable = ex_pci_disable; + sc->disable = NULL; break; default: aprint_error_dev(self, "cannot activate %d\n", error); @@ -390,25 +386,8 @@ aprint_debug_dev(sc->sc_dev, "going to power state D0\n"); - /* Bring the device into D0 power state. */ - pci_conf_write(psc->psc_pc, psc->psc_tag, - psc->psc_pwrmgmt_csr_reg, psc->psc_pwrmgmt_csr); - /* Now restore the configuration registers. */ ex_pci_confreg_restore(psc); return (0); } - -static void -ex_pci_disable(struct ex_softc *sc) -{ - struct ex_pci_softc *psc = (void *) sc; - - aprint_debug_dev(sc->sc_dev, "going to power state D3\n"); - - /* Put the device into D3 state. */ - pci_conf_write(psc->psc_pc, psc->psc_tag, - psc->psc_pwrmgmt_csr_reg, (psc->psc_pwrmgmt_csr & - ~PCI_PMCSR_STATE_MASK) | PCI_PMCSR_STATE_D3); -}