summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/f_mass_storage.c
diff options
context:
space:
mode:
authorKevin Cernekee <cernekee@gmail.com>2012-06-24 21:11:22 -0700
committerFelipe Balbi <balbi@ti.com>2012-06-25 14:14:42 +0300
commit31bde1ceaa873bcaecd49e829bfabceacc4c512d (patch)
tree966465924ccc16cb5c774dd3551413a9acdda4d9 /drivers/usb/gadget/f_mass_storage.c
parenta188b6897e3dca82dd6f5beceabf1fc62b9786d9 (diff)
downloadop-kernel-dev-31bde1ceaa873bcaecd49e829bfabceacc4c512d.zip
op-kernel-dev-31bde1ceaa873bcaecd49e829bfabceacc4c512d.tar.gz
usb: gadget: Fix g_ether interface link status
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. Cc: stable@vger.kernel.org Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/f_mass_storage.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud