Skip to content

Commit f5c8d29

Browse files
sparmarcdnsgregkh
authored andcommitted
usb: cdns3: gadget: reset EP_CLAIMED flag while unloading
EP_CLAIMED flag is used to track the claimed endpoints. While unloading the module, Reset EP_CLAIMED flag for all enabled endpoints. So that it can be reused. Signed-off-by: Sanket Parmar <[email protected]> Acked-by: Peter Chen <[email protected]> Reviewed-by: Roger Quadros <[email protected]> Acked-by: Felipe Balbi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 8496829 commit f5c8d29

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/usb/cdns3/gadget.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2379,6 +2379,8 @@ static int cdns3_gadget_udc_stop(struct usb_gadget *gadget)
23792379
writel(EP_CMD_EPRST, &priv_dev->regs->ep_cmd);
23802380
readl_poll_timeout_atomic(&priv_dev->regs->ep_cmd, val,
23812381
!(val & EP_CMD_EPRST), 1, 100);
2382+
2383+
priv_ep->flags &= ~EP_CLAIMED;
23822384
}
23832385

23842386
/* disable interrupt for device */

0 commit comments

Comments
 (0)