public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: Felipe Balbi <balbi@ti.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
	lkml <linux-kernel@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Nicolas Pitre <nicolas.pitre@linaro.org>
Subject: Re: [RFC][PATCH] musb: Avoid musb_gadget_pullup "Unhandled fault" oops on omap4
Date: Mon, 25 Jul 2011 08:43:54 -0700	[thread overview]
Message-ID: <1311608634.2945.265.camel@work-vm> (raw)
In-Reply-To: <1311206974.2945.198.camel@work-vm>

On Wed, 2011-07-20 at 17:09 -0700, John Stultz wrote:
> I've recently run across an "Unhandled fault: imprecise external abort"
> oops that is caused when a driver called usb_gadget_connect() when there
> was no cable plugged into the musb gadget port.

Felipe: Ping? Any thoughts on this patch?

thanks
-john


> Reported-by: Zach Pfeffer <zach.pfeffer@linaro.org>
> Signed-off-by: John Stultz <john.stultz@linaro.org>
> 
> diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
> index 6aeb363..548338c 100644
> --- a/drivers/usb/musb/musb_gadget.c
> +++ b/drivers/usb/musb/musb_gadget.c
> @@ -1698,6 +1698,8 @@ static int musb_gadget_pullup(struct usb_gadget *gadget, int is_on)
>  
>  	is_on = !!is_on;
>  
> +	pm_runtime_get_sync(musb->controller);
> +
>  	/* NOTE: this assumes we are sensing vbus; we'd rather
>  	 * not pullup unless the B-session is active.
>  	 */
> @@ -1707,6 +1709,9 @@ static int musb_gadget_pullup(struct usb_gadget *gadget, int is_on)
>  		musb_pullup(musb, is_on);
>  	}
>  	spin_unlock_irqrestore(&musb->lock, flags);
> +
> +	pm_runtime_put(musb->controller);
> +
>  	return 0;
>  }
>  
> 



  reply	other threads:[~2011-07-25 15:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-21  0:09 [RFC][PATCH] musb: Avoid musb_gadget_pullup "Unhandled fault" oops on omap4 John Stultz
2011-07-25 15:43 ` john stultz [this message]
2011-07-25 17:27   ` Felipe Balbi
2011-07-27 19:15   ` Felipe Balbi
2011-07-29  5:04 ` Felipe Balbi
2011-08-03 23:14   ` Colin Cross

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=1311608634.2945.265.camel@work-vm \
    --to=johnstul@us.ibm.com \
    --cc=arnd@arndb.de \
    --cc=balbi@ti.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.pitre@linaro.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