mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-22 12:42:22 +07:00
usb: cdns3: gadget: clear the interrupt status when disconnect the host
It is meaningless to handle any interrupts after disconnecting with host Signed-off-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Felipe Balbi <balbi@kernel.org>
This commit is contained in:
parent
b5148d946f
commit
0eeda05995
@ -2739,10 +2739,13 @@ static int cdns3_gadget_pullup(struct usb_gadget *gadget, int is_on)
|
||||
{
|
||||
struct cdns3_device *priv_dev = gadget_to_cdns3_device(gadget);
|
||||
|
||||
if (is_on)
|
||||
if (is_on) {
|
||||
writel(USB_CONF_DEVEN, &priv_dev->regs->usb_conf);
|
||||
else
|
||||
} else {
|
||||
writel(~0, &priv_dev->regs->ep_ists);
|
||||
writel(~0, &priv_dev->regs->usb_ists);
|
||||
writel(USB_CONF_DEVDS, &priv_dev->regs->usb_conf);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user