summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp
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/dev/fxp
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/dev/fxp')
-rw-r--r--sys/dev/fxp/if_fxp.c39
1 files changed, 2 insertions, 37 deletions
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);
OpenPOWER on IntegriCloud