Issue with USB OTG


Loonie

Active Member
Joined
Apr 1, 2003
Messages
753
Hey all.


Think I've found a problem with the USB OTG. When I fresh-boot the Pandora, I can plug in a suitable adapter and use a mouse or other peripheral as expected.


If I flick the power switch to put the Pandora into its standby mode thingy, when I power it back on again, the port no longer works. I need to reboot the system to get it working again.


I think when the unit comes out of standby it doesn't reenable the USB OTG port.


Edit: I forgot to ask if one of the gurus such as Notaz knew of a terminal command that will reenable it, so at least a reboot can be avoided.
 
Last edited by a moderator:
Those USB drivers (both host and OTG) are always problematic, maybe try something like



Code:
sudo rmmod g_cdc

sudo modprobe g_cdc

instead of reboot.
 
Cool. The first command gave me an error:

ERROR: Module g_cdc does not exist in /proc/modules

But the second command gave me my mouse back. Yay.


Thanks, Notaz.
 
That's weird, because it's supposed to be handled by op_power.sh.


Can you just test after boot, when your mouse is enabled if lsmod lists the g_cdc module ?


Notaz, this is what i did on op_power.sh for my Slackware, because i wasn't happy the way the modules reload were handled:



Code:
for mod in $modules; do

  if echo $blacklist | grep -q "\<$mod\>"; then

   restore_list="$restore_list $mod"

   echo $restore_list > /tmp/restore_list

   rmmod $mod

   delay=1 # enough?

  fi

done





Code:
if [ -n "$restore_list" ]; then

  for modrestore in `cat /tmp/restore_list`;do

  modprobe $modrestore

  done

  rm /tmp/restore_list

fi
 
Well i did it for debug, and it worked... ^^.


How would you proceed ? Keep the file in ram ? Or some magic ^^ ?
 
Okay. After booting and doing an lsmod in the console, the g_cdc module is in the list.


If I put the Pandora into standby then turn back on again, the mouse has stopped working and the g_cdc module is not listed with lsmod.


If I then type "sudo modprobe g_cdc", the mouse functionality is restored, and g_cdc reappears in the lsmod list at the top.


One subsequent observation - it seems that once I've executed the modprobe command, the USB port comes back after bringing the Pandora out of standby. I don't need to modprobe it again until a subsequent reboot. I'll test this further though.
 
No need, the bug has been clearly identified.


I corrected it in Slackware (the 14.0 has a slightly modified module loading behavior) and didn't reported because i thought Zaxxon wasn't affected.
 
Hi everybody,


Thanks to this topic, my pandora is perfect with USB! really thanks.


Just FYI I have edited the op_power.sh like this, without saving the mods to a file, and it also seems working fine.



Code:
	    # if we are here, either we already resumed or the suspend failed

	    if [ -n "$restore_list" ]; then

			    for mod in $restore_list ; do

					    modprobe $mod

			    done

	    fi
 
Back
Top