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

Skip to content
Commit dd64a62e authored by Azhar Shaikh's avatar Azhar Shaikh
Browse files

usb: misc: Resume mdm interface on receiving notification available cb



usb_autopm_get_interface_no_resume() called from notification available
callback only increments PM usage count but does not change the runtime
PM status.
Consider a case where notification available callback is called and at the
same time usb_runtime_idle() for USB device is called after all interfaces
are suspended. usb_runtime_idle() will return -EBUSY as the PM usage count
is non-zero.
When the mdm bridge driver finishes with the read URB, it calls
usb_autopm_put_interface_async() which returns -EAGAIN, as mdm
interface runtime PM status is already RPM_SUSPENDED. Since the
usb_runtime_idle() call fails, the autosuspend timer will not be re-armed
and hence the idle() callback for the USB device will never be called.
So to fix this, in notification available callback, replace
usb_autopm_get_interface_no_resume() with usb_autopm_get_interface_async()
which will not only increment the PM usage count but also change the
runtime PM status of mdm interface and if there is a suspend
in progress, as this is an asynchronous call, it just returns -EINPROGRESS
and the mdm bridge RX state machine ensures that the suspend is aborted.

CRs-Fixed: 718574
Change-Id: I61e6fa7b41b46318229d180b7c098c94d0409605
Signed-off-by: default avatarAzhar Shaikh <azhars@codeaurora.org>
parent 1450dc76
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment