diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-28 07:30:32 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-28 07:30:32 +0100 |
commit | 085686fb8491a7cbf6a7260d5b9d4169a041c340 (patch) | |
tree | 6b35dea52e658376f67d0a4e0cb511e0589602ea /drivers/usb/dwc2/drd.c | |
parent | 2be483f12ea34b43826f70c60f0924a7bda991bd (diff) | |
parent | 7e57714cd0ad2d5bb90e50b5096a0e671dec1ef3 (diff) | |
download | linux-085686fb8491a7cbf6a7260d5b9d4169a041c340.tar.bz2 |
Merge 5.17-rc6 into char-misc-next
We need the char-misc fixes in here.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc2/drd.c')
-rw-r--r-- | drivers/usb/dwc2/drd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/dwc2/drd.c b/drivers/usb/dwc2/drd.c index 1b39c4776369..d8d6493bc457 100644 --- a/drivers/usb/dwc2/drd.c +++ b/drivers/usb/dwc2/drd.c @@ -130,8 +130,10 @@ static int dwc2_drd_role_sw_set(struct usb_role_switch *sw, enum usb_role role) already = dwc2_ovr_avalid(hsotg, true); } else if (role == USB_ROLE_DEVICE) { already = dwc2_ovr_bvalid(hsotg, true); - /* This clear DCTL.SFTDISCON bit */ - dwc2_hsotg_core_connect(hsotg); + if (dwc2_is_device_enabled(hsotg)) { + /* This clear DCTL.SFTDISCON bit */ + dwc2_hsotg_core_connect(hsotg); + } } else { if (dwc2_is_device_mode(hsotg)) { if (!dwc2_ovr_bvalid(hsotg, false)) |