On Friday 30 March 2007 11:10 am, Felipe Balbi wrote:
> Hello all,
> 
> I'm trying to run testusb on a tusb6010 device to test it's host mode
> functionalities. I compiled the latest linux-omap gittree and enabled
> the OTG mode.
> 
> I'm setting it to host mode by echoing "host" to
> /sys/devices/platform/musb_hdrc/mode.

That patch isn't in linux-omap GIT ... 


> Here's my scenario:
> 1. 1 TUSB6010 set to host mode;
> 2. 2 Mini-b <-> A cable
> 3. 1 female <-> female USB-A cable;

As opposed to a Mini-A to Mini-B cable, or a
Mini-A to A adapter plus a standard A-to-MiniB cable?

> 4. 1 OMAP H2 running as gadget zero; (the testing device)

There are some omap_udc patches that haven't yet been pulled
down from kernel.org ... i.e. 2.6.21-rc5 has them, but not
the 2.6.21-rc4-omap1 code.

> 5. 1 selfpowered USB 2.0 HUB;
> 6. 1 Mass storage device to copy the testusb binary to device's /tmp;
> 
> 
> My procedure:
> 1. Turn on TUSB6010;
> 2. Set it to host mode;
> 3. plug the mini-b <-> A cable to the USB HUB
> 4. plug the mass storage device to the hub
> 5. copy testusb binary to device's /tmp
> 6. mount usbfs on /proc/bus/usb
> 7. run ./testusb -a
> 
> 
> Results:
> I ran two tests, either gave me different error messages...
> 
> 
> TEST #1
> RESULTS:
> /proc/bus/usb/001/004 test 0 --> 25 (error 25)
> 
> /proc/bus/usb/001/004 test 1 --> 25 (error 25)
> 
> ...

ENOTTY == 25 so I'm guessing "usbtest" hadn't yet
bound to that device.  Maybe you're using ancient
versions of /sbin/hotplug?  See if it includes
something like:

if [ "$ACTION" = "add" -a -n "$MODALIAS" -a ! -L /sys/$DEVPATH/driver ]
then
        modprobe -q $MODALIAS
fi

before it talks to udev.
 
> 
> TEST #2
> RESULTS:
> unknown speed   /proc/bus/usb/001/005
> 
> /proc/bus/usb/001/005 test 0 --> 113 (error 113)
> 
> /proc/bus/usb/001/005 test 1 --> 113 (error 113)
> 
> ...

Where EHOSTUNREACH == 113 which suggests the device is
suspended.  It could be that you need more of the usb
updates ... I don't know if that RC4 version has the
relevant "autoresume" updates.


All I can say is that the last time I tested musb_hdrc
against omap_udc it worked just fine.  That involved
the omap_udc patch referenced above, and didn't involve
the patch adding "mode selection" ... it was using the
cable based role switching (based on ID pin sensing).

When I get a chance I'll try that on an H4 + TUSB setup
with the latest patches.


> When I ran the same tests with my PC I've got better error messages:
> take a look:
> 
> /testusb -D /proc/bus/usb/005/022
> unknown speed   /proc/bus/usb/.usbfs/005/022
> unknown speed   /proc/bus/usb/005/022
> /proc/bus/usb/005/022 test 0,    0.000006 secs
> /proc/bus/usb/005/022 test 1,    0.912152 secs
> /proc/bus/usb/005/022 test 2,    0.717221 secs
> /proc/bus/usb/005/022 test 3,    0.888688 secs
> /proc/bus/usb/005/022 test 4,    0.535915 secs
> /proc/bus/usb/005/022 test 5,   26.124402 secs
> /proc/bus/usb/005/022 test 6,   15.757709 secs
> /proc/bus/usb/005/022 test 7,   26.113765 secs
> /proc/bus/usb/005/022 test 8,   16.130992 secs
> /proc/bus/usb/005/022 test 9,    2.161058 secs
> /proc/bus/usb/005/022 test 10,    4.366335 secs
> /proc/bus/usb/005/022 test 11,   16.029610 secs
> /proc/bus/usb/005/022 test 12,   16.001989 secs

All seems fine ...

> /proc/bus/usb/005/022 test 13 --> 32 (Broken pipe)

ISTR test #13 is ISO, so it shouldn't work with gadget zero.


> /proc/bus/usb/005/022 test 14 --> 22 (Invalid argument)

Use the test script you found on the "usbtest" webpage,
it passes a better set of parameters to test #14 ... the
default parameters don't work with that test on gadget zero.
(Which is fine, since all tests use the same default values.
There's no reason to think they wouuld always work.)

- Dave


> 
> 
> What could I do to make this tests work ??
> Thank you all...
> 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to