Re: [PATCH] usb otg: use atomic notifier instead of blocking notifier

From: Yang Ruirui
Date: Wed Jan 19 2011 - 20:58:56 EST


On Wed, Jan 19, 2011 at 12:40:32PM +0200, Felipe Balbi wrote:
> hi,
>
> On Wed, Jan 19, 2011 at 05:20:11PM +0800, Yang Ruirui wrote:
> >
> > following bug happens with meego 2.6.35 kernel on nokia n900:
>
> <snip>
>
> > Actually the blocking notifier chain runs in process context, so not fit for use here.
> >
> > For mainline kernel there's such issue as well.
> > Here fix this problem by changing to use atomic_notifier.
> >
> > Signed-off-by: Yang Ruirui <ruirui.r.yang@xxxxxxxxx>
> > ---
> > drivers/usb/otg/ab8500-usb.c | 6 +++---
> > drivers/usb/otg/twl4030-usb.c | 6 +++---
> > drivers/usb/otg/twl6030-usb.c | 6 +++---
>
> you're missing the other transceivers:
> drivers/usb/otg/langwell_otg.c
> drivers/usb/otg/msm72k_otg.c
> drivers/usb/otg/gpio_vbus.c
> drivers/usb/otg/nop-usb-xceiv.c
> drivers/usb/otg/ulpi.c
> drivers/usb/otg/isp1301_omap.c

Hi, thanks

Actually I does not found where notifiers are used in these files except
langwell_otg

For langwell_otg.c there's a wrapper struct named "intel mid_otg_xceiv"
in include/linux/usb/intel_mid_otg.h, it use an atomic notifier for
interrupt context.

So I think we'd better write another patch to make it use general
otg_transceiver for notifier or just keep current code. What's your opinion?

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