All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sanket Parmar <sparmar@cadence.com>
To: <gregkh@linuxfoundation.org>, <felipe.balbi@linux.intel.com>
Cc: <sparmar@cadence.com>, <pawell@cadence.com>,
	<linux-usb@vger.kernel.org>, <rogerq@ti.com>,
	<linux-kernel@vger.kernel.org>, <kurahul@cadence.com>,
	<peter.chen@nxp.com>, <nsekhar@ti.com>
Subject: [PATCH] usb: cdns3: gadget: reset EP_CLAIMED flag while unloading
Date: Tue, 29 Oct 2019 12:24:41 +0000	[thread overview]
Message-ID: <20191029122441.5816-1-sparmar@cadence.com> (raw)

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>
---
Hi Greg/Felipe,

This can be used for -rc as it is bug fix.

Regards,
Sanket

 drivers/usb/cdns3/gadget.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
index 9050b380ab83..2fb78322ed3c 100644
--- a/drivers/usb/cdns3/gadget.c
+++ b/drivers/usb/cdns3/gadget.c
@@ -2381,6 +2381,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 */
-- 
2.17.1


             reply	other threads:[~2019-10-29 12:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-29 12:24 Sanket Parmar [this message]
2019-10-29 12:26 ` [PATCH] usb: cdns3: gadget: reset EP_CLAIMED flag while unloading Roger Quadros
2019-10-30  3:00 ` Peter Chen
2019-10-30 11:40 ` Felipe Balbi
2019-10-30 11:51   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191029122441.5816-1-sparmar@cadence.com \
    --to=sparmar@cadence.com \
    --cc=felipe.balbi@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kurahul@cadence.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=pawell@cadence.com \
    --cc=peter.chen@nxp.com \
    --cc=rogerq@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.