svn commit: r233158 - head/sys/dev/fxp
Pyun YongHyeon
yongari at FreeBSD.org
Mon Mar 19 02:10:41 UTC 2012
Author: yongari
Date: Mon Mar 19 02:10:40 2012
New Revision: 233158
URL: http://svn.freebsd.org/changeset/base/233158
Log:
Do not change current media when driver is already running. If
driver is running driver would have already completed flow control
configuration. This change removes unnecessary media changes in
controller reconfiguration cases such that it does not trigger link
reestablishment for configuration change requests like promiscuous
mode change.
Reported by: Many
Tested by: Mike Tancsa <mike <> sentex dot net>
MFC after: 1 week
Modified:
head/sys/dev/fxp/if_fxp.c
Modified: head/sys/dev/fxp/if_fxp.c
==============================================================================
--- head/sys/dev/fxp/if_fxp.c Mon Mar 19 01:57:14 2012 (r233157)
+++ head/sys/dev/fxp/if_fxp.c Mon Mar 19 02:10:40 2012 (r233158)
@@ -902,7 +902,7 @@ fxp_attach(device_t dev)
FXP_LOCK(sc);
/* Clear wakeup events. */
CSR_WRITE_1(sc, FXP_CSR_PMDR, CSR_READ_1(sc, FXP_CSR_PMDR));
- fxp_init_body(sc, 1);
+ fxp_init_body(sc, 0);
fxp_stop(sc);
FXP_UNLOCK(sc);
}
@@ -2810,7 +2810,7 @@ fxp_ioctl(struct ifnet *ifp, u_long comm
if (((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) &&
((ifp->if_flags ^ sc->if_flags) &
(IFF_PROMISC | IFF_ALLMULTI | IFF_LINK0)) != 0)
- fxp_init_body(sc, 1);
+ fxp_init_body(sc, 0);
else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
fxp_init_body(sc, 1);
} else {
@@ -2916,7 +2916,7 @@ fxp_ioctl(struct ifnet *ifp, u_long comm
reinit++;
}
if (reinit > 0 && ifp->if_flags & IFF_UP)
- fxp_init_body(sc, 1);
+ fxp_init_body(sc, 0);
FXP_UNLOCK(sc);
VLAN_CAPABILITIES(ifp);
break;
More information about the svn-src-head
mailing list