3fcb7a5365
(reporting IFM_LOOP based on BMCR_LOOP is left in place though as it might provide useful for debugging). For most mii(4) drivers it was unclear whether the PHYs driven by them actually support loopback or not. Moreover, typically loopback mode also needs to be activated on the MAC, which none of the Ethernet drivers using mii(4) implements. Given that loopback media has no real use (and obviously hardly had a chance to actually work) besides for driver development (which just loopback mode should be sufficient for though, i.e one doesn't necessary need support for loopback media) support for it is just dropped as both NetBSD and OpenBSD already did quite some time ago. - Let mii_phy_add_media() also announce the support of IFM_NONE. - Restructure the PHY entry points to use a structure of entry points instead of discrete function pointers, and extend this to include a "reset" entry point. Make sure any PHY-specific reset routine is always used, and provide one for lxtphy(4) which disables MII interrupts (as is done for a few other PHYs we have drivers for). This includes changing NIC drivers which previously just called the generic mii_phy_reset() to now actually call the PHY-specific reset routine, which might be crucial in some cases. While at it, the redundant checks in these NIC drivers for mii->mii_instance not being zero before calling the reset routines were removed because as soon as one PHY driver attaches mii->mii_instance is incremented and we hardly can end up in their media change callbacks etc if no PHY driver has attached as mii_attach() would have failed in that case and not attach a miibus(4) instance. Consequently, NIC drivers now no longer should call mii_phy_reset() directly, so it was removed from EXPORT_SYMS. - Add a mii_phy_dev_attach() as a companion helper to mii_phy_dev_probe(). The purpose of that function is to perform the common steps to attach a PHY driver instance and to hook it up to the miibus(4) instance and to optionally also handle the probing, addition and initialization of the supported media. So all a PHY driver without any special requirements has to do in its bus attach method is to call mii_phy_dev_attach() along with PHY-specific MIIF_* flags, a pointer to its PHY functions and the add_media set to one. All PHY drivers were updated to take advantage of mii_phy_dev_attach() as appropriate. Along with these changes the capability mask was added to the mii_softc structure so PHY drivers taking advantage of mii_phy_dev_attach() but still handling media on their own do not need to fiddle with the MII attach arguments anyway. - Keep track of the PHY offset in the mii_softc structure. This is done for compatibility with NetBSD/OpenBSD. - Keep track of the PHY's OUI, model and revision in the mii_softc structure. Several PHY drivers require this information also after attaching and previously had to wrap their own softc around mii_softc. NetBSD/OpenBSD also keep track of the model and revision on their mii_softc structure. All PHY drivers were updated to take advantage as appropriate. - Convert the mebers of the MII data structure to unsigned where appropriate. This is partly inspired by NetBSD/OpenBSD. - According to IEEE 802.3-2002 the bits actually have to be reversed when mapping an OUI to the MII ID registers. All PHY drivers and miidevs where changed as necessary. Actually this now again allows to largely share miidevs with NetBSD, which fixed this problem already 9 years ago. Consequently miidevs was synced as far as possible. - Add MIIF_NOMANPAUSE and mii_phy_flowstatus() calls to drivers that weren't explicitly converted to support flow control before. It's unclear whether flow control actually works with these but typically it should and their net behavior should be more correct with these changes in place than without if the MAC driver sets MIIF_DOPAUSE. Obtained from: NetBSD (partially) Reviewed by: yongari (earlier version), silence on arch@ and net@ |
||
---|---|---|
.. | ||
3dfx | ||
3dfx_linux | ||
aac | ||
accf_data | ||
accf_dns | ||
accf_http | ||
acpi | ||
ae | ||
aesni | ||
age | ||
agp | ||
aha | ||
ahb | ||
ahci | ||
aic | ||
aic7xxx | ||
aio | ||
alc | ||
ale | ||
alq | ||
amd | ||
amdsbwd | ||
amdtemp | ||
amr | ||
an | ||
aout | ||
apm | ||
arcmsr | ||
arcnet | ||
asmc | ||
asr | ||
ata | ||
ath | ||
ath_ahb | ||
ath_pci | ||
auxio | ||
bce | ||
bfe | ||
bge | ||
bios | ||
bktr | ||
bm | ||
bridgestp | ||
bwi | ||
bwn | ||
bxe | ||
cam | ||
canbepm | ||
canbus | ||
cardbus | ||
cas | ||
cbb | ||
cc | ||
cd9660 | ||
cd9660_iconv | ||
ce | ||
ciss | ||
cm | ||
cmx | ||
coda | ||
coda5 | ||
coff | ||
coretemp | ||
cp | ||
cpuctl | ||
cpufreq | ||
crypto | ||
cryptodev | ||
cs | ||
ctau | ||
cx | ||
cxgb | ||
cxgbe | ||
cyclic | ||
dc | ||
dcons | ||
dcons_crom | ||
de | ||
digi | ||
dpms | ||
dpt | ||
drm | ||
dtrace | ||
dummynet | ||
ed | ||
elink | ||
em | ||
en | ||
ep | ||
epic | ||
esp | ||
et | ||
ex | ||
exca | ||
ext2fs | ||
fatm | ||
fdc | ||
fdescfs | ||
fe | ||
firewire | ||
firmware | ||
fxp | ||
gem | ||
geom | ||
glxsb | ||
hatm | ||
hifn | ||
hme | ||
hpfs | ||
hptiop | ||
hptmv | ||
hptrr | ||
hwpmc | ||
i2c | ||
ibcs2 | ||
ichwd | ||
ida | ||
ie | ||
if_bridge | ||
if_carp | ||
if_disc | ||
if_edsc | ||
if_ef | ||
if_epair | ||
if_faith | ||
if_gif | ||
if_gre | ||
if_lagg | ||
if_ndis | ||
if_stf | ||
if_tap | ||
if_tun | ||
if_vlan | ||
igb | ||
iir | ||
io | ||
ip6_mroute_mod | ||
ip_mroute_mod | ||
ipdivert | ||
ipfilter | ||
ipfw | ||
ipfw_nat | ||
ipmi | ||
ips | ||
ipw | ||
ipwfw | ||
iscsi | ||
isp | ||
ispfw | ||
iwi | ||
iwifw | ||
iwn | ||
iwnfw | ||
ixgb | ||
ixgbe | ||
jme | ||
joy | ||
kbdmux | ||
kgssapi | ||
kgssapi_krb5 | ||
khelp | ||
krpc | ||
ksyms | ||
le | ||
lge | ||
libalias | ||
libiconv | ||
libmbpool | ||
libmchain | ||
lindev | ||
linprocfs | ||
linsysfs | ||
linux | ||
lmc | ||
lpt | ||
mac_biba | ||
mac_bsdextended | ||
mac_ifoff | ||
mac_lomac | ||
mac_mls | ||
mac_none | ||
mac_partition | ||
mac_portacl | ||
mac_seeotheruids | ||
mac_stub | ||
mac_test | ||
malo | ||
mcd | ||
md | ||
mem | ||
mfi | ||
mii | ||
mlx | ||
mlx4 | ||
mlx4ib | ||
mlxen | ||
mly | ||
mmc | ||
mmcsd | ||
mps | ||
mpt | ||
mqueue | ||
msdosfs | ||
msdosfs_iconv | ||
mse | ||
msk | ||
mthca | ||
mvs | ||
mwl | ||
mwlfw | ||
mxge | ||
my | ||
ncp | ||
ncv | ||
ndis | ||
netgraph | ||
nfe | ||
nfs_common | ||
nfscl | ||
nfsclient | ||
nfscommon | ||
nfsd | ||
nfslock | ||
nfslockd | ||
nfsserver | ||
nfssvc | ||
nge | ||
nmdm | ||
nsp | ||
ntfs | ||
ntfs_iconv | ||
nullfs | ||
nve | ||
nvram | ||
nwfs | ||
nxge | ||
opensolaris | ||
padlock | ||
patm | ||
pccard | ||
pcfclock | ||
pcn | ||
pf | ||
pflog | ||
plip | ||
pmc | ||
portalfs | ||
powermac_nvram | ||
ppbus | ||
ppc | ||
ppi | ||
pps | ||
procfs | ||
pseudofs | ||
pst | ||
pty | ||
puc | ||
ral | ||
ralfw | ||
random | ||
rc | ||
rc4 | ||
rdma | ||
re | ||
reiserfs | ||
rl | ||
rndtest | ||
rp | ||
runfw | ||
s3 | ||
safe | ||
sbni | ||
scc | ||
scd | ||
scsi_low | ||
sdhci | ||
sem | ||
send | ||
sf | ||
sge | ||
siba_bwn | ||
siftr | ||
siis | ||
sio | ||
sis | ||
sk | ||
smbfs | ||
sn | ||
snc | ||
snp | ||
sound | ||
speaker | ||
splash | ||
sppp | ||
ste | ||
stg | ||
stge | ||
streams | ||
svr4 | ||
sym | ||
syscons | ||
sysvipc | ||
ti | ||
tl | ||
tmpfs | ||
tpm | ||
trm | ||
twa | ||
twe | ||
tx | ||
txp | ||
uart | ||
ubsec | ||
ubser | ||
uchcom | ||
ucycom | ||
udf | ||
udf_iconv | ||
ufs | ||
unionfs | ||
usb | ||
utopia | ||
vesa | ||
vge | ||
vkbd | ||
vpo | ||
vr | ||
vte | ||
vx | ||
vxge | ||
wb | ||
wi | ||
wlan | ||
wlan_acl | ||
wlan_amrr | ||
wlan_ccmp | ||
wlan_rssadapt | ||
wlan_tkip | ||
wlan_wep | ||
wlan_xauth | ||
wpi | ||
wpifw | ||
x86bios | ||
xe | ||
xfs | ||
xl | ||
zfs | ||
zlib | ||
Makefile | ||
Makefile.inc |