Skip to content

Commit

Permalink
usb: dwc2: hcd: initialize hsotg->test_mode upon USB_PORT_FEAT_TEST
Browse files Browse the repository at this point in the history
Set hsotg->test_mode upon SetPortFeature - USB_PORT_FEAT_TEST, as done in
gadget part, to avoid, in case of using usb role switch, disconnect on
USB_ROLE_NONE (unattach of PIDVID board).

Change-Id: I4cd9f2d4cceacbfb94162f95c32808e1145bdbc1
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/214916
Reviewed-by: CIBUILD <MDG-smet-aci-builds@list.st.com>
Reviewed-by: Fabrice GASNIER <fabrice.gasnier@foss.st.com>
Reviewed-by: CITOOLS <MDG-smet-aci-reviews@list.st.com>
  • Loading branch information
ADESTM authored and fourmone committed May 30, 2023
1 parent 82e7d84 commit da4d738
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/dwc2/hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3718,6 +3718,7 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq,
hprt0 &= ~HPRT0_TSTCTL_MASK;
hprt0 |= (windex >> 8) << HPRT0_TSTCTL_SHIFT;
dwc2_writel(hsotg, hprt0, HPRT0);
hsotg->test_mode = windex >> 8;
break;

default:
Expand Down

0 comments on commit da4d738

Please sign in to comment.