svn commit: r217247 - head/sys/dev/re
Pyun YongHyeon
yongari at FreeBSD.org
Mon Jan 10 23:47:11 UTC 2011
Author: yongari
Date: Mon Jan 10 23:47:11 2011
New Revision: 217247
URL: http://svn.freebsd.org/changeset/base/217247
Log:
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.
Modified:
head/sys/dev/re/if_re.c
Modified: head/sys/dev/re/if_re.c
==============================================================================
--- head/sys/dev/re/if_re.c Mon Jan 10 23:28:46 2011 (r217246)
+++ head/sys/dev/re/if_re.c Mon Jan 10 23:47:11 2011 (r217247)
@@ -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",
More information about the svn-src-head
mailing list