Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/dev/mii



Module Name:    src
Committed By:   msaitoh
Date:           Mon May 22 02:12:13 UTC 2023

Modified Files:
        src/sys/dev/mii: mii_physubr.c

Log Message:
Fix a bug when a media is changed to IFM_AUTO.

 Fix a bug that ifconfig ifN media auto doesn't change the setting when
the previous media setting used autonego. When the mii_phy_setmedia()
function is called to change the media to IFM_AUTO, the BMCR_AUTOEN bit was
used to check if the previous setting was IFM_AUTO. It's not correct.
IFM_1000_T also uses autonego. So if a previous setting is IFM_1000_T and
the next setting is IFM_AUTO, mii_phy_auto() is not called if neither
MIIF_FORCEANEG nor MIIF_DOPAUSE are set. As a result, after changing
IFM_AUTO, neither 10Mbps nor 100Mbps are not advertised.

Note that almost all drivers uses MIIF_DOPAUSE flags.

TODO: cleanup ciphy.c and rgephy.c. Those have #ifdef foo.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/dev/mii/mii_physubr.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index