Skip to content

Commit

Permalink
Revert "usb: dwc2: drd: fix soft connect when gadget is unconfigured"
Browse files Browse the repository at this point in the history
commit 736e8d8 upstream.

This reverts commit 269cbcf.

It causes build errors as reported by the kernel test robot.

Link: https://lore.kernel.org/r/202202112236.AwoOTtHO-lkp@intel.com
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 269cbcf ("usb: dwc2: drd: fix soft connect when gadget is unconfigured")
Cc: stable@kernel.org
Cc: Amelie Delaunay <amelie.delaunay@foss.st.com>
Cc: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Cc: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
gregkh committed Feb 16, 2022
1 parent a6ef1bd commit f4e72ad
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/usb/dwc2/drd.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,8 @@ 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);
if (hsotg->enabled) {
/* This clear DCTL.SFTDISCON bit */
dwc2_hsotg_core_connect(hsotg);
}
/* This clear DCTL.SFTDISCON bit */
dwc2_hsotg_core_connect(hsotg);
} else {
if (dwc2_is_device_mode(hsotg)) {
if (!dwc2_ovr_bvalid(hsotg, false))
Expand Down

0 comments on commit f4e72ad

Please sign in to comment.