Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: dwc3: gadget: Clear DCTL.ULSTCHNGREQ before set

Send a no-action link state change request before the actual request
so DWC3 can send the same request whenever we call
dwc3_gadget_set_link_state().

Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Thinh Nguyen and committed by
Greg Kroah-Hartman
2e708fa3 1b6009ea

+3
+3
drivers/usb/dwc3/gadget.c
··· 111 111 reg = dwc3_readl(dwc->regs, DWC3_DCTL); 112 112 reg &= ~DWC3_DCTL_ULSTCHNGREQ_MASK; 113 113 114 + /* set no action before sending new link state change */ 115 + dwc3_writel(dwc->regs, DWC3_DCTL, reg); 116 + 114 117 /* set requested state */ 115 118 reg |= DWC3_DCTL_ULSTCHNGREQ(state); 116 119 dwc3_writel(dwc->regs, DWC3_DCTL, reg);