mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
USB: u_ether: Prevent unclocked access when running rndis interface down
When in rndis composition, if device is disabled in device manager, usb enters low power mode. Then if rndis interface is put down, ep_disable is called leading to crash due to unclocked access as clocks are turned off when usb enters lpm. Fix this by waking up the controller, then performing ep_disable operation and then putting controller back to lpm. Change-Id: I45d29ef2e2678a3d6383d3fdd5550c8b8e156875 Signed-off-by: Rohith Kollalsi <rkollals@codeaurora.org>
This commit is contained in:
parent
7b0acdb1b0
commit
da0ce57aed
1 changed files with 3 additions and 0 deletions
|
|
@ -650,6 +650,8 @@ static int eth_stop(struct net_device *net)
|
|||
dev->net->stats.rx_errors, dev->net->stats.tx_errors
|
||||
);
|
||||
|
||||
usb_gadget_autopm_get(dev->gadget);
|
||||
|
||||
/* ensure there are no more active requests */
|
||||
spin_lock_irqsave(&dev->lock, flags);
|
||||
if (dev->port_usb) {
|
||||
|
|
@ -682,6 +684,7 @@ static int eth_stop(struct net_device *net)
|
|||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&dev->lock, flags);
|
||||
usb_gadget_autopm_put_async(dev->gadget);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue