Re: [PATCH] usb: musb: Fix locking errors for host only mode
* Bin Liu[160826 08:15]: > > BTY, sorry for beeing slow on reviewing patches lately. There are a > few critical things in my work coming up during my vacation. > (maintaining musb is not part of my paid job...) No problem, we all know how that goes. Tony -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: musb: Fix locking errors for host only mode
On Fri, Aug 26, 2016 at 07:57:39AM -0700, Tony Lindgren wrote: > * Bin Liu[160826 07:57]: > > On Fri, Aug 26, 2016 at 07:39:05AM -0700, Tony Lindgren wrote: > > > Hi, > > > > > > * Bin Liu [160825 10:19]: > > > > 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. > > > > > > > > > > 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 > > > > > Tested-by: Ladislav Michl > > > > > Signed-off-by: Tony Lindgren > > > > > > > > Signed-off-by: Bin Liu > > > > > > Bin, your Signed-off-by here suggests you've committed this to > > > a fixes branch somewhere but I can't see it in next. Are you > > > going to send a pull request for it or what's the plan? > > > Just wondering.. Also added Greg to Cc. > > > > I don't have a public git repo to host my musb maintenance work yet, and > > I don't have a plan to create one since there aren't many musb patches > > from the community. So far I have been managing all the patches in my > > local tree, and sending patch bombs to Greg. Your this patch will be > > sent to Greg today or tomorrow. > > OK so no need for me to do anything then. Thanks for the update. No, nothing no your side now, the patch is good to go ;) BTY, sorry for beeing slow on reviewing patches lately. There are a few critical things in my work coming up during my vacation. (maintaining musb is not part of my paid job...) > > Tony Regards, -Bin. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: musb: Fix locking errors for host only mode
On Fri, Aug 26, 2016 at 07:39:05AM -0700, Tony Lindgren wrote: > Hi, > > * Bin Liu[160825 10:19]: > > 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. > > > > > > 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 > > > Tested-by: Ladislav Michl > > > Signed-off-by: Tony Lindgren > > > > Signed-off-by: Bin Liu > > Bin, your Signed-off-by here suggests you've committed this to > a fixes branch somewhere but I can't see it in next. Are you > going to send a pull request for it or what's the plan? > Just wondering.. Also added Greg to Cc. I don't have a public git repo to host my musb maintenance work yet, and I don't have a plan to create one since there aren't many musb patches from the community. So far I have been managing all the patches in my local tree, and sending patch bombs to Greg. Your this patch will be sent to Greg today or tomorrow. > > Regards, > > Tony Regards, -Bin. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: musb: Fix locking errors for host only mode
* Bin Liu[160826 07:57]: > On Fri, Aug 26, 2016 at 07:39:05AM -0700, Tony Lindgren wrote: > > Hi, > > > > * Bin Liu [160825 10:19]: > > > 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. > > > > > > > > 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 > > > > Tested-by: Ladislav Michl > > > > Signed-off-by: Tony Lindgren > > > > > > Signed-off-by: Bin Liu > > > > Bin, your Signed-off-by here suggests you've committed this to > > a fixes branch somewhere but I can't see it in next. Are you > > going to send a pull request for it or what's the plan? > > Just wondering.. Also added Greg to Cc. > > I don't have a public git repo to host my musb maintenance work yet, and > I don't have a plan to create one since there aren't many musb patches > from the community. So far I have been managing all the patches in my > local tree, and sending patch bombs to Greg. Your this patch will be > sent to Greg today or tomorrow. OK so no need for me to do anything then. Thanks for the update. Tony -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: musb: Fix locking errors for host only mode
Hi, * Bin Liu[160825 10:19]: > 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. > > > > 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 > > Tested-by: Ladislav Michl > > Signed-off-by: Tony Lindgren > > Signed-off-by: Bin Liu Bin, your Signed-off-by here suggests you've committed this to a fixes branch somewhere but I can't see it in next. Are you going to send a pull request for it or what's the plan? Just wondering.. Also added Greg to Cc. Regards, Tony -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: musb: Fix locking errors for host only mode
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. > > 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> Tested-by: Ladislav Michl > Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Regards, -Bin. > --- > 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; > + boolstart_musb = false; > > spin_lock_irqsave(>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(>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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: musb: Fix locking errors for host only mode
On Wed, Aug 24, 2016 at 12:29:26PM -0700, Tony Lindgren wrote: > * Tony Lindgren[160824 12:17]: > > * Bin Liu [160824 11:47]: > > > 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. > > > > It seems to be with a built-in MUSB and gadgets in the .config, > > I'll forward you the one I got earlier from Ladis. > > And probably specifically CONFIG_USB_MUSB_HOST=y. yes, I had gadget support disabled and CONFIG_USB_MUSB_HOST=y, but MUSB_HDRC=m. I will try your .config once I have time. Thanks, -Bin. > > Regards, > > Tony -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: musb: Fix locking errors for host only mode
* Tony Lindgren[160824 12:17]: > * Bin Liu [160824 11:47]: > > 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. > > It seems to be with a built-in MUSB and gadgets in the .config, > I'll forward you the one I got earlier from Ladis. And probably specifically CONFIG_USB_MUSB_HOST=y. Regards, Tony -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: musb: Fix locking errors for host only mode
* Bin Liu[160824 11:47]: > 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. It seems to be with a built-in MUSB and gadgets in the .config, I'll forward you the one I got earlier from Ladis. Regards, Tony -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: musb: Fix locking errors for host only mode
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> Tested-by: Ladislav Michl > Signed-off-by: Tony Lindgren > --- > 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; > + boolstart_musb = false; > > spin_lock_irqsave(>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(>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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] usb: musb: Fix locking errors for host only mode
If we have USB gadgets disabled and USB_MUSB_HOST set, we get errors "possible irq lock inverssion dependency detected" errors during boot. 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 MichlTested-by: Ladislav Michl Signed-off-by: Tony Lindgren --- 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; + boolstart_musb = false; spin_lock_irqsave(>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(>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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html