[#5844] Gadget serial dirver test fail when transfer a file
Submitted By: Vivi Li
Open Date
2010-01-21 22:11:53 Close Date
2010-11-16 07:14:30
Priority:
Medium Assignee:
Bob Liu
Status:
Closed Fixed In Release:
N/A
Found In Release:
2010R1 Release:
Category:
N/A Board:
N/A
Processor:
ALL Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
gcc4.3_trunk3771
App binary format:
N/A
Summary: Gadget serial dirver test fail when transfer a file
Details:
When Gadget Serial dirver talk with Serial Driver talk on Linux host PC, file with lots of characters can not be transferred correctly.
This happens between BF548-EZKIT/BF527-EZKIT and Generic USB Serial Driver on host PC.
It also happens between BF527-EZKIT and Linux ACM driver on host PC.
--
Linux version 2.6.32.4-ADI-2010R1-pre-svn8215 (test@uclinux62-548-usbdev) (gcc version 4.3.4 (ADI-trunk/svn-3771) ) #116 Fri Jan 22 03:04:47 CST 2010
register early platform devices
bootconsole [early_shadow0] enabled
bootconsole [early_BFuart1] enabled
early printk enabled on early_BFuart1
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x0019c2e0
rodata = 0x0019c2e0-0x00232bfc
bss = 0x00233000-0x002477f4
data = 0x002477f4-0x00264000
stack = 0x00262000-0x00264000
init = 0x00264000-0x009df000
available = 0x009df000-0x03e00000
DMA Zone = 0x03e00000-0x04000000
Hardware Trace Active and Enabled
Boot Mode: 1
Reset caused by Software reset
Blackfin support (C) 2004-2009 Analog Devices, Inc.
Compiled for ADSP-BF548 Rev 0.2
Blackfin Linux support by http://blackfin.uclinux.org/
Processor Speed: 525 MHz core clock and 131 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
External memory: cacheable in instruction cache
L2 SRAM : uncacheable in instruction cache
Data Cache Enabled for CPU0
External memory: cacheable (write-through) in data cache
L2 SRAM : uncacheable in data cache
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 15748
Kernel command line: root=/dev/mtdblock0 rw ip=10.100.4.50 earlyprintk=serial,uart1,57600 console=ttyBF1,57600 ip=10.100.4.50:10.100.4.174:10.100.4.174:255.255.255.0:bf548-ezkit:eth0:off
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 52812k/65536k RAM, (7660k init code, 1644k kernel code, 800k data, 2048k dma, 572k reserved)
Hierarchical RCU implementation.
NR_IRQS:295
Configuring Blackfin Priority Driven Interrupts
console [ttyBF1] enabled, bootconsole disabled
console [ttyBF1] enabled, bootconsole disabled
Calibrating delay loop... 1046.52 BogoMIPS (lpj=2093056)
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (16 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (42 KB free)
Blackfin L2 SRAM: 128 KB (128 KB free)
NET: Registered protocol family 16
Blackfin DMA Controller
ezkit_init(): registering device resources
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource jiffies
musb_hdrc: version 6.0, musb-dma, peripheral, debug=0
musb_hdrc: USB Peripheral mode controller at ffc03c00 using DMA, IRQ 82
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
NET: Registered protocol family 1
Slow work thread pool: Starting up
Slow work thread pool: Ready
msgmni has been set to 103
io scheduler noop registered
io scheduler anticipatory registered (default)
bf54x-lq043: FrameBuffer initializing...
dma_alloc_init: dma_page @ 0x029dd000 - 512 pages at 0x03e00000
bfin-otp: initialized
bfin-uart: Blackfin serial driver
bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 48) is a BFIN-UART
brd: module loaded
register bfin atapi driver
scsi0 : pata-bf54x
ata1: PATA max UDMA/66 irq 68
physmap platform flash device: 02000000 at 20000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
RedBoot partition parsing not available
Using physmap partition information
Creating 3 MTD partitions on "physmap-flash.0":
0x000000000000-0x000000040000 : "bootloader(nor)"
0x000000040000-0x000000440000 : "linux kernel(nor)"
0x000000440000-0x000001000000 : "file system(nor)"
BF5xx on-chip NAND FLash Controller Driver, Version 1.2 (c) 2007 Analog Devices, Inc.
bf5xx-nand bf5xx-nand.0: page_size=256, data_width=8, wr_dly=3, rd_dly=3
NAND device: Manufacturer ID: 0x20, Chip ID: 0xda (ST Micro NAND 256MiB 3,3V 8-bit)
Creating 2 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x000000000000-0x000000400000 : "linux kernel(nand)"
0x000000400000-0x000010000000 : "file system(nand)"
m25p80 spi0.1: m25p16 (2048 Kbytes)
Creating 2 MTD partitions on "m25p80":
0x000000000000-0x000000040000 : "bootloader(spi)"
ata1.00: ATA-7: FUJITSU MHW2040AT, 0000000B, max UDMA/100
ata1.00: 78140160 sectors, multi 16: LBA
0x000000040000-0x000000200000 : "linux kernel(spi)"
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@4
bfin-spi bfin-spi.1: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc02300, dma channel@5
ata1.00: configured for UDMA/66
blk_queue_max_hw_segments: set to minimum 1
scsi 0:0:0:0: Direct-Access ATA FUJITSU MHW2040A 0000 PQ: 0 ANSI: 5
smsc911x: Driver version 2008-10-21.
smsc911x-mdio: probed
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1)
net eth0: MAC Address: 00:e0:22:fe:bd:09
sd 0:0:0:0: [sda] 78140160 512-byte logical blocks: (40.0 GB/37.2 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Initializing USB Mass Storage driver...
sda:
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
input: bf54x-keys as /devices/platform/bf54x-keys/input/input0
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
i2c /dev entries driver
i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc00700
i2c-bfin-twi i2c-bfin-twi.1: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc02200
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
bfin-sdh bfin-sdh.0: unable to request DMA channel
bfin-sdh: probe of bfin-sdh.0 failed with error -16
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.21.
dma rx:0 tx:1, err irq:10, regs:ffc00800
ALSA device list:
No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting system clock to 2005-02-17 04:02:41 UTC (1108612961)
sda1
sd 0:0:0:0: [sda] Attached SCSI disk
net eth0: SMSC911x/921x identified at 0x24000000, IRQ: 175
IP-Config: Complete:
device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,
host=bf548-ezkit, domain=, nis-domain=(none),
bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=
Freeing unused kernel memory: 7660k 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| - http://blackfin.uclinux.org/
\ YP" `| 8P `. - http://docs.blackfin.uclinux.org/
/ \.___.d| .' - http://www.uclinux.org/
`--..__)8888P`._.' jgs/a:f - https://www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.15.3 (2010-01-22 01:24:58 CST) hush - the humble shell
root:/> version
kernel: Linux release 2.6.32.4-ADI-2010R1-pre-svn8215, build #116 Fri Jan 22 03:04:47 CST 2010
toolchain: bfin-uclinux-gcc release gcc version 4.3.4 (ADI-trunk/svn-3771)
user-dist: release svn-9405, build #90 Fri Jan 22 03:03:55 CST 2010
root:/> ifconfig eth0 10.100.4.50
root:/>
root:/> modprobe g_serial use_acm=0
g_serial gadget: Gadget Serial v2.4
g_serial gadget: g_serial ready
root:/> g_serial gadget: high speed config #1: Generic Serial config
root:/> dmesg|tail
sd 0:0:0:0: [sda] Attached SCSI disk
net eth0: SMSC911x/921x identified at 0x24000000, IRQ: 175
IP-Config: Complete:
device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,
host=bf548-ezkit, domain=, nis-domain=(none),
bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=
Freeing unused kernel memory: 7660k freed
g_serial gadget: Gadget Serial v2.4
g_serial gadget: g_serial ready
g_serial gadget: high speed config #1: Generic Serial config
root:/>
spawn /bin/bash
su
test@uclinux62-548-usbdev:..testsuites/usbdev> su
Password:
uclinux62-548-usbdev:..testsuites/usbdev #
sudo mount -t usbfs none /proc/bus/usb/
uclinux62-548-usbdev:..testsuites/usbdev #
uclinux62-548-usbdev:..testsuites/usbdev # cat /proc/bus/usb/devices|grep -i gad get
S: Product=Gadget Serial v2.4
uclinux62-548-usbdev:..testsuites/usbdev # sudo modprobe usbserial vendor=0x0525 product=0xA4A6
uclinux62-548-usbdev:..testsuites/usbdev # lsmod |grep usbserial
usbserial 51120 0
usbcore 164684 9 usbserial,usb_storage,cdc_acm,cdc_ether,usbnet,usbhid,ehci_hcd,uhci_hcd
uclinux62-548-usbdev:..testsuites/usbdev # stty -F /dev/ttyUSB0 -icrnl
uclinux62-548-usbdev:..testsuites/usbdev # cat /dev/ttyUSB0 > host_file
root:/> cat /proc/kallsyms > test_file
root:/> cat test_file > /dev/ttyGS0
root:/>
uclinux62-548-usbdev:..testsuites/usbdev # rcp root@10.100.4.50:/test_file .
uclinux62-548-usbdev:..testsuites/usbdev # dos2unix host_file
dos2unix: converting file host_file to UNIX format ...
uclinux62-548-usbdev:..testsuites/usbdev # diff test_file host_file
6c6
< 000012e8 T _name_to_dev_t
---
> 000012e8 T _name_to_dev_t0
9c9
< 00001510 T _flush_thread
---
> ^00001510 T _flush_thread
16c16
< 00001934 T _bfin_clone
---
> 00001934 T _bfin_clone0
26c26
< 00001af8 T _syscall_trace
---
> 00001af8 T _syscall_trace^
36c36
< 0000274c t _setup_rt_frame
---
> 0000274c t _setup_rt_frame0
45c45
< 00003d14 T _bfin_request_exception
---
> 00003d14 T _bfin_request_exception^
54c54
< 00004a54 T _show_stack
---
> 00004a54 T _show_stack0
63c63
< 00005710 T ___dma_sync
---
> ^00005710 T ___dma_sync
71c71
< 00005b00 W _native_machine_restart
---
> 00005b00 W _native_machine_restart0
79c79
< 00005c08 T _portmux_setup
---
> 00005c08^ T _portmux_setup
...
--
Follow-ups
--- Bob Liu 2010-09-01 23:09:19
fixed.
The issue is that the serial communication maybe do some addition action due to
some special ASCII words. So we must use serial tools to test it instead of
simple 'cat file> /dev/ttyGS0'.
The detail test process is like this:
1. config "lrz,lsz,login,getty" support on user config(I attached the
config file).
2. on device:
root:/> modprobe g_serial use_acm=0
root:/> getty 9600 /dev/ttyGS0
3. on host,open another minicom use minicom /dev/ttyUSB0 and config baud to
9600.
your need to enter username: root
and on the device console input passwd: uClinux
then use this minicom's zmodem to transfer file and compare the result.
--- Vivi Li 2010-11-16 07:14:30
Fixed in testsuites.
Close it.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
user.config text/plain 49703 Bob Liu