summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorSanket Parmar <sparmar@cadence.com>2019-10-29 13:24:41 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-30 12:52:13 +0100
commitf5c8d290634a470600e1ce61733ec54d05a897e8 (patch)
tree748724238ae3f416260c58e8422a946f05616e80 /drivers/usb
parentUSB: serial: whiteheat: fix line-speed endianness (diff)
downloadlinux-f5c8d290634a470600e1ce61733ec54d05a897e8.tar.xz
linux-f5c8d290634a470600e1ce61733ec54d05a897e8.zip
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 <sparmar@cadence.com> Acked-by: Peter Chen <peter.chen@nxp.com> Reviewed-by: Roger Quadros <rogerq@ti.com> Acked-by: Felipe Balbi <balbi@kernel.org> Link: https://lore.kernel.org/r/20191029122441.5816-1-sparmar@cadence.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/cdns3/gadget.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
index d9e7f2d06098..8421fc028c40 100644
--- a/drivers/usb/cdns3/gadget.c
+++ b/drivers/usb/cdns3/gadget.c
@@ -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 */