GNOME Bugzilla – Bug 766179
NM wrongly determines carrier detection capability with some ethernet drivers
Last modified: 2016-05-12 10:10:13 UTC
Some ethernet drivers return -EBUSY to the GLINK ethtool request if the interface is not brought up before. For example, using the stmmac driver, NM reports: <info> (eth0): driver 'stmmaceth' does not support carrier detection because support for the capability is detected during realize_start_setup() when the interface is still down.
Created attachment 327527 [details] [review] bring up interface before getting capabilities
The problem is also described here http://billauer.co.il/blog/2014/01/networkmanager-carrier-detect/ but I encountered the same issue on a different SoC using the same ethernet driver. The attachment shows my current workaround.
(In reply to Carlo Caione from comment #1) > Created attachment 327527 [details] [review] [review] > bring up interface before getting capabilities I think, a better fix is to re-fetch the capabilies after the device is up. This patch -- aside not being for master, where device-construction works different -- already brings the device in the constructor up. That think that is not intended. How about https://cgit.freedesktop.org/NetworkManager/NetworkManager/log/?h=th/device-carrier-cap-bgo766179 ?
(In reply to Thomas Haller from comment #3) > How about > https://cgit.freedesktop.org/NetworkManager/NetworkManager/log/?h=th/device- > carrier-cap-bgo766179 ? In realize_start_setup() we subscribe to NM_CONFIG_SIGNAL_CONFIG_CHANGED if the device supports carrier detection. If the capability is discovered later in bring_up(), I think we should still subscribe to signal if not done before.
merged to master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=eede9a7c78dd6234c86051932693e284711279d0