Subject: Ethernet MII still negotiating status?

From: Phillip Susi <[email-masked]>
Date: Wed, 2 Dec 2015 22:08:28 -0500

I'm looking into a problem with the mediatomb package not starting up
correctly on recent Ubuntu releases, and I see that the problem is
that the service depends on a network up event generated by
network-manager to start.  While it actually depends on eth0 being up,
n-m decides that "networking" is up as soon as it sees no interfaces
that have a phy link need more work done ( which seems to mean still
negotiating a DHCP lease ), and so it tends to declare that networking
is "up" as soon as lo is configured, because eth0's phy status is down.

This seems to be pulled from the MII info for the link, which as far
as I can see, only indicates up/down, rather than any sort of state
like "something seems to be there, give me a second to negotiate the
LLC" or "I don't know yet, give me a second".  For my e1000e, this
negotiation seems to take about 10 seconds, by which time n-m has
decided that all interfaces that are plugged in are configured so
networking is "up".

Is there no way for an ethernet adapter to indicate that it does not
yet know for sure that it is not plugged in, and is still trying to
negotiate a link ( and thus user space should wait a second instead of
concluding that everything that is plugged and therefore likely to
ever come up in is configured )?