summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/re/if_re.c8
-rw-r--r--sys/pci/if_rl.c8
-rw-r--r--sys/pci/if_rlreg.h2
3 files changed, 18 insertions, 0 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c
index c28728f..84d925f 100644
--- a/sys/dev/re/if_re.c
+++ b/sys/dev/re/if_re.c
@@ -2420,19 +2420,23 @@ 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;
@@ -2448,13 +2452,16 @@ 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);
@@ -2466,6 +2473,7 @@ re_resume(dev)
/* reenable busmastering */
pci_enable_busmaster(dev);
pci_enable_io(dev, RL_RES);
+#endif
/* reinitialize interface if necessary */
if (ifp->if_flags & IFF_UP)
diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c
index 5f0d0d2..7e3bd56 100644
--- a/sys/pci/if_rl.c
+++ b/sys/pci/if_rl.c
@@ -1916,19 +1916,23 @@ static int
rl_suspend(dev)
device_t dev;
{
+#ifndef BURN_BRIDGES
register int i;
+#endif
struct rl_softc *sc;
sc = device_get_softc(dev);
rl_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;
@@ -1944,13 +1948,16 @@ static int
rl_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);
@@ -1962,6 +1969,7 @@ rl_resume(dev)
/* reenable busmastering */
pci_enable_busmaster(dev);
pci_enable_io(dev, RL_RES);
+#endif
/* reinitialize interface if necessary */
if (ifp->if_flags & IFF_UP)
diff --git a/sys/pci/if_rlreg.h b/sys/pci/if_rlreg.h
index 8bf6ada..4603524 100644
--- a/sys/pci/if_rlreg.h
+++ b/sys/pci/if_rlreg.h
@@ -683,11 +683,13 @@ struct rl_softc {
int rxcycles;
#endif
+#ifndef BURN_BRIDGES
u_int32_t saved_maps[5]; /* pci data */
u_int32_t saved_biosaddr;
u_int8_t saved_intline;
u_int8_t saved_cachelnsz;
u_int8_t saved_lattimer;
+#endif
};
#define RL_LOCK(_sc) mtx_lock(&(_sc)->rl_mtx)
OpenPOWER on IntegriCloud