Skip to content

Commit 57deb7a

Browse files
Xu Yanggregkh
Xu Yang
authored andcommitted
usb: chipidea: udc: enable suspend interrupt after usb reset
[ Upstream commit e4fdcc1 ] Currently, suspend interrupt is enabled before pullup enable operation. This will cause a suspend interrupt assert right after pullup DP. This suspend interrupt is meaningless, so this will ignore such interrupt by enable it after usb reset completed. Signed-off-by: Xu Yang <[email protected]> Acked-by: Peter Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 4d4b23c commit 57deb7a

File tree

1 file changed

+7
-1
lines changed
  • drivers/usb/chipidea

1 file changed

+7
-1
lines changed

drivers/usb/chipidea/udc.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static int hw_device_state(struct ci_hdrc *ci, u32 dma)
8686
hw_write(ci, OP_ENDPTLISTADDR, ~0, dma);
8787
/* interrupt, error, port change, reset, sleep/suspend */
8888
hw_write(ci, OP_USBINTR, ~0,
89-
USBi_UI|USBi_UEI|USBi_PCI|USBi_URI|USBi_SLI);
89+
USBi_UI|USBi_UEI|USBi_PCI|USBi_URI);
9090
} else {
9191
hw_write(ci, OP_USBINTR, ~0, 0);
9292
}
@@ -877,6 +877,7 @@ __releases(ci->lock)
877877
__acquires(ci->lock)
878878
{
879879
int retval;
880+
u32 intr;
880881

881882
spin_unlock(&ci->lock);
882883
if (ci->gadget.speed != USB_SPEED_UNKNOWN)
@@ -890,6 +891,11 @@ __acquires(ci->lock)
890891
if (retval)
891892
goto done;
892893

894+
/* clear SLI */
895+
hw_write(ci, OP_USBSTS, USBi_SLI, USBi_SLI);
896+
intr = hw_read(ci, OP_USBINTR, ~0);
897+
hw_write(ci, OP_USBINTR, ~0, intr | USBi_SLI);
898+
893899
ci->status = usb_ep_alloc_request(&ci->ep0in->ep, GFP_ATOMIC);
894900
if (ci->status == NULL)
895901
retval = -ENOMEM;

0 commit comments

Comments
 (0)