From: Bin Liu <b-liu-l0cyMroinI0@public.gmane.org>
To: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
Cc: Andreas Kemnade <andreas-cLv4Z9ELZ06ZuzBka8ofvg@public.gmane.org>,
Felipe Balbi <balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>,
Ivaylo Dimitrov
<ivo.g.dimitrov.75-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Ladislav Michl <ladis-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>,
Sergei Shtylyov
<sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] usb: musb: Fix locking errors for host only mode
Date: Wed, 24 Aug 2016 13:46:22 -0500 [thread overview]
Message-ID: <20160824184552.GB4050@uda0271908> (raw)
In-Reply-To: <1471560038-6243-1-git-send-email-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
Hi,
On Thu, Aug 18, 2016 at 03:40:38PM -0700, Tony Lindgren wrote:
> If we have USB gadgets disabled and USB_MUSB_HOST set, we get
> errors "possible irq lock inverssion dependency detected"
> errors during boot.
On which platform was this issue found? I am trying to replicate the
issue on am335x, but have no luck yet - musb-hdrc does not load at all
when usb gadget support is disabled.
Regards,
-Bin.
>
> Let's fix the issue by adding start_musb flag and start
> the controller after we're out of the spinlock protected
> section.
>
> Reported-by: Ladislav Michl <ladis-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>
> Tested-by: Ladislav Michl <ladis-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>
> Signed-off-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
> ---
> drivers/usb/musb/musb_virthub.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c
> index 192248f..fe08e77 100644
> --- a/drivers/usb/musb/musb_virthub.c
> +++ b/drivers/usb/musb/musb_virthub.c
> @@ -290,6 +290,7 @@ int musb_hub_control(
> u32 temp;
> int retval = 0;
> unsigned long flags;
> + bool start_musb = false;
>
> spin_lock_irqsave(&musb->lock, flags);
>
> @@ -390,7 +391,7 @@ int musb_hub_control(
> * logic relating to VBUS power-up.
> */
> if (!hcd->self.is_b_host && musb_has_gadget(musb))
> - musb_start(musb);
> + start_musb = true;
> break;
> case USB_PORT_FEAT_RESET:
> musb_port_reset(musb, true);
> @@ -451,5 +452,9 @@ error:
> retval = -EPIPE;
> }
> spin_unlock_irqrestore(&musb->lock, flags);
> +
> + if (start_musb)
> + musb_start(musb);
> +
> return retval;
> }
> --
> 2.8.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-08-24 18:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-18 22:40 [PATCH] usb: musb: Fix locking errors for host only mode Tony Lindgren
[not found] ` <1471560038-6243-1-git-send-email-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-08-24 18:46 ` Bin Liu [this message]
2016-08-24 19:15 ` Tony Lindgren
[not found] ` <20160824191508.nf63okevka5kkfks-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-08-24 19:29 ` Tony Lindgren
[not found] ` <20160824192926.bjfgzbzhaj5cg4o5-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-08-24 19:33 ` Bin Liu
2016-08-25 17:18 ` Bin Liu
2016-08-26 14:39 ` Tony Lindgren
[not found] ` <20160826143904.ew3cufraegj7rbjm-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-08-26 14:56 ` Bin Liu
2016-08-26 14:57 ` Tony Lindgren
[not found] ` <20160826145738.ptsdhdbcn3vudszb-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-08-26 15:14 ` Bin Liu
2016-08-26 15:25 ` Tony Lindgren
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=20160824184552.GB4050@uda0271908 \
--to=b-liu-l0cymroini0@public.gmane.org \
--cc=andreas-cLv4Z9ELZ06ZuzBka8ofvg@public.gmane.org \
--cc=balbi-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=ivo.g.dimitrov.75-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=kishon-l0cyMroinI0@public.gmane.org \
--cc=ladis-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org \
--cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.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 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.