Hi, Pavel asked me to look into whether we needed to keep around the MII code we've got in nm-device-ethernet.c. The short answer is: we do not, and we can rely solely on ETHTOOL_GLINK for carrier detection awareness.
Most network drivers support carrier detection, some older ones do not. For drivers that do not support carrier detection, NM assumes the carrier is always on. But as the kernel doesn't expose a consistent flag to indicate that a driver supports carrier detection (and thus indicating that NM should listen for carrier change events), NetworkManager checked driver support for both ETHTOOL_GLINK and SIOCGMIIREG/MII_BMSR. Success in either of these requests indicated the driver supported link detection of some kind. It turns out the drivers that don't implement the ETHTOOL_GLINK request, but do support SIOCGMIIREG, don't support carrier detection indications via netif_carrier_on/netif_carrier_off(), which is how NetworkManager detects link changes. Furthermore, most of the drivers that don't are very old and no longer widely used. Dan The following list are drivers that support some kind of MII operations, but do not implement ETHTOOL_GLINK. ---- 3com/3c574_cs.c (PCMCIA, 1999, no link detection) 8390/axnet_cs.c (PCMCIA, 2001, no link detection) 8390/pcnet_cs.c (PCMCIA, 1999, no link detection) broadcom/bgmac.c (embedded, 2012, no link detection) ethoc.c (OpenCores, 2009, no link detection) icplus/ipg.c (IP1000 GE, 2003/2007, no link detection) netx-eth.c (embedded, 2005, no link detection) packetengines/yellowfin.c (2001, no link detection via netlink) sgi/meth.c (2003, no link detection via netlink) ti/tlan.c (EISA, 2002, no link detection via netlink) xircom/xirc2ps_cs.c (PCMCIA, no link detection) _______________________________________________ networkmanager-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/networkmanager-list
