[#4291] MUSB peripheral bulk transfer issues

Document created by Aaronwu Employee on Aug 29, 2013
Version 1Show Document
  • View in full screen mode

[#4291] MUSB peripheral bulk transfer issues

Submitted By: Bryan Wu

Open Date

2008-07-29 05:10:43     Close Date

2009-11-17 22:13:46

Priority:

Medium High     Assignee:

Cliff Cai

Status:

Closed     Fixed In Release:

N/A

Found In Release:

2008R1-RC8     Release:

Category:

N/A     Board:

N/A

Processor:

ALL     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Not reproducible

Uboot version or rev.:

    Toolchain version or rev.:

gcc4.1

App binary format:

N/A     

Summary: MUSB peripheral bulk transfer issues

Details:

 

From our gadget file storage test, we met some data corrupted issues. And VDSP team also met similar bugs, here is Martin's email:

 

--

Hi Robin

 

As agreed over the phone here is a very brief summary of the problems we

have been made aware of.

 

1) Stalling. Usually on Bulk transfers. ADA say transfers stall -

awaiting data completion - after 15 hours of successful operation. This

is for IN transfers with Blackfin as device.

 

2) Data corruption. Sometimes buffers are getting corrupted. Again Bulk

transfers with Blackfin as device. Usually in last 4 bytes of short data

packet. OUT transfers.

 

3) Again Bulk transfers with Blackfin as device. This time it is that

the Blackfin is receiving less data than expected.

 

Attached are our latest core module and controller driver.

 

Martin

--

 

First of all, I plan to hook up some bulk IN/OUT pressure test cases to reproduce the issues Martin mentioned.

Then, try to fix them or workaround them. otherwise try to make them recorded as silicon anomalies.

 

-Bryan

 

Follow-ups

 

--- Vivi Li                                                  2008-07-29 06:23:35

BF548-EZKIT gadget zero test, t5 and t7 will fail sometimes in 08r1 branch.

--

sudo ./src/testusb -D /proc/bus/usb/005/025 -t5

unknown speed   /proc/bus/usb/005/025

/proc/bus/usb/005/025 test 5 --> 32 (Broken pipe)

 

sudo ./src/testusb -D /proc/bus/usb/005/025 -t7

unknown speed   /proc/bus/usb/005/025

/proc/bus/usb/005/025 test 7 --> 32 (Broken pipe)

 

root:/> version

kernel:    Linux release 2.6.22.19-ADI-2008R1.5-svn5051, build #17 Tue Jul 29

00:36:05 GMT 2008

toolchain: bfin-uclinux-gcc release gcc version 4.1.2 (ADI svn)

user-dist: release svn-6937, build #227 Tue Jul 29 00:35:23 GMT 2008

--

 

--- Vivi Li                                                  2009-02-19 03:37:52

gadget storage harddisk/ram based tests all fail on bf548-ezkit.

We can not find storage device node on PC after gadget storage module is

installed on target board.

 

Bellow is the log of gadget storage harddisk based test on bf548-ezkit.

--

(on target board)

Linux version 2.6.28.5-ADI-2009R1-pre-svn6104 (test@uclinux62-548-usbdev) (gcc

version 4.1.2 (ADI svn)) #132 Tue Feb 17 13:15:47 CST 2009^M

console [early_BFuart0] enabled^M

early printk enabled on early_BFuart0^M

Board Memory: 64MB^M

Kernel Managed Memory: 64MB^M

Memory map:^M

  fixedcode = 0x00000400-0x00000490^M

  text      = 0x00001000-0x001aa870^M

  rodata    = 0x001aa870-0x0023a250^M

  bss       = 0x0023a250-0x0024c328^M

  data      = 0x0024c328-0x00264000^M

    stack   = 0x00262000-0x00264000^M

  init      = 0x00264000-0x0096a000^M

  available = 0x0096a000-0x03dff000^M

  DMA Zone  = 0x03e00000-0x04000000^M

Hardware Trace Active and Enabled^M

Boot Mode: 3^M

Reset caused by Software reset^M

Blackfin support (C) 2004-2009 Analog Devices, Inc.^M

Compiled for ADSP-BF548 Rev 0.2^M

Blackfin Linux support by   blackfin.uclinux.org/^M

Processor Speed: 525 MHz core clock and 131 MHz System Clock^M

NOMPU: setting up cplb tables^M

Instruction Cache Enabled for CPU0^M

Data Cache Enabled for CPU0 (write-through)^M

Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 15747^M

Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600

ip=10.100.4.50:10.100.4.174:10.100.4.174:255.255.255.0:bf548-ezkit:eth0:off^M

Configuring Blackfin Priority Driven Interrupts^M

PID hash table entries: 256 (order: 8, 1024 bytes)^M

console handover: boot [early_BFuart0] -> real [ttyBF0]^M

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)^M

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)^M

Memory available: 53264k/65536k RAM, (7192k init code, 1702k kernel code, 742k

data, 2048k dma, 584k reserved)^M

Calibrating delay loop... 1046.52 BogoMIPS (lpj=2093056)^M

Security Framework initialized^M

Mount-cache hash table entries: 512^M

Blackfin Scratchpad data SRAM: 4 KB^M

Blackfin L1 Data A SRAM: 16 KB (15 KB free)^M

Blackfin L1 Data B SRAM: 16 KB (16 KB free)^M

Blackfin L1 Instruction SRAM: 48 KB (42 KB free)^M

Blackfin L2 SRAM: 128 KB (128 KB free)^M

PDA for CPU0 reserved at 0023bb08^M

net_namespace: 288 bytes^M

NET: Registered protocol family 16^M

Blackfin GPIO Controller^M

Blackfin DMA Controller^M

ezkit_init(): registering device resources^M

SCSI subsystem initialized^M

usbcore: registered new interface driver usbfs^M

usbcore: registered new interface driver hub^M

usbcore: registered new device driver usb^M

musb_hdrc: version 6.0, musb-dma, peripheral, debug=0^M

musb_hdrc: USB Peripheral mode controller at ffc03c00 using DMA, IRQ 82^M

NET: Registered protocol family 2^M

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)^M

TCP established hash table entries: 2048 (order: 2, 16384 bytes)^M

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)^M

TCP: Hash tables configured (established 2048 bind 2048)^M

TCP reno registered^M

NET: Registered protocol family 1^M

msgmni has been set to 104^M

io scheduler noop registered^M

io scheduler anticipatory registered (default)^M

io scheduler cfq registered^M

bf54x-lq043: FrameBuffer initializing...^M

dma_alloc_init: dma_page @ 0x00da2000 - 512 pages at 0x03e00000^M

bfin-otp: initialized^M

Serial: Blackfin serial driver^M

bfin-uart.1: ttyBF0 at MMIO 0xffc02000 (irq = 48) is a BFIN-UART^M

brd: module loaded^M

smsc911x: Driver version 2007-07-13.^M

eth0: SMSC911x MAC Address: 00:e0:22:fe:bd:09^M

Driver 'sd' needs updating - please use bus_type methods^M

Driver 'sr' needs updating - please use bus_type methods^M

register bfin atapi driver^M

scsi0 : pata-bf54x^M

ata1: PATA max UDMA/66 irq 68^M

ata1.00: ATA-7: FUJITSU MHW2040AT, 0000000B, max UDMA/100^M

ata1.00: 78140160 sectors, multi 16: LBA ^M

ata1.00: configured for UDMA/66^M

blk_queue_max_hw_segments: set to minimum 1^M

scsi 0:0:0:0: Direct-Access     ATA      FUJITSU MHW2040A 0000 PQ: 0 ANSI: 5^M

sd 0:0:0:0: [sda] 78140160 512-byte hardware sectors: (40.0 GB/37.2 GiB)^M

sd 0:0:0:0: [sda] Write Protect is off^M

sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support

DPO or FUA^M

sd 0:0:0:0: [sda] 78140160 512-byte hardware sectors: (40.0 GB/37.2 GiB)^M

sd 0:0:0:0: [sda] Write Protect is off^M

sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support

DPO or FUA^M

sda: sda1^M

sd 0:0:0:0: [sda] Attached SCSI disk^M

physmap platform flash device: 02000000 at 20000000^M

physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank^M

Intel/Sharp Extended Query Table at 0x010A^M

Intel/Sharp Extended Query Table at 0x010A^M

Intel/Sharp Extended Query Table at 0x010A^M

Intel/Sharp Extended Query Table at 0x010A^M

Intel/Sharp Extended Query Table at 0x010A^M

Using buffer write method^M

Using auto-unlock on power-up/resume^M

cfi_cmdset_0001: Erase suspend on write enabled^M

RedBoot partition parsing not available^M

Using physmap partition information^M

Creating 3 MTD partitions on "physmap-flash.0":^M

0x00000000-0x00040000 : "bootloader(nor)"^M

0x00040000-0x00440000 : "linux kernel(nor)"^M

0x00440000-0x01000000 : "file system(nor)"^M

BF5xx on-chip NAND FLash Controller Driver, Version 1.2 (c) 2007 Analog

Devices, Inc.^M

bf5xx-nand bf5xx-nand.0: page_size=256, data_width=8, wr_dly=3, rd_dly=3^M

NAND device: Manufacturer ID: 0x20, Chip ID: 0xda (ST Micro NAND 256MiB 3,3V

8-bit)^M

