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

Commit 81cef8ad authored by Chandana Kishori Chiluveru's avatar Chandana Kishori Chiluveru
Browse files

usb: gadget: qdss: Fix runtime PM usage count for multiple set_alt



In some scenarios such as USBCV tests, multiple set_alt
could be issued with same interface setting. In that case,
driver get the usage count in set_alt but do not put it.
This causes a mismatch of usage count and DWC3 LPM does
not work anymore. Fix this by adding check in qdss_set_alt to
ignore multiple set_alts.

Change-Id: I232456c3f99b0cfaa61eb1c044bdd86013c930fa
Signed-off-by: default avatarChandana Kishori Chiluveru <cchiluve@codeaurora.org>
parent 5e8e365b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -698,7 +698,7 @@ static int qdss_set_alt(struct usb_function *f, unsigned int intf,
		goto fail1;
	}

	if (intf == qdss->data_iface_id) {
	if (intf == qdss->data_iface_id && !qdss->data_enabled) {
		/* Increment usage count on connect */
		usb_gadget_autopm_get_async(qdss->gadget);