[#5268] can not find storage device node in gadget storage test of 548 harddisk with DMA mode

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

[#5268] can not find storage device node in gadget storage test of 548 harddisk with DMA mode

Submitted By: Vivi Li

Open Date

2009-06-18 03:10:01     Close Date

2009-07-06 03:28:30

Priority:

Medium High     Assignee:

Cliff Cai

Status:

Closed     Fixed In Release:

N/A

Found In Release:

N/A     Release:

Category:

Drivers     Board:

N/A

Processor:

BF548     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Fixed

Uboot version or rev.:

    Toolchain version or rev.:

gcc4.1_09r1-rc7

App binary format:

N/A     

Summary: can not find storage device node in gadget storage test of 548 harddisk with DMA mode

Details:

 

Gadget storage test fails on 548 harddisk with DMA mode, as it can not find proper storage device node.

 

Test can pass with PIO mode.

 

Bellow is the log:

--

Linux version 2.6.28.10-ADI-2009R1-svn6763 (test@uclinux62-548-usbdev) (gcc version 4.1.2 (ADI svn)) #4 Wed Jun 17 22:12:21 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-0x00196b10^M

  rodata    = 0x00196b10-0x00222238^M

  bss       = 0x00223000-0x00237140^M

  data      = 0x00237140-0x00252000^M

    stack   = 0x00250000-0x00252000^M

  init      = 0x00252000-0x00a38000^M

  available = 0x00a38000-0x03dff000^M

  DMA Zone  = 0x03e00000-0x04000000^M

Hardware Trace Active and Enabled^M

Boot Mode: 1^M

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

Compiled for ADSP-BF548 Rev 0.2^M

Blackfin Linux support by http://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-back)^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: 52452k/65536k RAM, (8088k init code, 1622k kernel code, 750k data, 2048k dma, 572k 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

net_namespace: 288 bytes^M

NET: Registered protocol family 16^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 102^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 @ 0x00f44000 - 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

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

Initializing USB Mass Storage driver...^M

usbcore: registered new interface driver usb-storage^M

USB Mass Storage support registered.^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

bfin-sdh bfin-sdh.0: unable to request DMA channel^M

bfin-sdh: probe of bfin-sdh.0 failed with error -16^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 2004-07-13 23:18:38 UTC (1089760718)^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: 8088k 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|            - http://blackfin.uclinux.org/^M

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

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

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

^M

Have a lot of fun...^M

^M

^M

BusyBox v1.13.4 (2009-06-17 21:18:10 CST) built-in shell (msh)^M

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

^M

root:/> version^M

kernel:    Linux release 2.6.28.10-ADI-2009R1-svn6763, build #4 Wed Jun 17 22:12:21 CST 2009^M

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

user-dist: release svn-8317, build #2 Wed Jun 17 22:11:11 CST 2009^M

root:/>

root:/> dmesg|grep -i sd^M

Driver 'sd' needs updating - please use bus_type methods^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] Mode Sense: 00 3a 00 00^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] Mode Sense: 00 3a 00 00^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

bfin-sdh bfin-sdh.0: unable to request DMA channel^M

bfin-sdh: probe of bfin-sdh.0 failed with error -16^M

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

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

g_file_storage gadget: Number of LUNs=1^M

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

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

root:/> lsmod

Module                  Size  Used by^M

g_file_storage         19900  0 ^M

hid_tmff                3020  0 ^M

hid_zpff                2168  0 ^M

ff_memless              3736  2 hid_tmff,hid_zpff^M

root:/>

 

(on host PC)

 

test@uclinux62-548-usbdev:~/work/cruise/checkouts/uclinux-dist/testsuites/usbdev>^M> su -

Password:

uclinux62-548-usbdev:~ # mkdir -p /mnt/usb

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

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

uclinux62-548-usbdev:~ #

Last passed test result is not found!!

--

 

Follow-ups

 

--- Cliff Cai                                                2009-07-03 03:30:04

there are three problems in the musb code that cause usb not to work in DMA

mode.

1.the interrupt pending bits should be cleared at the beginning of DMA ISR.

2.the DMA address for TX  DMA is wrong.

3.the TX request should be completed,only all the data has been transfered.

 

Cliff

 

--- Vivi Li                                                  2009-07-06 03:28:30

OK now. Close it. Thanks!

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes