Skip to content

Commit da4d738

Browse files
ADESTMfourmone
authored andcommitted
usb: dwc2: hcd: initialize hsotg->test_mode upon USB_PORT_FEAT_TEST
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>
1 parent 82e7d84 commit da4d738

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/usb/dwc2/hcd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3718,6 +3718,7 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq,
37183718
hprt0 &= ~HPRT0_TSTCTL_MASK;
37193719
hprt0 |= (windex >> 8) << HPRT0_TSTCTL_SHIFT;
37203720
dwc2_writel(hsotg, hprt0, HPRT0);
3721+
hsotg->test_mode = windex >> 8;
37213722
break;
37223723

37233724
default:

0 commit comments

Comments
 (0)