summaryrefslogtreecommitdiffstats
path: root/sys/dev/vge
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/vge')
-rw-r--r--sys/dev/vge/if_vge.c14
-rw-r--r--sys/dev/vge/if_vgevar.h3
2 files changed, 6 insertions, 11 deletions
diff --git a/sys/dev/vge/if_vge.c b/sys/dev/vge/if_vge.c
index be785c1..d581357 100644
--- a/sys/dev/vge/if_vge.c
+++ b/sys/dev/vge/if_vge.c
@@ -1728,15 +1728,11 @@ vge_intr(void *arg)
uint32_t status;
sc = arg;
-
- if (sc->suspended) {
- return;
- }
-
VGE_LOCK(sc);
- ifp = sc->vge_ifp;
- if (!(ifp->if_flags & IFF_UP)) {
+ ifp = sc->vge_ifp;
+ if ((sc->vge_flags & VGE_FLAG_SUSPENDED) != 0 ||
+ (ifp->if_flags & IFF_UP) == 0) {
VGE_UNLOCK(sc);
return;
}
@@ -2430,7 +2426,7 @@ vge_suspend(device_t dev)
VGE_LOCK(sc);
vge_stop(sc);
- sc->suspended = 1;
+ sc->vge_flags |= VGE_FLAG_SUSPENDED;
VGE_UNLOCK(sc);
return (0);
@@ -2460,7 +2456,7 @@ vge_resume(device_t dev)
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
vge_init_locked(sc);
}
- sc->suspended = 0;
+ sc->vge_flags &= ~VGE_FLAG_SUSPENDED;
VGE_UNLOCK(sc);
return (0);
diff --git a/sys/dev/vge/if_vgevar.h b/sys/dev/vge/if_vgevar.h
index f622250..105dd72 100644
--- a/sys/dev/vge/if_vgevar.h
+++ b/sys/dev/vge/if_vgevar.h
@@ -179,6 +179,7 @@ struct vge_softc {
int vge_flags;
#define VGE_FLAG_PCIE 0x0001
#define VGE_FLAG_MSI 0x0002
+#define VGE_FLAG_SUSPENDED 0x4000
#define VGE_FLAG_LINK 0x8000
int vge_expcap;
int vge_camidx;
@@ -189,8 +190,6 @@ struct vge_softc {
struct vge_chain_data vge_cdata;
struct vge_ring_data vge_rdata;
struct vge_hw_stats vge_stats;
-
- int suspended; /* 0 = normal 1 = suspended */
};
#define VGE_LOCK(_sc) mtx_lock(&(_sc)->vge_mtx)
OpenPOWER on IntegriCloud