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

Commit d063997a authored by Mayank Rana's avatar Mayank Rana
Browse files

usb: gadget: gps: Don't notify USB_CDC_NOTIFY_NETWORK_CONNECTION state



On closing and opening of SMD channel, gps_disconnect() and gps_connect()
APIs are called. gps_disconnect() API queues USB notify request with
USB_CDC_NOTIFY_NETWORK_CONNECTION notification which is applicable for
only ethernet CDC functionality and shouldn't be used with GPS. Due to
this additional queueing, driver encounters condition where USB notify
request is being queued without any ctrl response packet available. On
opening of GPS application, this particular notify request is completed.
notify_request completion (i.e. gps_notify_complete()) decrements
notify_count and it becomes negative value. This results into seeing
message "ctrl resp queue empty" continuous as gps_notify_complete()
always queue notify request.

Also dequeue any pending notify request from gps_disconnect() to avoid
notify_count becoming negative.

Also add WARN_ON(1) when usb_ep_queue() returns -EBUSY which detects
possible condition where notify_count becomes negative value.

CRs-Fixed: 995861
Change-Id: Idf28c30735dc86f2fd97f0ae099de83f2964b513
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent ce015ce1
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