diff options
author | imp <imp@FreeBSD.org> | 2004-06-28 20:09:02 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2004-06-28 20:09:02 +0000 |
commit | dc0d070947944ef9cf45f4ee922c982e0b8423ff (patch) | |
tree | a0b479c37d04772ac5e9062e35909371eac1bc2d /sys/dev/re | |
parent | d622075765e20a065215f188a0906c9394e7113c (diff) | |
download | FreeBSD-src-dc0d070947944ef9cf45f4ee922c982e0b8423ff.zip FreeBSD-src-dc0d070947944ef9cf45f4ee922c982e0b8423ff.tar.gz |
Remove code to slam the config space on transition to d0.
Diffstat (limited to 'sys/dev/re')
-rw-r--r-- | sys/dev/re/if_re.c | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index e1e2de3..3a564bd 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -1078,32 +1078,6 @@ re_attach(dev) mtx_init(&sc->rl_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, RL_PCI_LOIO, 4); - membase = pci_read_config(dev, RL_PCI_LOMEM, 4); - irq = pci_read_config(dev, RL_PCI_INTLINE, 4); - - /* Reset the power state. */ - printf("re%d: chip is 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, RL_PCI_LOIO, iobase, 4); - pci_write_config(dev, RL_PCI_LOMEM, membase, 4); - pci_write_config(dev, RL_PCI_INTLINE, irq, 4); - } -#endif /* * Map control/status registers. */ @@ -2394,24 +2368,11 @@ static int re_suspend(dev) device_t dev; { -#ifndef BURN_BRIDGES - register int i; -#endif struct rl_softc *sc; sc = device_get_softc(dev); re_stop(sc); - -#ifndef BURN_BRIDGES - for (i = 0; i < 5; i++) - sc->saved_maps[i] = pci_read_config(dev, PCIR_MAPS + i * 4, 4); - sc->saved_biosaddr = pci_read_config(dev, PCIR_BIOS, 4); - sc->saved_intline = pci_read_config(dev, PCIR_INTLINE, 1); - sc->saved_cachelnsz = pci_read_config(dev, PCIR_CACHELNSZ, 1); - sc->saved_lattimer = pci_read_config(dev, PCIR_LATTIMER, 1); -#endif - sc->suspended = 1; return (0); @@ -2426,29 +2387,12 @@ static int re_resume(dev) device_t dev; { -#ifndef BURN_BRIDGES - register int i; -#endif struct rl_softc *sc; struct ifnet *ifp; sc = device_get_softc(dev); ifp = &sc->arpcom.ac_if; -#ifndef BURN_BRIDGES - /* better way to do this? */ - for (i = 0; i < 5; i++) - pci_write_config(dev, PCIR_MAPS + i * 4, sc->saved_maps[i], 4); - pci_write_config(dev, PCIR_BIOS, sc->saved_biosaddr, 4); - pci_write_config(dev, PCIR_INTLINE, sc->saved_intline, 1); - pci_write_config(dev, PCIR_CACHELNSZ, sc->saved_cachelnsz, 1); - pci_write_config(dev, PCIR_LATTIMER, sc->saved_lattimer, 1); - - /* reenable busmastering */ - pci_enable_busmaster(dev); - pci_enable_io(dev, RL_RES); -#endif - /* reinitialize interface if necessary */ if (ifp->if_flags & IFF_UP) re_init(sc); |