diff options
author | yongari <yongari@FreeBSD.org> | 2011-01-10 23:47:11 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2011-01-10 23:47:11 +0000 |
commit | 1d1ef54a742aacb2b7a401e82aea2afbe218db8a (patch) | |
tree | d35ec53e18d63904254c99582623a2b75997060c /sys | |
parent | eddf4ff0094898fc3322a2f40652ad8d20d8b85b (diff) | |
download | FreeBSD-src-1d1ef54a742aacb2b7a401e82aea2afbe218db8a.zip FreeBSD-src-1d1ef54a742aacb2b7a401e82aea2afbe218db8a.tar.gz |
When driver is not running, do not send DUMP command to controller
and just show old (cached) values. Controller will not respond to
the command unless MAC is enabled so DUMP request for down
interface caused request timeout.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/re/if_re.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index e1cf2b0..13e3514 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -3278,6 +3278,10 @@ re_sysctl_stats(SYSCTL_HANDLER_ARGS) if (result == 1) { sc = (struct rl_softc *)arg1; RL_LOCK(sc); + if ((sc->rl_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { + RL_UNLOCK(sc); + goto done; + } bus_dmamap_sync(sc->rl_ldata.rl_stag, sc->rl_ldata.rl_smap, BUS_DMASYNC_PREREAD); CSR_WRITE_4(sc, RL_DUMPSTATS_HI, @@ -3301,6 +3305,7 @@ re_sysctl_stats(SYSCTL_HANDLER_ARGS) "DUMP statistics request timedout\n"); return (ETIMEDOUT); } +done: stats = sc->rl_ldata.rl_stats; printf("%s statistics:\n", device_get_nameunit(sc->rl_dev)); printf("Tx frames : %ju\n", |