Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9708cff1 authored by Hemant Kumar's avatar Hemant Kumar Committed by Matt Wagantall
Browse files

usb: gadget: f_mbim: Queue notification request upon resume



commit e9df68ad (usb: gadget: f_mbim: Queue notification request upon
function resume) calls mbim_do_notify() upon function resume to queue
notification request in super speed mode and misses to queue the request
in High speed mode. Fix the issue by moving mbim_do_notify() call inside
mbim_resume() to resume control path for both speed modes.

CRs-Fixed: 826684
Change-Id: I5229aa78f3c7e98fe6cb45a32aabd4d53c088d96
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
Signed-off-by: default avatarAzhar Shaikh <azhars@codeaurora.org>
parent 04b9a276
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1398,6 +1398,11 @@ static void mbim_resume(struct usb_function *f)
		f->func_is_suspended)
		return;

	/* resume control path by queuing notify req */
	spin_lock(&mbim->lock);
	mbim_do_notify(mbim);
	spin_unlock(&mbim->lock);

	if (mbim->cdev->gadget->speed == USB_SPEED_SUPER)
		remote_wakeup_allowed = f->func_wakeup_allowed;
	else
@@ -1460,9 +1465,6 @@ static int mbim_func_suspend(struct usb_function *f, unsigned char options)
	} else {
		if (f->func_is_suspended) {
			f->func_is_suspended = false;
			spin_lock(&mbim->lock);
			mbim_do_notify(mbim);
			spin_unlock(&mbim->lock);
			mbim_resume(f);
		}
		f->func_wakeup_allowed = func_wakeup_allowed;