linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: balbi@ti.com
Cc: linux-omap@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH] omap2430 musb: Make musb_otg_notification non-blocking
Date: Wed, 25 Jan 2012 11:59:54 +1100	[thread overview]
Message-ID: <20120125115954.473de6e7@notabene.brown> (raw)
In-Reply-To: <20120124085610.GI27414@legolas.emea.dhcp.ti.com>

[-- Attachment #1: Type: text/plain, Size: 1881 bytes --]

On Tue, 24 Jan 2012 10:56:12 +0200 Felipe Balbi <balbi@ti.com> wrote:

> On Fri, Dec 30, 2011 at 12:36:28PM +1100, NeilBrown wrote:
> > 
> > 
> > This callback is on an 'atomic notificaitons' queue but is written
> > as a blocking notifier.
> > 
> > Convert to use a work-queue to run from non-atomic context.
> > 
> > Signed-off-by: NeilBrown <neilb@suse.de>
> 
> doesn't apply.
> 

It did 1 month ago when I sent it :-)

It seems that commit 712d8efafbbcbe617f9ad706f6ca1ffea4bbf2e8
fixed the same problem already.

The following patch adds a few little bits

Thanks,
NeilBrown



musb/omap2430 minor cleanups.

1/ remove incorrect comment (it is a non-blocking notifier)
2/ Use correct symbolic return value for notifier
3/ Make sure otg_notifier_work is cancelled before module exit.

Signed-off-by: NeilBrown <neilb@suse.de>

diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index c27bbbf..df719ea 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -222,7 +222,6 @@ static inline void omap2430_low_level_init(struct musb *musb)
 	musb_writel(musb->mregs, OTG_FORCESTDBY, l);
 }
 
-/* blocking notifier support */
 static int musb_otg_notifications(struct notifier_block *nb,
 		unsigned long event, void *unused)
 {
@@ -231,7 +230,7 @@ static int musb_otg_notifications(struct notifier_block *nb,
 	musb->xceiv_event = event;
 	schedule_work(&musb->otg_notifier_work);
 
-	return 0;
+	return NOTIFY_OK;
 }
 
 static void musb_otg_notifier_work(struct work_struct *data_notifier_work)
@@ -386,6 +385,7 @@ static void omap2430_musb_disable(struct musb *musb)
 static int omap2430_musb_exit(struct musb *musb)
 {
 	del_timer_sync(&musb_idle_timer);
+	cancel_work_sync(&musb->otg_notifier_work);
 
 	omap2430_low_level_exit(musb);
 	otg_put_transceiver(musb->xceiv);

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2012-01-25  1:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-30  1:36 [PATCH] omap2430 musb: Make musb_otg_notification non-blocking NeilBrown
2012-01-24  8:56 ` Felipe Balbi
2012-01-25  0:59   ` NeilBrown [this message]
2012-01-25  8:47     ` 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=20120125115954.473de6e7@notabene.brown \
    --to=neilb@suse.de \
    --cc=balbi@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).