From: jiang.biao2@zte.com.cn
Date: Thu, 2 Jan 2014 16:53:17 +0800
quoted
You cannot do this, because at the very exact moment you call
register_netdevice() the device can be brought up and once the
device is up the link can be brought up.
quoted
Therefore if you invoke netif_carrier_off() right after
register_netdevice(), it can cancel out a legitimate
netif_carrier_on() call.
register_netdevice() should be call in probe(), at that time, is
it impossible to bring up device because the driver loading has
not finished?
Scripts in userspace listen for device events, such as registry, and
in response can immediately open the device.
That can occur before register_netdevice() returns, it is completely
and %100 asynchronous.