From: Malcolm Priestley Date: Tue, 22 Oct 2013 19:00:22 +0000 (+0100) Subject: staging: vt6656: call usb_device_reset before netdev registration X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2467635ee3b6f50131caa1b80b2d116eaf5ce938;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: vt6656: call usb_device_reset before netdev registration The USB reset occurs after netdev registration if network manager calls device_open too fast causing USB fails in main_usb.c: device_init_registers. Move the usb reset to before register_netdev. Signed-off-by: Malcolm Priestley Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 5e4a5d0988d7..aae228c533ef 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -723,14 +723,15 @@ vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id) usb_set_intfdata(intf, pDevice); SET_NETDEV_DEV(netdev, &intf->dev); memcpy(pDevice->dev->dev_addr, fake_mac, ETH_ALEN); + + usb_device_reset(pDevice); + rc = register_netdev(netdev); if (rc) { printk(KERN_ERR DEVICE_NAME " Failed to register netdev\n"); goto err_netdev; } - usb_device_reset(pDevice); - return 0; err_netdev: