lkml.org 
[lkml]   [2011]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] usb otg: use atomic notifier instead of blocking notifier
Hi,

On Wed, Jan 19, 2011 at 11:18:49PM +0800, Ming Lei wrote:
> 2011/1/19 Yang Ruirui <ruirui.r.yang@tieto.com>:
> > [   28.990997] [<c00326a0>] (unwind_backtrace+0x0/0xec) from [<c007a39c>] (print_usage_bug+0x170/0x1b4)
> > [   29.007293] [<c007a39c>] (print_usage_bug+0x170/0x1b4) from [<c007a738>] (mark_lock+0x358/0x628)
> > [   29.019836] [<c007a738>] (mark_lock+0x358/0x628) from [<c007c118>] (__lock_acquire+0x554/0x1730)
> > [   29.032409] [<c007c118>] (__lock_acquire+0x554/0x1730) from [<c007d354>] (lock_acquire+0x60/0x74)
> > [   29.045166] [<c007d354>] (lock_acquire+0x60/0x74) from [<c037e6d8>] (down_read+0x48/0x5c)
> > [   29.057250] [<c037e6d8>] (down_read+0x48/0x5c) from [<c0070770>] (__blocking_notifier_call_chain+0x2c/0x5c)
> > [   29.074920] [<c0070770>] (__blocking_notifier_call_chain+0x2c/0x5c) from [<c00707b4>] (blocking_notifier_call_chain+0x14/0x18)
> > [   29.094573] [<c00707b4>] (blocking_notifier_call_chain+0x14/0x18) from [<c02784d8>] (musb_gadget_vbus_draw+0x38/0x60)
>
> I am a little confused, why is blocking_notifier_call_chain called from
> musb_gadget_vbus_draw? See source code of musb_gadget_vbus_draw:
>
> 1587 static int musb_gadget_vbus_draw(struct usb_gadget *gadget, unsigned mA)
> 1588 {
> 1589 struct musb *musb = gadget_to_musb(gadget);
> 1590
> 1591 if (!musb->xceiv->set_power)
> 1592 return -EOPNOTSUPP;
> 1593 return otg_set_power(musb->xceiv, mA);
> 1594 }

that's easy to guess since commit log says it's a problem on Meego
kernel.

> Are you sure the issue can be reproduced in 2.6.37 or -next tree?
>
> In mainline code(2.6.37), blocking_notifier_call_chain is only called in
> threaded irq handler of otg driver wrt. musb driver, so seems enough.

true, but seems like Nokia is using to notify gadget states, which makes
a lot of sense when you start thinking about things such as battery
charging.

--
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-01-19 16:33    [W:0.123 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site