Skip to content

Commit bc62b33

Browse files
shimodaygregkh
authored andcommitted
usb: gadget: udc: renesas_usb3: disable the controller's irqs for reconnecting
commit bd6bce0 upstream. This patch fixes an issue that reconnection is possible to fail because unexpected state handling happens by the irqs. To fix the issue, the driver disables the controller's irqs when disconnected. Fixes: 746bfe6 ("usb: gadget: renesas_usb3: add support for Renesas USB3.0 peripheral controller") Cc: <stable@vger.kernel.org> # v4.5+ Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 244eb27 commit bc62b33

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/usb/gadget/udc/renesas_usb3.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,13 @@ static void usb3_disconnect(struct renesas_usb3 *usb3)
521521
usb3_usb2_pullup(usb3, 0);
522522
usb3_clear_bit(usb3, USB30_CON_B3_CONNECT, USB3_USB30_CON);
523523
usb3_reset_epc(usb3);
524+
usb3_disable_irq_1(usb3, USB_INT_1_B2_RSUM | USB_INT_1_B3_PLLWKUP |
525+
USB_INT_1_B3_LUPSUCS | USB_INT_1_B3_DISABLE |
526+
USB_INT_1_SPEED | USB_INT_1_B3_WRMRST |
527+
USB_INT_1_B3_HOTRST | USB_INT_1_B2_SPND |
528+
USB_INT_1_B2_L1SPND | USB_INT_1_B2_USBRST);
529+
usb3_clear_bit(usb3, USB_COM_CON_SPD_MODE, USB3_USB_COM_CON);
530+
usb3_init_epc_registers(usb3);
524531

525532
if (usb3->driver)
526533
usb3->driver->disconnect(&usb3->gadget);

0 commit comments

Comments
 (0)