net: usb: Fix premature auto suspend on Rx control path
RMNET QMI driver does not prevent auto suspend while submitting the URB on rx control path. This causes the usb device to go to low power mode after receiving QMI notification as the auto suspend timer does not get reset by the driver while submitting the URB and it expires. CRs-Fixed: 372251 Change-Id: Idb5c377c09d39ff53d4fac32599d6515ceb3da51 Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
This commit is contained in:
committed by
Stephen Boyd
parent
d2d1b4766b
commit
8d1efcd1c2
@@ -174,6 +174,8 @@ static void notification_available_cb(struct urb *urb)
|
||||
goto resubmit_int_urb;
|
||||
}
|
||||
|
||||
usb_mark_last_busy(udev);
|
||||
|
||||
if (!dev->resp_available) {
|
||||
dev->resp_available = true;
|
||||
wake_up(&dev->open_wait_queue);
|
||||
@@ -261,6 +263,7 @@ static void resp_avail_cb(struct urb *urb)
|
||||
|
||||
resubmit_int_urb:
|
||||
/*re-submit int urb to check response available*/
|
||||
usb_mark_last_busy(udev);
|
||||
status = usb_submit_urb(dev->inturb, GFP_ATOMIC);
|
||||
if (status)
|
||||
dev_err(dev->devicep, "%s: Error re-submitting Int URB %d\n",
|
||||
@@ -796,6 +799,7 @@ int rmnet_usb_ctrl_probe(struct usb_interface *intf,
|
||||
dev->intbuf, wMaxPacketSize,
|
||||
notification_available_cb, dev, interval);
|
||||
|
||||
usb_mark_last_busy(udev);
|
||||
return rmnet_usb_ctrl_start_rx(dev);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user