diff options
author | imp <imp@FreeBSD.org> | 2003-07-03 14:00:57 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2003-07-03 14:00:57 +0000 |
commit | e9df6b7a142eb6576de449a7025b728f30224161 (patch) | |
tree | 584c5d95c565a7220199ac4f80f117d25995ead7 /sys/dev/fxp | |
parent | 2d545c0325ebd6225a22298a5cffc0570a56fb16 (diff) | |
download | FreeBSD-src-e9df6b7a142eb6576de449a7025b728f30224161.zip FreeBSD-src-e9df6b7a142eb6576de449a7025b728f30224161.tar.gz |
All current uses of pci_set_powerstate are bogus, at least in theory.
However, they are presently necessary due to bigger bogusness in the
pci bus layer not doing the right thing on suspend/resume or on
initial device probe. This is exactly the sort of thing that the
BURN_BRIDGES option was invented for. Mark all of them as
BURN_BRIDGES. As soon as I have the powerstate stuff properly
integrated into the pci bus code, I intend to remove all these
workarounds.
Diffstat (limited to 'sys/dev/fxp')
-rw-r--r-- | sys/dev/fxp/if_fxp.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 69bb5de..3026662 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -193,7 +193,9 @@ 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); @@ -335,6 +337,7 @@ fxp_probe(device_t dev) return (ENXIO); } +#ifndef BURN_BRIDGES static void fxp_powerstate_d0(device_t dev) { @@ -360,6 +363,7 @@ fxp_powerstate_d0(device_t dev) } #endif } +#endif static void fxp_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error) @@ -401,9 +405,9 @@ 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 @@ -999,9 +1003,9 @@ 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_MAPS + i * 4, sc->saved_maps[i], 4); |