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

Commit 90f8961b authored by Manu Gautam's avatar Manu Gautam Committed by Jack Pham
Browse files

usb: dwc3: gadget: Fix runtime PM vote from pull_up handler



If gadget driver's request for removing pull_up fails due to
EP0 not in setup phase, then driver ends up bailing out
without removing it PM usage_count vote.
This will prevent DWC3 from entering low power mode and
subsequent start_peripheral/host would also won't be
allowed as LPM entry is mandatory for that.

Change-Id: Id1dde0dcf379a1f6b9567d63c0b1d31445c30d0d
Signed-off-by: default avatarManu Gautam <mgautam@codeaurora.org>
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 1e3f5743
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -2078,10 +2078,8 @@ static int dwc3_gadget_pullup(struct usb_gadget *g, int is_on)

		ret = wait_for_completion_timeout(&dwc->ep0_in_setup,
				msecs_to_jiffies(DWC3_PULL_UP_TIMEOUT));
		if (ret == 0) {
		if (ret == 0)
			dev_err(dwc->dev, "timed out waiting for SETUP phase\n");
			return -ETIMEDOUT;
		}
	}

	spin_lock_irqsave(&dwc->lock, flags);