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

Commit 5caba725 authored by Prashanth K's avatar Prashanth K
Browse files

usb: gadget: f_cdev: Bail out from cer_resume if func_suspended



Currently when the device exits from U3, all the interfaces will
be resumed. In f_cdev driver, cser_resume will be called, which
will clear is_suspended flag and process pending requests.

Consider a situation where DUN interface is function suspended,
and gadget resume happens eventually clearing is_suspended flag.
Now if userspace writes something into at_usb node, f_cdev_write
will queue the request without calling func_wakeup. And since the
DUN interface is function suspended, host expects func_wakeup to
be called before queueing the data.

Fix this by bailing out from cser_resume() if function is already
suspended, and wait for the userspace to issue remote-wakeup by
writing something into at_usb node.

Change-Id: Iba9c1dfd8a5deeb6c73af3ff370d51af193ff0e9
Signed-off-by: default avatarPrashanth K <quic_prashk@quicinc.com>
parent 9ed41175
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