From: "Pali Rohár" <pali.rohar@gmail.com>
To: balbi@ti.com
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Pavel Machek <pavel@ucw.cz>, Aaro Koskinen <aaro.koskinen@iki.fi>,
freemangordon@abv.bg, Sebastian Reichel <sre@ring0.de>
Subject: Re: BUG: usb: obex in g_nokia.ko causing kernel panic
Date: Wed, 27 Nov 2013 17:40:42 +0100 [thread overview]
Message-ID: <201311271740.42913@pali> (raw)
In-Reply-To: <20131126190311.GC24310@saruman.home>
[-- Attachment #1: Type: Text/Plain, Size: 3470 bytes --]
On Tuesday 26 November 2013 20:03:11 Felipe Balbi wrote:
> Hi,
>
> On Tue, Nov 26, 2013 at 12:59:13PM -0600, Felipe Balbi wrote:
> > > > diff --git a/drivers/usb/gadget/f_obex.c
> > > > b/drivers/usb/gadget/f_obex.c index ad39f1d..4af2f06
> > > > 100644 --- a/drivers/usb/gadget/f_obex.c
> > > > +++ b/drivers/usb/gadget/f_obex.c
> > > > @@ -267,10 +267,12 @@ static void obex_connect(struct
> > > > gserial *g) if (!obex->can_activate)
> > > >
> > > > return;
> > > >
> > > > +#if 0
> > > >
> > > > status = usb_function_activate(&g->func);
> > > > if (status)
> > > >
> > > > DBG(cdev, "obex ttyGS%d function activate --> %d\n",
> > > >
> > > > obex->port_num, status);
> > > >
> > > > +#endif
> > > >
> > > > }
> > > >
> > > > static void obex_disconnect(struct gserial *g)
> > > >
> > > > @@ -282,10 +284,12 @@ static void obex_disconnect(struct
> > > > gserial *g) if (!obex->can_activate)
> > > >
> > > > return;
> > > >
> > > > +#if 0
> > > >
> > > > status = usb_function_deactivate(&g->func);
> > > > if (status)
> > > >
> > > > DBG(cdev, "obex ttyGS%d function deactivate -->
> > > > %d\n",
> > > >
> > > > obex->port_num, status);
> > > >
> > > > +#endif
> > > >
> > > > }
> > > >
> > > > /*-----------------------------------------------------
> > > > ------
> > > >
> > > > --------------*/ @@ -372,6 +376,7 @@ static int
> > > > obex_bind(struct usb_configuration *c, struct
> > > > usb_function *f) if (status)
> > > >
> > > > goto fail;
> > > >
> > > > +#if 0
> > > >
> > > > /* Avoid letting this gadget enumerate until the
> > > > userspace
> > > >
> > > > * OBEX server is active.
> > > > */
> > > >
> > > > @@ -381,6 +386,7 @@ static int obex_bind(struct
> > > > usb_configuration *c, struct usb_function *f)
> > > > obex->port_num, status);
> > > >
> > > > else
> > > >
> > > > obex->can_activate = true;
> > > >
> > > > +#endif
> > > >
> > > > DBG(cdev, "obex ttyGS%d: %s speed IN/%s OUT/%s\n",
> > >
> > > Hi, with above patch g_nokia.ko working and not crashing.
> >
> > yeah, makes sense. We shouldn't call phy operations in
> > atomic context. I'll see how easy it would be to fix that.
> > Real patch coming soon(-ish).
>
> I think we could send diff below for the -rc cycle and figure
> out a better to handle this for the merge window. Can you
> check if it also works with patch below ?
>
> diff --git a/drivers/usb/musb/omap2430.c
> b/drivers/usb/musb/omap2430.c index 2a408cd..8aa59a2 100644
> --- a/drivers/usb/musb/omap2430.c
> +++ b/drivers/usb/musb/omap2430.c
> @@ -659,7 +659,6 @@ static int omap2430_runtime_suspend(struct
> device *dev) OTG_INTERFSEL);
>
> omap2430_low_level_exit(musb);
> - phy_power_off(musb->phy);
> }
>
> return 0;
> @@ -674,7 +673,6 @@ static int omap2430_runtime_resume(struct
> device *dev) omap2430_low_level_init(musb);
> musb_writel(musb->mregs, OTG_INTERFSEL,
> musb->context.otg_interfsel);
> - phy_power_on(musb->phy);
> }
>
> return 0;
Hi, I applied similar patch (commented usb_phy_set_suspend
instead phy_power_on/off) on 3.12-rc5 and it working too, no
crash. I do not have rebased n900 patches on top of 3.13 tree, so
I cannot check it. But I think phy_power_on/off doing same as
usb_phy_set_suspend in 3.12.
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2013-11-27 16:40 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-19 10:51 BUG: usb: obex in g_nokia.ko causing kernel panic Pali Rohár
2013-11-26 17:10 ` Pali Rohár
2013-11-26 17:17 ` Sebastian Reichel
2013-11-26 17:30 ` Pali Rohár
2013-11-26 18:06 ` Pavel Machek
2013-11-26 18:10 ` Felipe Balbi
2013-11-26 17:16 ` Felipe Balbi
2013-11-26 17:28 ` Pali Rohár
2013-11-26 17:39 ` Felipe Balbi
2013-11-26 18:10 ` Pali Rohár
2013-11-26 18:59 ` Felipe Balbi
2013-11-26 19:03 ` Felipe Balbi
2013-11-27 16:40 ` Pali Rohár [this message]
2013-11-27 17:39 ` Felipe Balbi
2014-01-09 14:17 ` Pali Rohár
2014-01-26 22:06 ` Pali Rohár
2014-02-05 22:25 ` Ivaylo Dimitrov
2014-02-05 23:06 ` Greg Kroah-Hartman
2014-02-06 19:25 ` [PATCH] usb: musb: Fix " Ivaylo Dimitrov
2014-02-06 19:33 ` Greg KH
2014-03-22 0:45 ` Rabin Vincent
2014-04-15 21:37 ` Pavel Machek
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=201311271740.42913@pali \
--to=pali.rohar@gmail.com \
--cc=aaro.koskinen@iki.fi \
--cc=balbi@ti.com \
--cc=freemangordon@abv.bg \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=sre@ring0.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.