[#4109] gadget zero test failed on BF527-EZKIT in 08r1 branch
Submitted By: Vivi Li
Open Date
2008-05-16 06:47:36 Close Date
2008-06-26 22:56:46
Priority:
Medium Assignee:
Bryan Wu
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
N/A Board:
N/A
Processor:
N/A Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
08r1-rc8
App binary format:
N/A
Summary: gadget zero test failed on BF527-EZKIT in 08r1 branch
Details:
Gadget zero test failed on BF527-EZKIT in 08r1 branch.
It failed when run "testusb -t5" and "testusb -t7" to test bulk OUT transfers.
--
# sudo ./src/testusb -D /proc/bus/usb/005/019 -t5
unknown speed /proc/bus/usb/005/019
/proc/bus/usb/005/019 test 5 --> 32 (Broken pipe)
# sudo ./src/testusb -D /proc/bus/usb/005/019 -t7
unknown speed /proc/bus/usb/005/019
/proc/bus/usb/005/019 test 7 --> 32 (Broken pipe)
--
Follow-ups
--- Bryan Wu 2008-05-21 00:01:28
Broken pipe message is an errno which means the host PC received the STALL from
BF527 USB peripheral.
These 2 test cases tried to send out all-zeroed BULK out packet to BF527. The
g_zero module will check the data from host. But some none zero data was found
then g_zero asked BF527 to send STALL to host. The test cases failed.
I found the none zero data always is 190 (0xBE), but it is very strange I
cannot capture this 0xBE with the Lecory USB analyzer.
And the none zero data appears randomly. If I increased the debug level to 7 of
the MUSB driver, this issue is gone.
-Bryan
--- Bryan Wu 2008-05-21 03:04:55
I also found this bug in BF548 when config BF548 musb to use PIO mode not DMA.
So this issue should relate with the PIO mode operation.
And in PIO mode, I got lots of turnaround time too long or response completely
missed error with the Lecory USB analyzer.
Is the insw and outsw problem?
-Bryan
--- Bryan Wu 2008-05-27 05:57:38
With Sonic's help, we fixed this bug. I will check in the code to branch first,
then test it on trunk and send out the patch for upstream.
--
Linux version 2.6.22.19-ADI-2008R1-svn4772 (test@adam-desktop2) (gcc version
4.1.2 (ADI svn)) #2 Tue May 27 17:55:29 CST 2008
early printk enabled on early_BFuart0
Hardware Trace Active and Enabled
Reset caused by Software reset
Blackfin support (C) 2004-2007 Analog Devices, Inc.
Compiled for ADSP-BF527 Rev 0.0
Warning: Unsupported Chip Revision ADSP-BF527 Rev 0.0 detected
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 525 MHz core clock and 131 MHz System Clock
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
text = 0x00001000-0x00107c30
rodata = 0x00108000-0x00153fcc
data = 0x00154000-0x00166000
stack = 0x00154000-0x00156000
init = 0x00166000-0x00403000
bss = 0x00403000-0x004123f0
available = 0x004123f0-0x03eff000
DMA Zone = 0x03f00000-0x04000000
Instruction Cache Enabled
Data Cache Enabled (write-through)
Built 1 zonelists. Total pages: 16002
Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 256 (order: 8, 1024 bytes)
console handover: boot [early_BFuart0] -> real [ttyBF0]
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 59760k/65536k RAM, (2676k init code, 1051k kernel code, 437k
data, 1024k dma, 584k reserved)
Blackfin Scratchpad data SRAM: 4 KB
Blackfin Data A SRAM: 16 KB (15 KB free)
Blackfin Data B SRAM: 16 KB (16 KB free)
Blackfin Instruction SRAM: 48 KB (42 KB free)
Security Framework v1.0.0 initialized
Mount-cache hash table entries: 512
NET: Registered protocol family 16
Blackfin GPIO Controller
Blackfin DMA Controller
stamp_init(): registering device resources
Generic PHY: Registered new driver
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
musb_hdrc: version 6.0, pio, peripheral, debug=0
musb_hdrc: USB Peripheral mode controller at ffc03800 using PIO, IRQ 59
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
bfin-otp: initialized
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
bfin_mac_mdio: probed
bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1,
mdc_clk=2500000Hz(mdc_div=25)@sclk=131MHz)
bfin_mac: Version 1.1, Blackfin BF53[67] BF527 on-chip Ethernet MAC driver
bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Contoller Driver, Version 1.0,
regs_base@ffc00500, dma channel@7
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting the system clock to 1970-01-01 03:27:34 (12454)
Freeing unused kernel memory: 2676k freed
_____________________________________
a8888b. / Welcome to the uClinux distribution \
d888888b. / _ _ \
8P"YP"Y88 / | | |_| __ __ (TM) |
8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |
8' .88 \ | | | | _ \| | | | \ / |
8`._.' Y8. \ | |__ | | | | | |_| | / \ |
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |
dP . Y8b. \ For embedded processors including |
d8:' " `::88b \ the Analog Devices Blackfin /
d8" 'Y88b \___________________________________/
:8P ' :888
8a. : _a88P For further information, check out:
._/"Yaa_: .| 88P| - blackfin.uclinux.org/
\ YP" `| 8P `. - docs.blackfin.uclinux.org/
/ \.___.d| .' - www.uclinux.org/
`--..__)8888P`._.' jgs/a:f - www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.4.1 (2008-05-27 17:53:04 CST) Built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:/> successful boot attempt
*******************************************************************
STEP 3: Start testing.
ifconfig eth0 10.100.4.50
root:/> PHY: 0:01 - Link is Up - 100/Full
root:/> ifconfig
eth0 Link encap:Ethernet HWaddr 00:E0:22:FE:B8:14
inet addr:10.100.4.50 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
root:/>
Case 1 ...PASS
spawn make clean -f Makefile.testusb -C src
make: Entering directory
`/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev/src'
rm -rf testusb
make: Leaving directory
`/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev/src'
Make clean done
spawn make -f Makefile.testusb -C src
make: Entering directory
`/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev/src'
gcc -Wall -g -lpthread -o testusb testusb.c
make: Leaving directory
`/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev/src'
Make done
spawn /bin/bash
su -
test@adam-desktop2:~/work/cruise/checkouts/uclinux-dist/testsuites/usbdev>
su -
Password:
root@adam-desktop2:~#
Case 3 ...PASS
cd /home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
lsmod |grep usbtest
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
sudo insmod ./configs/usbtest.ko
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
Case 4 ...PASS
lsmod |grep usbtest
usbtest 21900 0
usbcore 161584 10
usbtest,cdc_acm,cdc_ether,usbnet,usb_storage,libusual,usbhid,uhci_hcd,ehci_hcd
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
Case 5 ...PASS
sudo mount -t usbfs none /proc/bus/usb/
mount: none already mounted or /proc/bus/usb/ busy
Case 6 ...PASS
mount
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
mount
/dev/sda2 on / type reiserfs (rw,notail)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.22-14-generic/volatile type tmpfs (rw)
/dev/sdb1 on /home type reiserfs (rw)
securityfs on /sys/kernel/security type securityfs (rw)
none on /proc/bus/usb type usbfs (rw)
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
Case 7 ...PASS
modprobe g_zero autoresume=5
zero gadget: Gadget Zero, version: St Patrick's Day 2004
zero gadget: using musb_hdrc, OUT ep6out IN ep5in
root:/> zero gadget: high speed config #3: source and sink data
lsmod
Module Size Used by
g_zero 8884 0
root:/>
Case 8 ...PASS
lsusb
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 004: ID 413c:2003 Dell Computer Corp.
Bus 004 Device 005: ID 413c:3010 Dell Computer Corp. Optical Wheel Mouse
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 097: ID 0525:a4a0 Netchip Technology, Inc. Linux-USB
"Gadget Zero"
Bus 001 Device 001: ID 0000:0000
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
Case 9 ...PASS
lsusb|grep "Gadget Zero"|awk '{print $2":"$4}'|awk -F :
'{print $1}'
001
g_zero_bus = 001
Case 10 ...PASS
lsusb|grep "Gadget Zero"|awk '{print $2":"$4}'|awk -F :
'{print $2}'
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
lsusb|grep "Gadget Zero"|awk '{print $2":"$4}'|awk -F :
'{print $2}'
097
g_zero_dev = 097
Case 11 ...PASS
sudo ./src/testusb -D /proc/bus/usb/001/097 -t14 -c 15000 -s 256 -v 1
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
sudo ./src/testusb -D /proc/bus/usb/001/097 -t14 -c 15000 -s 256 -v 1
unknown speed /proc/bus/usb/001/097
/proc/bus/usb/001/097 test 14 --> 75 (Value too large for defined data
type)
Case 12 ...PASS
sudo ./src/testusb -D /proc/bus/usb/001/097 -t1
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
sudo ./src/testusb -D /proc/bus/usb/001/097 -t1
unknown speed /proc/bus/usb/001/097
/proc/bus/usb/001/097 test 1, 0.126220 secs
Case 13 ...PASS
sudo ./src/testusb -D /proc/bus/usb/001/097 -t2
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
sudo ./src/testusb -D /proc/bus/usb/001/097 -t2
unknown speed /proc/bus/usb/001/097
/proc/bus/usb/001/097 test 2, 0.126854 secs
Case 14 ...PASS
sudo ./src/testusb -D /proc/bus/usb/001/097 -t3
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
sudo ./src/testusb -D /proc/bus/usb/001/097 -t3
unknown speed /proc/bus/usb/001/097
/proc/bus/usb/001/097 test 3, 0.133410 secs
Case 15 ...PASS
sudo ./src/testusb -D /proc/bus/usb/001/097 -t4
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
sudo ./src/testusb -D /proc/bus/usb/001/097 -t4
unknown speed /proc/bus/usb/001/097
/proc/bus/usb/001/097 test 4, 0.130566 secs
Case 16 ...PASS
sudo ./src/testusb -D /proc/bus/usb/001/097 -t5
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
sudo ./src/testusb -D /proc/bus/usb/001/097 -t5
unknown speed /proc/bus/usb/001/097
/proc/bus/usb/001/097 test 5, 2.180811 secs
Case 17 ...PASS
sudo ./src/testusb -D /proc/bus/usb/001/097 -t6
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
sudo ./src/testusb -D /proc/bus/usb/001/097 -t6
unknown speed /proc/bus/usb/001/097
/proc/bus/usb/001/097 test 6, 0.633830 secs
Case 18 ...PASS
sudo ./src/testusb -D /proc/bus/usb/001/097 -t7
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
sudo ./src/testusb -D /proc/bus/usb/001/097 -t7
unknown speed /proc/bus/usb/001/097
/proc/bus/usb/001/097 test 7, 2.188747 secs
Case 19 ...PASS
sudo ./src/testusb -D /proc/bus/usb/001/097 -t8
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
sudo ./src/testusb -D /proc/bus/usb/001/097 -t8
unknown speed /proc/bus/usb/001/097
/proc/bus/usb/001/097 test 8, 0.628183 secs
Case 20 ...PASS
sudo ./src/testusb -D /proc/bus/usb/001/097 -t9
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
sudo ./src/testusb -D /proc/bus/usb/001/097 -t9
unknown speed /proc/bus/usb/001/097
/proc/bus/usb/001/097 test 9, 1.135636 secs
Case 21 ...PASS
sudo ./src/testusb -D /proc/bus/usb/001/097 -t10
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
sudo ./src/testusb -D /proc/bus/usb/001/097 -t10
unknown speed /proc/bus/usb/001/097
/proc/bus/usb/001/097 test 10, 1.747847 secs
Case 22 ...PASS
sudo rmmod ./configs/usbtest.ko
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
Case 23 ...PASS
sudo rmmod ./configs/usbtest.ko
root@adam-desktop2:/home/test/work/cruise/checkouts/uclinux-dist/testsuites/usbdev#
Case 24 ...PASS
zero gadget: high speed config #3: source and sink data
zero gadget: high speed config #3: source and sink data
zero gadget: high speed config #3: source and sink data
zero gadget: high speed config #3: source and sink data
zero gadget: high speed config #3: source and sink data
zero gadget: high speed config #3: source and sink data
zero gadget: high speed config #3: source and sink data
zero gadget: high speed config #3: source and sink data
zero gadget: high speed config #3: source and sink data
zero gadget: high speed config #3: source and sink data
zero gadget: high speed config #3: source and sink data
zero gadget: high speed config #3: source and sink data
rmmod g_zero
root:/>
Case 25 ...PASS
lsmod
Module Size Used by
root:/>
Case 26 ...PASS
No error when running testusb
Case 27 ...PASS
Ending ./gadget_zero_test.exp
--
-Bryan
--- Bryan Wu 2008-05-29 00:20:45
Fix it again by enabling DMA for read_fifo operation.
-Bryan
--- Vivi Li 2008-06-26 23:56:47
OK now. Close it.
Thanks!
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found