Searched hist:140913 (Results 1 - 1 of 1) sorted by relevance

/freebsd-10.1-release/sbin/ifconfig/
H A Difmedia.cdiff 140913 Thu Jan 27 14:40:12 MST 2005 ambrisko Change the ifr_media operation to only get its value and only set
its value once per ifconfig run. Use Sam's new callback
operation to set it when everything is done.

The purpose for this is that if you did something like
ifconfig bge0 media 100baseTX mediaopt full-duplex
multiple times it would end up causing the PHY to re-sync
since it would send the IOCTLs:
ifconfig bge0 media 100baseTX -mediaopt full-duplex
ifconfig bge0 media 100baseTX mediaopt full-duplex
This would cause the PHY to be updated twice even though
there really wasn't any change since the check in
sys/net/if_media.c would always fail.

Caveat is that this doesn't fix the case of:
ifconfig bge0 media autoselect
etc. since in sys/net/if_media.c it forces an autoselect to go through
the entire process in ifmedia_ioctl :-( :
/*
* If no change, we're done.
* XXX Automedia may invole software intervention.
* Keep going in case the the connected media changed.
* Similarly, if best match changed (kernel debugger?).
*/
if ((IFM_SUBTYPE(newmedia) != IFM_AUTO) &&
(newmedia == ifm->ifm_media) &&
(match == ifm->ifm_cur))
return 0;

Briefly looked at by: sam

Completed in 100 milliseconds