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-06-06 16:27:00 -07:00
2011-03-31 11:26:23 -03:00
2011-06-06 16:27:00 -07:00
2010-07-18 20:39:10 +01:00
2011-05-18 23:24:50 +02:00
2010-10-22 10:21:26 -07:00
2010-10-22 10:21:26 -07:00
2010-12-10 14:23:34 -08:00
2010-12-10 14:23:33 -08:00
2011-05-06 18:27:48 -07:00
2011-02-25 11:33:57 -08:00
2011-05-10 14:14:57 -07:00
2010-05-20 13:21:43 -07:00
2011-04-29 17:24:30 -07:00
2011-06-07 09:05:43 -07:00
2011-02-04 11:42:52 -08:00
2010-10-22 10:21:26 -07:00
2010-10-22 10:21:35 -07:00
2011-05-17 11:20:24 -07:00
2010-05-20 13:21:43 -07:00
2011-04-13 15:44:01 -07:00
2012-04-27 09:51:08 -07:00
2010-11-17 08:59:32 -08:00
2012-02-13 11:06:12 -08:00
2012-05-07 08:56:36 -07:00
2011-03-31 11:26:23 -03:00
2010-03-30 22:02:32 +09:00
2011-02-28 12:36:39 -08:00
2011-05-13 15:51:09 -07:00
2010-03-30 22:02:32 +09:00
2010-10-22 10:21:26 -07:00
2010-03-30 22:02:32 +09:00
2010-08-02 16:43:15 -03:00
2010-08-02 16:43:15 -03:00
2012-05-07 08:56:36 -07:00
2011-02-04 11:42:52 -08:00
2011-05-18 12:32:23 -06:00
2011-04-13 16:41:00 -07:00
2012-06-01 15:12:58 +08:00
2011-05-02 16:59:38 -07:00
2011-02-17 10:47:55 -08:00
2011-01-22 19:45:36 -08:00
2010-11-17 13:24:46 -08:00
2011-05-10 14:16:55 -07:00
2011-03-31 11:26:23 -03:00
2011-05-20 12:50:29 -07:00
2010-11-11 06:57:24 -08:00
2012-04-02 09:26:53 -07:00
2011-05-20 12:50:29 -07:00
2010-11-11 05:51:15 -08:00
2012-04-02 09:26:52 -07:00
2012-04-22 16:21:43 -07:00
2011-03-31 11:26:23 -03:00
2010-10-22 10:21:19 -07:00
2011-02-25 11:33:00 -08:00
2010-06-02 16:26:13 +09:00
2011-05-10 14:16:55 -07:00
2010-11-11 05:58:49 -08:00
2010-10-22 10:21:26 -07:00
2011-06-06 16:28:02 -07:00
2010-11-30 16:51:21 -08:00
2010-11-30 16:51:21 -08:00
2010-12-10 14:29:43 -08:00
2011-06-06 16:27:00 -07:00
2011-03-31 11:26:23 -03:00
2011-05-20 12:50:29 -07:00
2012-04-22 16:21:43 -07:00
2011-11-11 09:35:36 -08:00
2011-06-06 16:28:03 -07:00
2011-05-20 12:50:29 -07:00
2010-05-20 13:21:36 -07:00
2011-04-13 15:44:00 -07:00
2010-10-22 10:21:34 -07:00
2010-10-24 13:41:39 -07:00
2010-09-03 17:33:40 -07:00
2011-06-06 16:27:00 -07:00
2011-06-06 16:26:59 -07:00
2011-06-06 16:28:03 -07:00
2010-10-22 10:21:26 -07:00
2011-04-29 17:24:36 -07:00
2010-12-03 12:05:35 -08:00
2012-08-09 08:27:35 -07:00
2010-12-10 14:29:43 -08:00
2010-11-11 07:03:48 -08:00
2010-07-11 17:45:10 -03:00
2010-07-11 17:45:10 -03:00
2012-05-07 08:56:36 -07:00
2010-07-11 17:45:10 -03:00
2012-05-07 08:56:36 -07:00
2010-10-22 10:21:26 -07:00
2010-10-22 10:21:25 -07:00