public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: balbi@ti.com (Felipe Balbi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/3] usb: musb: Handle nullpointer
Date: Mon, 14 Oct 2013 22:07:21 -0500	[thread overview]
Message-ID: <20131015030721.GB9217@radagast> (raw)
In-Reply-To: <CADYTM3Y22roDOAu3Lo=mdD3JRa2zTLx9HaCGyAfgc+T8yK9vHg@mail.gmail.com>

On Mon, Oct 14, 2013 at 09:00:33PM -0500, Bin Liu wrote:
> On Mon, Oct 14, 2013 at 8:56 PM, Bin Liu <binmlist@gmail.com> wrote:
> > On Mon, Oct 14, 2013 at 5:49 PM, Felipe Balbi <balbi@ti.com> wrote:
> >> On Mon, Oct 14, 2013 at 03:50:37PM +0200, Markus Pargmann wrote:
> >>> When the device is connected to a host without a gadget driver,
> >>> otg->gadget is NULL.
> >>>
> >>> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> >>> ---
> >>>  drivers/usb/musb/musb_core.c | 3 ++-
> >>>  1 file changed, 2 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> >>> index 18e877f..baa4f6a 100644
> >>> --- a/drivers/usb/musb/musb_core.c
> >>> +++ b/drivers/usb/musb/musb_core.c
> >>> @@ -654,7 +654,8 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
> >>>                               break;
> >>>               case OTG_STATE_B_PERIPHERAL:
> >>
> >> why would we be in B peripheral if we're host only ? Bug seems to be
> >> else where.
> >
> > We are not host, we are in device mode.
> >
> > But I would think the proper fix should be not setting
> > DEVCTL[SOFTCONN] until a gadget driver is loaded. Then the host will
> > not see the device which does not have a gadget driver.
> 
> Sorry, I meant POWER[SOFTCONN] bit.

I agree with you and my bad that I misread commit log.

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131014/06cf6c3e/attachment.sig>

  reply	other threads:[~2013-10-15  3:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-14 13:50 [PATCH v2 0/3] usb: musb bugfixes Markus Pargmann
2013-10-14 13:50 ` [PATCH v2 1/3] usb: musb: Handle nullpointer Markus Pargmann
2013-10-14 22:49   ` Felipe Balbi
2013-10-15  1:56     ` Bin Liu
2013-10-15  2:00       ` Bin Liu
2013-10-15  3:07         ` Felipe Balbi [this message]
2013-10-14 13:50 ` [PATCH v2 2/3] usb: musb: Bugfix of_node assignment Markus Pargmann
2013-10-14 13:50 ` [PATCH v2 3/3] usb: musb: dsps, debugfs files Markus Pargmann
2013-10-14 22:50   ` 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=20131015030721.GB9217@radagast \
    --to=balbi@ti.com \
    --cc=linux-arm-kernel@lists.infradead.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