I am trying to use the program usbstress by Tom Sailer on an
EzUSB development board (Anchor Chip AN2131Q), for which
that program was written. This allows downloading a stress test
program to test the board - it uses user space calls via the usbdevfs.
I always get a broken pipe error message, details are below.
When I subscribed to this list I caught part of a thread about
stalls, but this seemed to apply to ohci, I am using uhci.
Thanks for any help,
Chip Grandits
Digilent Enterprises
DETAILS:
I have compiled the 2.3.99pre1 kernel, with a patch to usb-uhci.c
supplied to this list from Randy Dunlap. It's configured with
usb support and usb preliminary file system support.
I have compiled the usbstess program by Thomas Sailer that I
heard about from this list. (I did have to omit a 'march=i386'
compiler option from the makefile to get it to make, since my version of
gcc, 2.72, doesn't recognize it)
I have an Intel Chipset and have selected uhci support.
here is a snip from /proc/pci
Bus 0, device 4, function 2:
USB Controller: Intel Corporation 82371AB PIIX4 USB (rev 1).
IRQ 10.
I/O at 0xd400 [0xd41f].
I can mount usbdevfs.
#cat /proc/bus/usb/drivers
hub
usbdevfs
(however on bootup I get an error message that the shared memory file
system (shm) could not be mounted - I'm not sure if this is relevant?)
I can download Tom Sailer's stresstest firmware to the EzUSB 8051 Core:
#./usbstress -b1 -d2 -f
I can verify this worked by:
#cat /proc/bus/usb/devices
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 17/900 us ( 2%), #Int= 1, #Iso= 0
D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 0.00
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 1.00 Cls=ff(vend.) Sub=00 Prot=ff MxPS=64 #Cfgs= 1
P: Vendor=1234 ProdID=5678 Rev= 0.02
S: Manufacturer=Thomas Sailer
S: Product=USB Stresstest
S: SerialNumber=000001
C:* #Ifs= 6 Cfg#= 1 Atr=40 MxPwr=200mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=00 Prot=ff Driver=(none)
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl= 0ms
I: If#= 0 Alt= 1 #EPs= 1 Cls=ff(vend.) Sub=00 Prot=ff Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl= 10ms
I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=ff Driver=(none)
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl= 0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl= 0ms
I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=ff Driver=(none)
E: Ad=84(I) Atr=02(Bulk) MxPS= 64 Ivl= 0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 64 Ivl= 0ms
I: If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=ff Driver=(none)
E: Ad=86(I) Atr=02(Bulk) MxPS= 64 Ivl= 0ms
E: Ad=06(O) Atr=02(Bulk) MxPS= 64 Ivl= 0ms
I: If#= 4 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=00 Prot=ff Driver=(none)
I: If#= 4 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=ff Driver=(none)
E: Ad=88(I) Atr=01(Isoc) MxPS= 496 Ivl= 1ms
E: Ad=08(O) Atr=01(Isoc) MxPS= 496 Ivl= 1ms
I: If#= 5 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=00 Prot=ff Driver=(none)
I: If#= 5 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=ff Driver=(none)
E: Ad=89(I) Atr=01(Isoc) MxPS= 16 Ivl= 1ms
E: Ad=09(O) Atr=01(Isoc) MxPS= 16 Ivl= 1ms
When I attempt to run either the control test or the bulk test
I get the following error from usbstress:
# ./usbstress -v -b1 -d2 -tc
usbstress V0.3 (C) 2000 by Thomas Sailer
Length = 18
DescriptorType = 01
USB version = 1.00
Vendor:Product = 1234:5678
MaxPacketSize0 = 64
NumConfigurations = 1
Device version = 0.02
Device Class:SubClass:Protocol = ff:00:ff
Vendor class
Control Echo test
control_msg(0xc0, 0xe0, 48) failed with -1, errno Broken pipe (32) sequence 0
Upon failure the following line is appended to kernel ring buffer
usb-uhci.c: interrupt, status 3, frame# 989
usbdevfs: USBDEVFS_CONTROL failed dev 2 rqt 192 rq 224 len 48 ret -32
(the frame number varies - the bulk test also fails, in which case rq=225 or 0xe1
instead of 224)
Upon examination with gdb I notice that this call succeeds: (usbstress/tests.c line
151)
r = usb_control_msg(dev, USB_RECIP_DEVICE|USB_TYPE_VENDOR|USB_DIR_OUT, 0xe0, 0, 0,
sizeof(buf), buf, 1000);
This subsequent call is the one that always fails (usbstress/tests.c line 157)
r = usb_control_msg(dev, USB_RECIP_DEVICE|USB_TYPE_VENDOR|USB_DIR_IN, 0xe0, 0, 0,
sizeof(bufr), bufr, 1000);
I don't know if this is of any help but after the ioctl call fails the value of the
dev pointer (as reported
by gdb) changes. It's value became 0x20, a pretty suspicious value for a pointer.
(I could no longer dereference it, according to gdb 0x20 is not in accessible memory)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]