Anyone know of hotplugging issues with this version of the kernel? I'm trying to get hotplugging working with gadget Ethernet. I have the USB driver, including the gadget drivers built as modules. The gadget Ethernet does work. However, I can only get hotplug events when I manually install/uninstall the USB modules. I have tried building the drivers into the kernel, but get the same result. I've haven't found any patches for newer kernel versions that address this issue. Any ideas?
I assume this is with respect to OMAP3530 since your previous post was related to OMAP3530. It's a good practice to always include that info in a new thread.
I've seen similar behavior even with later kernels. Can you do something like this:
Are you building the kernel with OTG support turned on? The behavior I saw was definitely with OTG support enabled. It may have behaved different when I just built it as a straight-up host or device (sorry, it was several months ago!).
Do you need to support both host and device modes? If not, which one do you need? Can you attach your kernel config (please don't copy/paste into the editor!).
Brad
---------------------------------------------------------------------------------------------------------
Please click the Verify Answer button on this post if it answers your question.---------------------------------------------------------------------------------------------------------
Duh, sorry, I just noticed that the subject says OMAP3530!
In the sequence you listed, I only get hotplug events when insmod g_ether module (and musb_hdrc module which is a dependency for g_ether) and rmmod g_ether & musb_hdrc modules. I do NOT get any hotplug event when plugging device into or removing from host PC via USB cable).
Attached is the
4213.hpdbg_rmmod.log
Attached is an archive of all the files mentioned in the previous post. I didn't realize forum only allows one file per post.
3660.hotplugging.zip
Found this post indicating that hot plug is not functional in musb driver in kernel ver 2.6.31, but may be fixed in 2.6.33
http://gumstix.8.n6.nabble.com/USB-OTG-not-working-as-host-td662224.html
On Thu, Jan 7, 2010 at 12:46 PM, zachlac <[hidden email]> wrote: > > I'd like to have two free USB ports, the normal Host port and the OTG port as > a second host port. The first host port works properly, but when I plug a > slave device into the OTG port, nothing happens. No messages on dmesg. > It's configured in the kernel as Host through the linux-omap3-2.6.31.bb > recipe. Is there a module I need to load? I'm using the Overo Water with > the Tobi board. On the musb (OTG) port devices must be plugged in at boot time to be recognized -- hot plug is not yet functional. I believe that this should be fixed in the 2.6.33 musb driver, but I haven't verified that yet. Steve
That's a good find. I'm going to move this thread over to our Linux forum so we can get some commentary from the USB developers.
FYI, I'm still trying to get this in front of the right person.
David,
musb controller while in OTG mode is known to switch of the SESSION when the device is disconnected and later reconnecting the device would not get detected on their own. One has to restart the session using either of below command available in particular kernel version:
1) echo F > /proc/driver/musb_hdrc
2) echo 1 > /sys/platform/devices/musb_hdrc/srp
We have created a patch to resolve the same for v2.6.37 based TI PSP 04.02.00.07 release available at http://arago-project.org/git/projects/?p=linux-omap3.git;a=shortlog;h=refs/heads/OMAPPSP_04.02.00.07.
The patch is attached here:
3252.0001-usb-musb-omap-auto-vbus-control-across-host-and-devi.patch.txt
This patch would not apply on v2.6.27 as there have been lot of changes in musb driver in v2.6.37.
Ajay
If my reply answers your question then please click on the green button "Verify Answer"
Thanks for the response Ajay. My only concern is I don't get a hot plug event when the device is initially connected. I only get hot plug events when the driver is installed and uninstalled. Does this work around cause a hot plug event for initial device connection?
Yes, this patch will help.
Ajay,
One of my customers is facing a similar issue, summary of the problem is captured below:
---
We need to get hot-plug event with AM37x EVM as USB Gadget. There is requirement to mount/unmount encrypted file system (dm-crypt) in USB Mass Storage mode on the USB Plugin/out events.
We do NOT get any hotplug event when plugging device into or removing from host PC via USB cable).
Attached is the:
They have also tried the patch, enabling the OTG, mentioned in this link but no difference observed in behavior. Can you help?
Thanks.
Best Regards,
Anuj Aggarwal
Hi,
I have tried a patch for the usb connection detection and it is working in android.
The following sysfs entry is changed whenever a host/peripheral connected
/sys/devices/platform/musb-omap2430.0/musb-hdrc.0/mode
In kernel, whenever the sysfs entry is changed we pass a uevent with this patch
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.cindex efef5ff..2c240e1 100644--- a/drivers/usb/musb/musb_core.c+++ b/drivers/usb/musb/musb_core.c@@ -1894,6 +1894,7 @@ static void musb_irq_work(struct work_struct *data) if (musb->xceiv->state != old_state) { old_state = musb->xceiv->state; sysfs_notify(&musb->controller->kobj, NULL, "mode");+ kobject_uevent(&musb->controller->kobj, KOBJ_CHANGE); } }
The android vold (volume deamon) service listen to this uevent notification and does the required things. The android patch is available at
http://gitorious.org/rowboat/system-vold/commit/ea55061d003609eecafd26e62ea4e8786f3866df
Regards,
Arun
If this post answers your query, consider clicking the Verify Answer button.