Commit 6014e58b authored by Li Jun's avatar Li Jun Committed by Zhang Xiaoxu
Browse files

usb: dwc3: core: balance phy init and exit

mainline inclusion
from mainline-v5.15-rc3
commit 8cfac9a6
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I949BN


CVE: CVE-2021-46941

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

After we start to do core soft reset while usb role switch,
the phy init is invoked at every switch to device mode, but
its counter part de-init is missing, this causes the actual
phy init can not be done when we really want to re-init phy
like system resume, because the counter maintained by phy
core is not 0. considering phy init is actually redundant for
role switch, so move out the phy init from core soft reset to
dwc3 core init where is the only place required.

Fixes: f88359e1 ("usb: dwc3: core: Do core softreset when switch mode")
Cc: <stable@vger.kernel.org>
Tested-by: default avatarfaqiang.zhu <faqiang.zhu@nxp.com>
Tested-by: John Stultz <john.stultz@linaro.org> #HiKey960
Acked-by: default avatarFelipe Balbi <balbi@kernel.org>
Signed-off-by: default avatarLi Jun <jun.li@nxp.com>
Link: https://lore.kernel.org/r/1631068099-13559-1-git-send-email-jun.li@nxp.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZhang Xiaoxu <zhangxiaoxu5@huawei.com>
parent 916ca0ff
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment