提交 f5c8d290 编写于 作者: S Sanket Parmar 提交者: Greg Kroah-Hartman

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: NSanket Parmar <sparmar@cadence.com>
Acked-by: NPeter Chen <peter.chen@nxp.com>
Reviewed-by: NRoger Quadros <rogerq@ti.com>
Acked-by: NFelipe Balbi <balbi@kernel.org>
Link: https://lore.kernel.org/r/20191029122441.5816-1-sparmar@cadence.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 84968291
......@@ -2379,6 +2379,8 @@ static int cdns3_gadget_udc_stop(struct usb_gadget *gadget)
writel(EP_CMD_EPRST, &priv_dev->regs->ep_cmd);
readl_poll_timeout_atomic(&priv_dev->regs->ep_cmd, val,
!(val & EP_CMD_EPRST), 1, 100);
priv_ep->flags &= ~EP_CLAIMED;
}
/* disable interrupt for device */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册