linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Odd behavior in musb_hdrc OTG if gadget drivers are modules
@ 2009-01-22 21:46 david.hagood
  2009-02-25 21:17 ` Felipe Balbi
  0 siblings, 1 reply; 2+ messages in thread
From: david.hagood @ 2009-01-22 21:46 UTC (permalink / raw)
  To: linux-omap, linux-kernel

I've spend the day tracking down a weird behavior on a Beagleboard with
2.6.29-rc2-omap1.

If you select the mode for the musb to operate in OnTheGo mode
(CONFIG_USB_MUSB_OTG), and if you compile the gadget drivers as modules,
the the USB port will NOT be brought up at system boot, even if it has a
USB mini-A cable plugged in (and thus should be in host mode, not gadget
mode).

If you then modprobe an appropriate gadget driver, then the interface will
be brought up in host mode.

If you DON'T modprobe a gadget driver, AND you attempt to force the port
to host mode by
  echo host > /sys/devices/platform/musb_hdrc/mode

Then we get a kernel page fault trying to change modes, even though we are
changing to host mode, which should be valid.

It seems to me that either the port should be brought up in host mode if
no gadget drivers are loaded, and an attempt to switch to gadget mode
should fail if no driver is loaded, OR there should be a config options to
set what the default gadget driver is in the absence of one being loaded
by the system.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Odd behavior in musb_hdrc OTG if gadget drivers are modules
  2009-01-22 21:46 Odd behavior in musb_hdrc OTG if gadget drivers are modules david.hagood
@ 2009-02-25 21:17 ` Felipe Balbi
  0 siblings, 0 replies; 2+ messages in thread
From: Felipe Balbi @ 2009-02-25 21:17 UTC (permalink / raw)
  To: david.hagood; +Cc: linux-omap, linux-kernel

On Thu, Jan 22, 2009 at 03:46:28PM -0600, david.hagood@gmail.com wrote:
> I've spend the day tracking down a weird behavior on a Beagleboard with
> 2.6.29-rc2-omap1.
> 
> If you select the mode for the musb to operate in OnTheGo mode
> (CONFIG_USB_MUSB_OTG), and if you compile the gadget drivers as modules,
> the the USB port will NOT be brought up at system boot, even if it has a
> USB mini-A cable plugged in (and thus should be in host mode, not gadget
> mode).
> 
> If you then modprobe an appropriate gadget driver, then the interface will
> be brought up in host mode.

that's expected. When you have otg selected, you can only let musb work
when it's fully functional on both roles ;-)

> If you DON'T modprobe a gadget driver, AND you attempt to force the port
> to host mode by
>   echo host > /sys/devices/platform/musb_hdrc/mode
> 
> Then we get a kernel page fault trying to change modes, even though we are
> changing to host mode, which should be valid.
> 
> It seems to me that either the port should be brought up in host mode if
> no gadget drivers are loaded, and an attempt to switch to gadget mode
> should fail if no driver is loaded, OR there should be a config options to
> set what the default gadget driver is in the absence of one being loaded
> by the system.

not really, imagine what would happen, for example, if when you don't
have a gadget driver loaded, the other side tries HNP...

-- 
balbi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-25 21:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-22 21:46 Odd behavior in musb_hdrc OTG if gadget drivers are modules david.hagood
2009-02-25 21:17 ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).