public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <me@felipebalbi.com>
To: Kevin Hilman <khilman@mvista.com>,
	Linux omap <linux-omap@vger.kernel.org>
Subject: RE: OMAP3430: MUSB host and hot-plugging
Date: Thu, 20 Mar 2008 07:27:41 -0500	[thread overview]
Message-ID: <07bc925acf89140a399f27449dc0f68b@felipebalbi.com> (raw)

> Using the default config omap_3430sdp_defconig, I'm doing some basic
> hot-plug tests of MUSB in host mode.
> 
> I noticed that after booting, the first time I connect my USB key, it
> is detected just fine, the usb/scsi storage modulesare loaded by
> hotplug and I can access the device just fine.
> 
> I then remove the key, and the kernel seems to detect the removal just
> fine, and does what seems to be a clean shutdown.
> 
> However, if I then plug the key back in, nothing happens.  
> 
> Forcing a session start via "echo 'F' > /proc/driver/musb_hdrc" causes
> the device to be (re)detected and things look good again.  It is not
> until I force the session start that I see the interrupt and the
> CONNECT event.
> 
> Any ideas why this isn't detected on insertion?

You're better than me then, I can't get even the first insertion
right.

What I'm suspecting is that we do get the insertion but twl4030
do not notify musb about id pin status through ULPI.

You can check that cuz you still in b_idle state even though
you have a mini-A connector attached to it. Also, if you put a
printk in the irq handler (on twl4030-usb.c) you can see it
gets called after attaching the cable.

And there's one other trick, after switching to host role,
you see that you're in a_host from /sys/devices/platform/musb_hdrc.0/mode,
if you remove the cable (mini-A) and attach it again right
after that, before musb_do_idle put musb in b_idle again,
you get the usb stick recognized and musb_core goes back
to a_host from a_wait_bcon state.

I'm suspecting that twl4030_phy_suspend is somehow
messing it up. I'm now digging on it and still
I can't say for sure what's happening.

Maybe somebody else has other comments on that.

-- 
Best Regards,

Felipe Balbi
http://felipebalbi.com
me@felipebalbi.com


             reply	other threads:[~2008-03-20 12:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-20 12:27 Felipe Balbi [this message]
2008-03-20 12:34 ` OMAP3430: MUSB host and hot-plugging Pandita, Vikram
2008-03-20 12:38   ` Felipe Balbi
2008-03-20 12:47     ` Pandita, Vikram
2008-03-20 12:55       ` Felipe Balbi
2008-03-20 17:11       ` Kevin Hilman
2008-03-20 18:57         ` Felipe Balbi
  -- strict thread matches above, loose matches on Subject: below --
2008-03-20  0:14 Kevin Hilman
2008-03-20 19:30 ` David Brownell
2008-03-20 20:00   ` Felipe Balbi
2008-03-20 20:25     ` David Brownell
2008-03-20 20:48       ` Felipe Balbi
2008-03-24  9:27       ` Pandita, Vikram

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=07bc925acf89140a399f27449dc0f68b@felipebalbi.com \
    --to=me@felipebalbi.com \
    --cc=khilman@mvista.com \
    --cc=linux-omap@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