提交 eabf5656 编写于 作者: P Phil Elwell 提交者: Zheng Zengkai

usb: dwc2: Fix build in periphal-only mode

stable inclusion
from stable-5.10.43
commit a4ed12f5edc41abbfe2bce4a215de2f6ff4993eb
bugzilla: 109284
CVE: NA

--------------------------------

In branches to which 24d209db ("usb: dwc2: Fix hibernation between
host and device modes.") has been back-ported, the bus_suspended member
of struct dwc2_hsotg is only present in builds that support host-mode.
To avoid having to pull in several more non-Fix commits in order to
get it to compile, wrap the usage of the member in a macro conditional.

Fixes: 24d209db ("usb: dwc2: Fix hibernation between host and device modes.")
Signed-off-by: NPhil Elwell <phil@raspberrypi.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 94fa6453
...@@ -707,7 +707,11 @@ static inline void dwc_handle_gpwrdn_disc_det(struct dwc2_hsotg *hsotg, ...@@ -707,7 +707,11 @@ static inline void dwc_handle_gpwrdn_disc_det(struct dwc2_hsotg *hsotg,
dwc2_writel(hsotg, gpwrdn_tmp, GPWRDN); dwc2_writel(hsotg, gpwrdn_tmp, GPWRDN);
hsotg->hibernated = 0; hsotg->hibernated = 0;
#if IS_ENABLED(CONFIG_USB_DWC2_HOST) || \
IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE)
hsotg->bus_suspended = 0; hsotg->bus_suspended = 0;
#endif
if (gpwrdn & GPWRDN_IDSTS) { if (gpwrdn & GPWRDN_IDSTS) {
hsotg->op_state = OTG_STATE_B_PERIPHERAL; hsotg->op_state = OTG_STATE_B_PERIPHERAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部