Files
linux/drivers/usb/gadget
Kevin Cernekee f58f16f203 usb: gadget: Fix g_ether interface link status
commit 31bde1ceaa upstream.

A "usb0" interface that has never been connected to a host has an unknown
operstate, and therefore the IFF_RUNNING flag is (incorrectly) asserted
when queried by ifconfig, ifplugd, etc.  This is a result of calling
netif_carrier_off() too early in the probe function; it should be called
after register_netdev().

Similar problems have been fixed in many other drivers, e.g.:

    e826eafa6 (bonding: Call netif_carrier_off after register_netdevice)
    0d672e9f8 (drivers/net: Call netif_carrier_off at the end of the probe)
    6a3c869a6 (cxgb4: fix reported state of interfaces without link)

Fix is to move netif_carrier_off() to the end of the function.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-09 08:27:35 -07:00
..
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-04-13 16:41:00 -07:00
2011-03-31 11:26:23 -03:00
2011-05-20 12:50:29 -07:00
2011-05-20 12:50:29 -07:00
2011-03-31 11:26:23 -03:00
2011-06-06 16:28:02 -07:00
2010-12-10 14:29:43 -08:00
2011-03-31 11:26:23 -03:00
2011-05-20 12:50:29 -07:00
2011-05-20 12:50:29 -07:00
2010-09-03 17:33:40 -07:00
2011-06-06 16:28:03 -07:00
2010-12-10 14:29:43 -08:00