linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Chen <peter.chen@freescale.com>
To: Michael Thalmeier <michael.thalmeier@hale.at>
Cc: Li Yang <leoli@freescale.com>, Felipe Balbi <balbi@ti.com>,
	<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<michael@thalmeier.at>
Subject: Re: [PATCH] usb/gadget/fsl_udc_core.c: fix oops on resume
Date: Fri, 13 Jan 2012 09:35:09 +0800	[thread overview]
Message-ID: <20120113013508.GA19288@nchen-desktop> (raw)
In-Reply-To: <1326271577-13418-1-git-send-email-michael.thalmeier@hale.at>

On Wed, Jan 11, 2012 at 09:46:17AM +0100, Michael Thalmeier wrote:
> Sometimes the fsl_udc_irq function oopses when waking up from suspend.
What's the situation it will happen? The udc driver will bind with gadget
first, then open the interrupt enable. When unload gadget driver, it will
disable all interrupt bits first, then unbind the gadget driver.
> 
> Signed-off-by: Michael Thalmeier <michael.thalmeier@hale.at>
> ---
>  drivers/usb/gadget/fsl_udc_core.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
> index d7ea6c0..4070c7a 100644
> --- a/drivers/usb/gadget/fsl_udc_core.c
> +++ b/drivers/usb/gadget/fsl_udc_core.c
> @@ -1749,7 +1749,7 @@ static void suspend_irq(struct fsl_udc *udc)
>  	udc->usb_state = USB_STATE_SUSPENDED;
>  
>  	/* report suspend to the driver, serial.c does not support this */
> -	if (udc->driver->suspend)
> +	if (udc->driver && udc->driver->suspend)
>  		udc->driver->suspend(&udc->gadget);
>  }
>  
> @@ -1759,7 +1759,7 @@ static void bus_resume(struct fsl_udc *udc)
>  	udc->resume_state = 0;
>  
>  	/* report resume to the driver, serial.c does not support this */
> -	if (udc->driver->resume)
> +	if (udc->driver && udc->driver->resume)
>  		udc->driver->resume(&udc->gadget);
>  }
>  
> -- 
> 1.7.7.5
> 
> 
> 
> --
> Scanned by MailScanner.
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- 

Best Regards,
Peter Chen


      reply	other threads:[~2012-01-13  1:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11  8:46 [PATCH] usb/gadget/fsl_udc_core.c: fix oops on resume Michael Thalmeier
2012-01-13  1:35 ` 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=20120113013508.GA19288@nchen-desktop \
    --to=peter.chen@freescale.com \
    --cc=balbi@ti.com \
    --cc=leoli@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=michael.thalmeier@hale.at \
    --cc=michael@thalmeier.at \
    /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).