summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2004-06-28 20:26:21 +0000
committerimp <imp@FreeBSD.org>2004-06-28 20:26:21 +0000
commit61364cc86985fcfada6a818e1b48f59f91793aa2 (patch)
treea848db56387b1bdbfade2cf2d05b4a68c07fd355 /sys
parentdc0d070947944ef9cf45f4ee922c982e0b8423ff (diff)
downloadFreeBSD-src-61364cc86985fcfada6a818e1b48f59f91793aa2.zip
FreeBSD-src-61364cc86985fcfada6a818e1b48f59f91793aa2.tar.gz
Remove the setting of the pci config variables on power state changes.
The bus does this now.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/firewire/fwohci_pci.c5
-rw-r--r--sys/dev/fxp/if_fxp.c39
-rw-r--r--sys/dev/lge/if_lge.c24
-rw-r--r--sys/dev/nge/if_nge.c24
-rw-r--r--sys/dev/txp/if_txp.c23
5 files changed, 2 insertions, 113 deletions
diff --git a/sys/dev/firewire/fwohci_pci.c b/sys/dev/firewire/fwohci_pci.c
index 962c45b..b1ee33d 100644
--- a/sys/dev/firewire/fwohci_pci.c
+++ b/sys/dev/firewire/fwohci_pci.c
@@ -428,11 +428,6 @@ fwohci_pci_resume(device_t dev)
{
fwohci_softc_t *sc = device_get_softc(dev);
-#ifndef BURN_BRIDGES
- device_printf(dev, "fwohci_pci_resume: power_state = 0x%08x\n",
- pci_get_powerstate(dev));
- pci_set_powerstate(dev, PCI_POWERSTATE_D0);
-#endif
fwohci_pci_init(dev);
fwohci_resume(sc, dev);
return 0;
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index 9d6c8ea..6dc1aa6 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -210,9 +210,6 @@ static void fxp_intr_body(struct fxp_softc *sc, struct ifnet *ifp,
static void fxp_init(void *xsc);
static void fxp_init_body(struct fxp_softc *sc);
static void fxp_tick(void *xsc);
-#ifndef BURN_BRIDGES
-static void fxp_powerstate_d0(device_t dev);
-#endif
static void fxp_start(struct ifnet *ifp);
static void fxp_start_body(struct ifnet *ifp);
static void fxp_stop(struct fxp_softc *sc);
@@ -350,34 +347,6 @@ fxp_probe(device_t dev)
return (ENXIO);
}
-#ifndef BURN_BRIDGES
-static void
-fxp_powerstate_d0(device_t dev)
-{
-#if __FreeBSD_version >= 430002
- u_int32_t iobase, membase, irq;
-
- if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) {
- /* Save important PCI config data. */
- iobase = pci_read_config(dev, FXP_PCI_IOBA, 4);
- membase = pci_read_config(dev, FXP_PCI_MMBA, 4);
- irq = pci_read_config(dev, PCIR_INTLINE, 4);
-
- /* Reset the power state. */
- device_printf(dev, "chip is in D%d power mode "
- "-- setting to D0\n", pci_get_powerstate(dev));
-
- pci_set_powerstate(dev, PCI_POWERSTATE_D0);
-
- /* Restore PCI config data. */
- pci_write_config(dev, FXP_PCI_IOBA, iobase, 4);
- pci_write_config(dev, FXP_PCI_MMBA, membase, 4);
- pci_write_config(dev, PCIR_INTLINE, irq, 4);
- }
-#endif
-}
-#endif
-
static void
fxp_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error)
{
@@ -417,9 +386,7 @@ fxp_attach(device_t dev)
*/
pci_enable_busmaster(dev);
val = pci_read_config(dev, PCIR_COMMAND, 2);
-#ifndef BURN_BRIDGES
- fxp_powerstate_d0(dev);
-#endif
+
/*
* Figure out which we should try first - memory mapping or i/o mapping?
* We default to memory mapping. Then we accept an override from the
@@ -1023,9 +990,7 @@ fxp_resume(device_t dev)
FXP_LOCK(sc);
s = splimp();
-#ifndef BURN_BRIDGES
- fxp_powerstate_d0(dev);
-#endif
+
/* better way to do this? */
for (i = 0; i < 5; i++)
pci_write_config(dev, PCIR_BAR(i), sc->saved_maps[i], 4);
diff --git a/sys/dev/lge/if_lge.c b/sys/dev/lge/if_lge.c
index 09e677b..16a702a 100644
--- a/sys/dev/lge/if_lge.c
+++ b/sys/dev/lge/if_lge.c
@@ -473,30 +473,6 @@ lge_attach(dev)
sc = device_get_softc(dev);
unit = device_get_unit(dev);
bzero(sc, sizeof(struct lge_softc));
-#ifndef BURN_BRIDGES
- /*
- * Handle power management nonsense.
- */
- if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) {
- u_int32_t iobase, membase, irq;
-
- /* Save important PCI config data. */
- iobase = pci_read_config(dev, LGE_PCI_LOIO, 4);
- membase = pci_read_config(dev, LGE_PCI_LOMEM, 4);
- irq = pci_read_config(dev, LGE_PCI_INTLINE, 4);
-
- /* Reset the power state. */
- printf("lge%d: chip is in D%d power mode "
- "-- setting to D0\n", unit,
- pci_get_powerstate(dev));
- pci_set_powerstate(dev, PCI_POWERSTATE_D0);
-
- /* Restore PCI config data. */
- pci_write_config(dev, LGE_PCI_LOIO, iobase, 4);
- pci_write_config(dev, LGE_PCI_LOMEM, membase, 4);
- pci_write_config(dev, LGE_PCI_INTLINE, irq, 4);
- }
-#endif
/*
* Map control/status registers.
*/
diff --git a/sys/dev/nge/if_nge.c b/sys/dev/nge/if_nge.c
index a8e0176..798702c 100644
--- a/sys/dev/nge/if_nge.c
+++ b/sys/dev/nge/if_nge.c
@@ -806,30 +806,6 @@ nge_attach(dev)
mtx_init(&sc->nge_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
MTX_DEF | MTX_RECURSE);
-#ifndef BURN_BRIDGES
- /*
- * Handle power management nonsense.
- */
- if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) {
- u_int32_t iobase, membase, irq;
-
- /* Save important PCI config data. */
- iobase = pci_read_config(dev, NGE_PCI_LOIO, 4);
- membase = pci_read_config(dev, NGE_PCI_LOMEM, 4);
- irq = pci_read_config(dev, NGE_PCI_INTLINE, 4);
-
- /* Reset the power state. */
- printf("nge%d: chip is in D%d power mode "
- "-- setting to D0\n", unit,
- pci_get_powerstate(dev));
- pci_set_powerstate(dev, PCI_POWERSTATE_D0);
-
- /* Restore PCI config data. */
- pci_write_config(dev, NGE_PCI_LOIO, iobase, 4);
- pci_write_config(dev, NGE_PCI_LOMEM, membase, 4);
- pci_write_config(dev, NGE_PCI_INTLINE, irq, 4);
- }
-#endif
/*
* Map control/status registers.
*/
diff --git a/sys/dev/txp/if_txp.c b/sys/dev/txp/if_txp.c
index 22fdecd..976b0f2 100644
--- a/sys/dev/txp/if_txp.c
+++ b/sys/dev/txp/if_txp.c
@@ -227,29 +227,6 @@ txp_attach(dev)
mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK,
MTX_DEF | MTX_RECURSE);
-#ifndef BURN_BRIDGES
- /*
- * Handle power management nonsense.
- */
- if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) {
- u_int32_t iobase, membase, irq;
-
- /* Save important PCI config data. */
- iobase = pci_read_config(dev, TXP_PCI_LOIO, 4);
- membase = pci_read_config(dev, TXP_PCI_LOMEM, 4);
- irq = pci_read_config(dev, TXP_PCI_INTLINE, 4);
-
- /* Reset the power state. */
- device_printf(dev, "chip is in D%d power mode "
- "-- setting to D0\n", pci_get_powerstate(dev));
- pci_set_powerstate(dev, PCI_POWERSTATE_D0);
-
- /* Restore PCI config data. */
- pci_write_config(dev, TXP_PCI_LOIO, iobase, 4);
- pci_write_config(dev, TXP_PCI_LOMEM, membase, 4);
- pci_write_config(dev, TXP_PCI_INTLINE, irq, 4);
- }
-#endif
/*
* Map control/status registers.
*/
OpenPOWER on IntegriCloud