usb: dwc3: gadget: Check for disabled LPM quirk
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Wed, 14 Apr 2021 02:13:18 +0000 (19:13 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 May 2021 12:47:20 +0000 (14:47 +0200)
commit8f7cdbbf61f9282a2d8fe6ef870c5eab4edb3ed0
treefcc551920657e527ff9017322ebd44084b263673
parent2946f95356cc93619e9972cae17bad973993ba45
usb: dwc3: gadget: Check for disabled LPM quirk

[ Upstream commit 475e8be53d0496f9bc6159f4abb3ff5f9b90e8de ]

If the device doesn't support LPM, make sure to disable the LPM
capability and don't advertise to the host that it supports it.

Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/9e68527ff932b1646f92a7593d4092a903754666.1618366071.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/dwc3/core.c
drivers/usb/dwc3/core.h
drivers/usb/dwc3/gadget.c