From: Peter Chen <hzpeterchen@gmail.com>
To: Pawel Laszczak <pawell@cadence.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
USB list <linux-usb@vger.kernel.org>,
felipe.balbi@linux.intel.com, dan.carpenter@oracle.com
Subject: Re: [PATCH v3 -next] usb: cdns3: Fix sheduling with locks held.
Date: Fri, 27 Sep 2019 16:29:13 +0800 [thread overview]
Message-ID: <CAL411-rXBNVEr67QTx0Jaj3bo5pbK__2wCihz+8T6Q7dumgZaA@mail.gmail.com> (raw)
In-Reply-To: <1569484721-4424-1-git-send-email-pawell@cadence.com>
On Thu, Sep 26, 2019 at 6:26 PM Pawel Laszczak <pawell@cadence.com> wrote:
>
> Patch fix issue in cdns3_ep0_feature_handle_device function.
>
> The function usleep_range can't be used there because this function is
> called with locks held and IRQs disabled in
> cdns3_device_thread_irq_handler().
>
> To resolve this issue patch replaces usleep_range with mdelay.
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Pawel Laszczak <pawell@cadence.com>
> Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver")
> ---
> v2: added Reported-by and Fixes tags
> v3: added version of the patch
> ---
> drivers/usb/cdns3/ep0.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/cdns3/ep0.c b/drivers/usb/cdns3/ep0.c
> index 44f652e8b5a2..0445da0a5a0c 100644
> --- a/drivers/usb/cdns3/ep0.c
> +++ b/drivers/usb/cdns3/ep0.c
> @@ -332,7 +332,7 @@ static int cdns3_ep0_feature_handle_device(struct cdns3_device *priv_dev,
> * for sending status stage.
> * This time should be less then 3ms.
> */
> - usleep_range(1000, 2000);
> + mdelay(1);
> cdns3_set_register_bit(&priv_dev->regs->usb_cmd,
> USB_CMD_STMODE |
> USB_STS_TMODE_SEL(tmode - 1));
> --
> 2.17.1
>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Peter
prev parent reply other threads:[~2019-09-27 8:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-26 7:58 [PATCH v3 -next] usb: cdns3: Fix sheduling with locks held Pawel Laszczak
2019-09-27 8:29 ` Peter Chen [this message]
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=CAL411-rXBNVEr67QTx0Jaj3bo5pbK__2wCihz+8T6Q7dumgZaA@mail.gmail.com \
--to=hzpeterchen@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=felipe.balbi@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=pawell@cadence.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).