Re: Problem with loopback configuration in testusb.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 25, 2013 at 03:52:43PM +0100, humanshu bhatia wrote:
> Hello,
Hi,

> I am new to linux device driver I am performing usb test on Netchip PLX
> 3380 card by using testusb.
3380 is currently out of tree.

> All test are running fine so far with sudo ./testusb -D
> /proc/bus/usb/001/010 -a.
> 
> But when I tried with loopback configuration in g_zero it is not running
> fine and giving below output:
> *Case 1*
> use_dma´=0 also in    sudo modprobe usb3380 use_dma=0  and Sudo insmod
> g_zero.ko loopdefault=1 in this case after write request ..read request hang
> 
> sudo ./testusb -D /proc/bus/usb/001/010 -t 1 -c1 -s1024  ( *Write *test
> with loopback enabled )
> 
> *Output*:  unknown speed /proc/bus/usb/001/010
>             unknown speed /proc/bus/usb/001/010 test 1, 0.000181 secs
> 
> sudo ./testusb -D /proc/bus/usb/001/010 -t 2 -c1 -s1024  ( *Read *test with
> loopback enabled )
> 
> *Output*: Hang
> .
> 
> 
> *Case 2*
>   sudo modprobe usb3380 and Sudo insmod g_zero.ko loopdefault=1
> 
> And after that when I try run below test it give me this error
> 
> sudo ./testusb -D /proc/bus/usb/001/010 -t 1 -c1 -s1024  ( *Write *test
> with loopback enabled )
> 
> *Output*:  unknown speed /proc/bus/usb/001/010
>             unknown speed /proc/bus/usb/001/010 test 1, 0.000181 secs

This is not an error message. "unknown speed" because it does not know that it
runs at super speed I guess. Test 1 completed. That looks okay.

> 
> sudo ./testusb -D /proc/bus/usb/001/010 -t 2 -c1 -s1024  ( *Read *test with
> loopback enabled )
> 
> *Output*: [16188.451455] usb 1-4 : test2 failed, iterations left 0 , status
> -121 (not 0)
> /proc/bus/usb/001/010 test 2 --> 121 (Remote I/O error)
> 
> But sometimes read test in loopback enabled runs fine but I want
> consistentency in test why sometimes read fails and give above output.
> In case of success of read it gives below output
> 
> *Output*:  unknown speed /proc/bus/usb/001/010
>             unknown speed /proc/bus/usb/001/010 test 1, 0.000181 secs

I *think* hat the parameter loopdefault=1 should make no difference for the
tests but I might be wrong.
Could you try to run your test against dummy_hcd ? It is an UDC emulator. If
that one works "perfectly" and your 3380 still make problems then I would say
the driver for the 3380 has room for improvement _or_ is buggy :)

It is very hard to give any kind of advice except to take a look at your 3380
driver. If it works sometimes and sometimes it does not then it looks like a
race condition in the driver.
Maybe "dmesg" on the gadget side (where 3380 is loaded) might print an error
message.

> Please tell me where I am doing wrong.
> I shall  be highly thankful to you.
> 
> Thanks & Regards,
> Humanshu

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux