summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_sis.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-01-06 23:13:50 +0000
committerphk <phk@FreeBSD.org>2005-01-06 23:13:50 +0000
commit962238ddac8a4ea021a17ba0987a1aeac36ceb2d (patch)
tree8f49a824b9cdddbb96902a1f2ea00ac84e365361 /sys/pci/if_sis.c
parent8d58b9df12c91ca0ca53c8b0332657873656e436 (diff)
downloadFreeBSD-src-962238ddac8a4ea021a17ba0987a1aeac36ceb2d.zip
FreeBSD-src-962238ddac8a4ea021a17ba0987a1aeac36ceb2d.tar.gz
Close a theoretical race: By the time the watchdog comes around
the interface may have been stopped, so we should not restart it.
Diffstat (limited to 'sys/pci/if_sis.c')
-rw-r--r--sys/pci/if_sis.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c
index a933173..e257db3 100644
--- a/sys/pci/if_sis.c
+++ b/sys/pci/if_sis.c
@@ -2235,11 +2235,15 @@ sis_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
static void
sis_watchdog(struct ifnet *ifp)
{
- struct sis_softc *sc;
+ struct sis_softc *sc;
sc = ifp->if_softc;
SIS_LOCK(sc);
+ if (sc->sis_stopped) {
+ SIS_UNLOCK(sc);
+ return;
+ }
ifp->if_oerrors++;
printf("sis%d: watchdog timeout\n", sc->sis_unit);
OpenPOWER on IntegriCloud