linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rui Miguel Silva" <rui.silva@linaro.org>
To: "Dan Carpenter" <dan.carpenter@oracle.com>
Cc: <linux-usb@vger.kernel.org>
Subject: Re: [bug report] usb: isp1760: move to regmap for register access
Date: Mon, 26 Jul 2021 10:31:20 +0100	[thread overview]
Message-ID: <CD2YTTPX49YH.2PKPUS4L09ZEK@arch-thunder> (raw)
In-Reply-To: <20210726071747.GA8604@kili>

Hi Dan,
On Mon Jul 26, 2021 at 8:17 AM WEST, Dan Carpenter wrote:

> Hello Rui Miguel Silva,
>
> The patch 1da9e1c06873: "usb: isp1760: move to regmap for register
> access" from May 13, 2021, leads to the following static checker
> warning:
>
> 	drivers/usb/isp1760/isp1760-hcd.c:264 isp1760_hcd_set_and_wait_swap()
> 	warn: sleeping in atomic context
>
> drivers/usb/isp1760/isp1760-hcd.c
>     256 static int isp1760_hcd_set_and_wait_swap(struct usb_hcd *hcd, u32 field,
>     257 					 u32 timeout_us)
>     258 {
>     259 	struct isp1760_hcd *priv = hcd_to_priv(hcd);
>     260 	u32 val;
>     261 
>     262 	isp1760_hcd_set(hcd, field);
>     263 
> --> 264 	return regmap_field_read_poll_timeout(priv->fields[field], val,
>     265 					      !val, 10, timeout_us);
>                                                             ^^
> This used to call something else but it was still a sleep function.
>
> The call tree is:
>   --> isp1760_stop() <-- takes a spinlock
>       --> ehci_reset()
>           --> isp1760_hcd_set_and_wait_swap()

Thanks for both reports, I will send fix for this soon.

------
Cheers,
     Rui

      reply	other threads:[~2021-07-26  9:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26  7:17 [bug report] usb: isp1760: move to regmap for register access Dan Carpenter
2021-07-26  9:31 ` Rui Miguel Silva [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=CD2YTTPX49YH.2PKPUS4L09ZEK@arch-thunder \
    --to=rui.silva@linaro.org \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-usb@vger.kernel.org \
    /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).