public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Tomoya MORINAGA <tomoya.rohm@gmail.com>
Cc: Felipe Balbi <balbi@ti.com>, Greg Kroah-Hartman <gregkh@suse.de>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	qi.wang@intel.com, yong.y.wang@intel.com, joel.clark@intel.com,
	kok.howg.ewe@intel.com
Subject: Re: [PATCH 1/6 v2] usb/gadget/pch_udc: Fix disconnect issue
Date: Thu, 12 Jan 2012 16:12:25 +0400	[thread overview]
Message-ID: <4F0ECE29.3060109@mvista.com> (raw)
In-Reply-To: <1326335230-32469-1-git-send-email-tomoya.rohm@gmail.com>

Hello.

On 12-01-2012 6:27, Tomoya MORINAGA wrote:

> ISSUE:
> When the driver notifies a gadget of a disconnect event, a system rarely freezes.

> CAUSE:
> When the driver calls dev->driver->disconnect(), it is not calling spinlock().

    spin_unlock(), you mean?

> Signed-off-by: Tomoya MORINAGA<tomoya.rohm@gmail.com>
> ---
> V2: Divide into 6 patches
> ---
>   drivers/usb/gadget/pch_udc.c |    5 ++++-
>   1 files changed, 4 insertions(+), 1 deletions(-)

> diff --git a/drivers/usb/gadget/pch_udc.c b/drivers/usb/gadget/pch_udc.c
> index f222659..a4f8b08 100644
> --- a/drivers/usb/gadget/pch_udc.c
> +++ b/drivers/usb/gadget/pch_udc.c
> @@ -2340,8 +2340,11 @@ static void pch_udc_svc_ur_interrupt(struct pch_udc_dev *dev)
>   		/* Complete request queue */
>   		empty_req_queue(ep);
>   	}
> -	if (dev->driver&&  dev->driver->disconnect)
> +	if (dev->driver&&  dev->driver->disconnect) {
> +		spin_unlock(&dev->lock);
>   		dev->driver->disconnect(&dev->gadget);
> +		spin_lock(&dev->lock);
> +	}

WBR, Sergei

  parent reply	other threads:[~2012-01-12 12:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12  2:27 [PATCH 1/6 v2] usb/gadget/pch_udc: Fix disconnect issue Tomoya MORINAGA
2012-01-12  2:27 ` [PATCH 2/6 v2] usb/gadget/pch_udc: Fix wrong return value Tomoya MORINAGA
2012-01-12  2:27 ` [PATCH 3/6 v2] usb/gadget/pch_udc: Fix USB suspend issue Tomoya MORINAGA
2012-01-12  2:27 ` [PATCH 4/6 v2] usb/gadget/pch_udc: Fix usb/gadget/pch_udc: Fix ether gadget connect/disconnect issue Tomoya MORINAGA
2012-01-12  2:27 ` [PATCH 5/6 v2] usb/gadget/pch_udc: Reduce redundant interrupt Tomoya MORINAGA
2012-01-12  2:27 ` [PATCH 6/6 v2] usb/gadget/pch_udc: Add debug message Tomoya MORINAGA
2012-01-12 12:12 ` Sergei Shtylyov [this message]
2012-01-13  4:12   ` [PATCH 1/6 v2] usb/gadget/pch_udc: Fix disconnect issue Tomoya MORINAGA
2012-01-24  9:39 ` Felipe Balbi

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=4F0ECE29.3060109@mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=balbi@ti.com \
    --cc=gregkh@suse.de \
    --cc=joel.clark@intel.com \
    --cc=kok.howg.ewe@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=qi.wang@intel.com \
    --cc=tomoya.rohm@gmail.com \
    --cc=yong.y.wang@intel.com \
    /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