Creating 2 MTD partitions on "NAND 256MiB 3,3V 8-bit":^M

0x00000000-0x00400000 : "linux kernel(nand)"^M

0x00400000-0x10000000 : "file system(nand)"^M

m25p80 spi0.1: m25p16 (2048 Kbytes)^M

Creating 2 MTD partitions on "m25p80":^M

0x00000000-0x00040000 : "bootloader(spi)"^M

0x00040000-0x00200000 : "linux kernel(spi)"^M

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0,

regs_base@ffc00500, dma channel@4^M

bfin-spi bfin-spi.1: Blackfin on-chip SPI Controller Driver, Version 1.0,

regs_base@ffc02300, dma channel@5^M

input: bf54x-keys as /devices/platform/bf54x-keys/input/input0^M

bf54x-keys: Blackfin BF54x Keypad registered IRQ 76^M

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0^M

i2c /dev entries driver^M

i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller,

regs_base@ffc00700^M

i2c-bfin-twi i2c-bfin-twi.1: Blackfin BF5xx on-chip I2C TWI Contoller,

regs_base@ffc02200^M

bfin-wdt: initialized: timeout=20 sec (nowayout=0)^M

hid_zpff: Unknown symbol _input_ff_create_memless^M

usbcore: registered new interface driver usbhid^M

usbhid: v2.6:USB HID core driver^M

Advanced Linux Sound Architecture Driver Version 1.0.18rc3.^M

ASoC version 0.13.2^M

dma rx:0 tx:1, err irq:10, regs:ffc00800^M

AD1980 SoC Audio Codec^M

asoc: AC97 <-> bf5xx-ac97 mapping ok^M

ALSA device list:^M

  #0: bf5xx-board (AD1980)^M

TCP cubic registered^M

NET: Registered protocol family 17^M

rtc-bfin rtc-bfin: setting system clock to 1970-04-09 03:40:54 UTC (8480454)^M

eth0: SMSC911x/921x identified at 0x24000000, IRQ: 175^M

eth0: link down^M

IP-Config: Complete:^M

     device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,^M

     host=bf548-ezkit, domain=, nis-domain=(none),^M

     bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=^M

Freeing unused kernel memory: 7192k freed^M

eth0: link up, 100Mbps, full-duplex, lpa 0x45E1^M

                           _____________________________________^M

        a8888b.           / Welcome to the uClinux distribution \^M

       d888888b.         /       _     _                         \^M

       8P"YP"Y88        /       | |   |_|            __  __ (TM)

|^M

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |^M

       8'    .88       \        | |   | |  _ \| | | | \  /        |^M

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |^M

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |^M

     dP   .    Y8b.       \   For embedded processors including   |^M

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /^M

   d8"         'Y88b        \___________________________________/^M

  :8P    '      :888^M

   8a.   :     _a88P         For further information, check out:^M

._/"Yaa_:   .| 88P|            -   blackfin.uclinux.org/^M

\    YP"    `| 8P  `.          -   docs.blackfin.uclinux.org/^M

/     \.___.d|    .'           -   www.uclinux.org/^M

`--..__)8888P`._.'  jgs/a:f    -   www.analog.com/blackfin^M

^M

Have a lot of fun...^M

^M

^M

BusyBox v1.13.2 (2009-02-17 11:19:59 CST) built-in shell (msh)

Enter 'help' for a list of built-in commands.

 

root:/> modprobe g_file_storage file=/dev/sda stall=0

g_file_storage gadget: File-backed Storage Gadget, version: 7 August 2007

g_file_storage gadget: Number of LUNs=1

g_file_storage gadget-lun0: ro=0, file: /dev/sda

root:/> g_file_storage gadget: high speed config #1

lsmod^M

Module                  Size  Used by

g_file_storage         19856  0

root:/>

 

(on PC)

uclinux62-548-usbdev:/home/test # ls /dev/sdc

ls: cannot access /dev/sdc: No such file or directory

--

 

Bellow is the log of gadget storage ram based test on bf548-ezkit.

--

(on target borad)

root:/> modprobe g_file_storage file=/fsg.block stall=0

g_file_storage gadget: File-backed Storage Gadget, version: 7 August 2007

g_file_storage gadget: Number of LUNs=1

g_file_storage gadget-lun0: ro=0, file: /fsg.block

root:/> g_file_storage gadget: high speed config #1

lsmod

Module                  Size  Used by

g_file_storage         19856  0

root:/>

 

(on PC)

uclinux62-548-usbdev:~ # ls /dev/sdc

ls: cannot access /dev/sdc: No such file or directory

uclinux62-548-usbdev:~ #

--

 

--- Cliff Cai                                                2009-06-12 04:41:45

I can see the device node under /dev.on my PC it's /dev/sdb

 

Cliff

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes