usb: mtu3: sync interrupt before unbind the udc
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Thu, 9 Jun 2022 07:42:31 +0000 (15:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jun 2022 09:52:52 +0000 (11:52 +0200)
Register gadget irq to avoid the interrupt handler is occurred
or scheduled during the unbind flow, may happen when do android
function switch stress test.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/20220609074233.15532-1-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/mtu3/mtu3_gadget.c

index 9977600616d7ea1957dac214691d8b8844df1d2d..d57cea62fe6b001c091f2a98ac0567a5eb8d3731 100644 (file)
@@ -680,6 +680,7 @@ int mtu3_gadget_setup(struct mtu3 *mtu)
        mtu->g.speed = USB_SPEED_UNKNOWN;
        mtu->g.sg_supported = 0;
        mtu->g.name = MTU3_DRIVER_NAME;
+       mtu->g.irq = mtu->irq;
        mtu->is_active = 0;
        mtu->delayed_status = false;