FAQ: [#6640] kernel will hang when format usb partition with dma mode in usb host driver on bf527/bf548(2011)

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

[#6640] kernel will hang when format usb partition with dma mode in usb host driver on bf527/bf548

Submitted By: Vivi Li

Open Date

2011-06-14 04:53:47     Close Date

2011-09-02 03:57:05

Priority:

Medium High     Assignee:

Bob Liu

Status:

Closed     Fixed In Release:

N/A

Found In Release:

2011R1     Release:

Category:

Drivers     Board:

N/A

Processor:

ALL     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Fixed

Uboot version or rev.:

    Toolchain version or rev.:

gcc4.3-2010_Dec_09

App binary format:

N/A     

Summary: kernel will hang when format usb partition with dma mode in usb host driver on bf527/bf548

Details:

 

In bf527-ezkit/bf548-ezkit, kernel will hang when format usb partition with dma mode in usb host driver.  Either ext2 or fat32 file system will fail. PIO mode is OK.

 

The last passed version:

--

kernel:    Linux release 2.6.37.4-ADI-2011R1-pre-svn9707, build #304 Sat Mar 19 21:08:57 CST 2011

toolchain: bfin-uclinux-gcc release gcc version 4.3.5 (ADI-trunk/svn-5013)

user-dist: release svn-10121, build #4979 Sat Mar 19 21:06:55 CST 2011

--

 

First failed version:

--

kernel:    Linux release 2.6.38-ADI-2011R1-pre-svn9756, build #316 Wed Mar 23 23:00:59 CST 2011

toolchain: bfin-uclinux-gcc release gcc version 4.3.5 (ADI-trunk/svn-5013)

user-dist: release svn-101s6, build #5110 Wed Mar 23 22:59:26 CST 2011

--

 

Bellow is the log on bf527-ezkit with ext2 file system:

--

Linux version 2.6.39.1-ADI-2011R1-pre-svn9929 (test@uclinux60-bf527-std) (gcc version 4.3.5 (ADI-trunk/svn-5013) ) #602 Mon Jun 1

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-0x0016c718

  rodata    = 0x0016c718-0x001e93f0

  bss       = 0x001ea000-0x001fb86c

  data      = 0x001fb86c-0x00214000

    stack   = 0x00212000-0x00214000

  init      = 0x00214000-0x00968000

  available = 0x00968000-0x03f00000

  DMA Zone  = 0x03f00000-0x04000000

Hardware Trace active and enabled

Boot Mode: 1

Blackfin support (C) 2004-2010 Analog Devices, Inc.

Compiled for ADSP-BF527 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

Data Cache Enabled for CPU0

  External memory: cacheable (write-back) in data cache

Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 16002

Kernel command line: root=/dev/mtdblock0 rw clkin_hz=25000000 earlyprintk=serial,uart1,57600 console=tty0 console=ttyBF1,57600 if

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: 54272k/65536k RAM, (7504k init code, 1453k kernel code, 671k data, 1024k dma, 612k reserved)

NR_IRQS:159

Configuring Blackfin Priority Driven Interrupts

console [ttyBF1] enabled, bootconsole disabled

console [ttyBF1] enabled, bootconsole disabled

Calibrating delay loop... 1044.48 BogoMIPS (lpj=2088960)

pid_max: default: 32768 minimum: 301

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 (41 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

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

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

Advanced Linux Sound Architecture Driver Version 1.0.24.

musb-hdrc: version 6.0, musb-dma, host, debug=0

musb-hdrc musb-hdrc: MUSB HDRC host driver

musb-hdrc musb-hdrc: new USB bus registered, assigned bus number 1

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

musb-hdrc musb-hdrc: USB Host mode controller at ffc03800 using DMA, 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

UDP hash table entries: 256 (order: 0, 4096 bytes)

UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

NET: Registered protocol family 1

debug-mmrs: setting up Blackfin MMR debugfs

msgmni has been set to 106

io scheduler noop registered (default)

dma_alloc_init: dma_page @ 0x02834000 - 256 pages at 0x03f00000

bfin-lq035q1 bfin-lq035q1: 320x240 16-bit RGB FrameBuffer initialized

bfin-uart: Blackfin serial driver

bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART

bfin-otp: initialized

brd: module loaded

adp5520 0-0032: failed writing 0x80 to 0x00

adp5520 0-0032: failed to write

adp5520: probe of 0-0032 failed with error -1

bfin-spi bfin-spi.0: transfer: unsupported bits_per_word

m25p80: probe of spi0.1 failed with error -22

bfin_mii_bus: probed

bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:03, irq=-1, mdc_clk=2500000Hz(mdc_div=25)@sclk=131MHz)

bfin_mac bfin_mac.0: eth0: Blackfin on-chip Ethernet MAC driver, Version 1.1

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

ad7879 0-002c: Failed to write AD7879 Touchscreen

ad7879: probe of 0-002c failed with error -1

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

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

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

ALSA device list:

  No soundcards found.

TCP cubic registered

NET: Registered protocol family 17

rtc-bfin rtc-bfin: setting system clock to 2004-05-31 15:24:08 UTC (1086017048)

IP-Config: Complete:

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

     host=bf527-ezkit, domain=, nis-domain=(none),

     bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=

Freeing unused kernel memory: 7504k 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    - http://www.analog.com/blackfin

 

Have a lot of fun...

 

 

BusyBox v1.18.4 (2011-06-13 14:30:56 CST) hush - the humble shell

 

root:/> PHY: 0:03 - Link is Up - 100/Full

 

root:/> version

kernel:    Linux release 2.6.39.1-ADI-2011R1-pre-svn9929, build #602 Mon Jun 13 14:47:42 CST 2011

toolchain: bfin-uclinux-gcc release gcc version 4.3.5 (ADI-trunk/svn-5013)

user-dist: release svn-10196, build #9376 Mon Jun 13 14:45:32 CST 2011

root:/>

root:/> usb 1-1: new high speed USB device number 2 using musb-hdrc

scsi0 : usb-storage 1-1:1.0

scsi 0:0:0:0: Direct-Access     SanDisk  U3 Cruzer Micro  3.21 PQ: 0 ANSI: 2

sd 0:0:0:0: [sda] 2006673 512-byte logical blocks: (1.02 GB/979 MiB)

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

sd 0:0:0:0: [sda] Assuming drive cache: write through

sd 0:0:0:0: [sda] Assuming drive cache: write through

sda: sda1 sda2

sd 0:0:0:0: [sda] Assuming drive cache: write through

sd 0:0:0:0: [sda] Attached SCSI removable disk

 

root:/> mke2fs /dev/sda1

mke2fs 1.41.12 (17-May-2010)

ext2fs_check_if_mount: Can't check if filesystem is mounted due to missing mtab file while determining whether /dev/sda1 is moun.

Filesystem label=

OS type: Linux

Block size=1024 (log=0)

Fragment size=1024 (log=0)

Stride=0 blocks, Stripe width=0 blocks

125488 inodes, 500928 blocks

25046 blocks (5.00%) reserved for the super user

First data block=1

Maximum filesystem blocks=67633152

62 block groups

8192 blocks per group, 8192 fragments per group

2024 inodes per group

Superblock backups stored on blocks:

        8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409

 

Writing inode tables:

usb 1-1: reset high speed USB device number 2 using musb-hdrc

usb 1-1: reset high speed USB device number 2 using musb-hdrc

usb 1-1: reset high speed USB device number 2 using musb-hdrc

 

(Press Ctrl+C, can not exit)

--

 

Bellow is the log on bf527-ezkit with fat32 file system:

--

root:/> mkdosfs -F 32 /dev/sda2

mkdosfs 3.0.5 (27 Jul 2009)

------------[ cut here ]------------

WARNING: at drivers/usb/musb/musb_host.c:124 _musb_h_tx_flush_fifo+0x74/0x7c()

Could not flush host TX6 fifo: csr: 0003

Modules linked in:

Hardware Trace:

   0 Target : <0x0016abd0> { _dump_stack + 0x0 }

     Source : <0x000115f6> { _warn_slowpath_common + 0x46 } JUMP.L

   1 Target : <0x000115f6> { _warn_slowpath_common + 0x46 }

     Source : <0x0002fa64> { _print_modules + 0x54 } RTS

   2 Target : <0x0002fa5e> { _print_modules + 0x4e }

     Source : <0x0016ada4> { _printk + 0x14 } RTS

   3 Target : <0x0016ada0> { _printk + 0x10 }

     Source : <0x00012240> { _vprintk + 0x164 } RTS

   4 Target : <0x00012234> { _vprintk + 0x158 }

     Source : <0x00012226> { _vprintk + 0x14a } IF CC JUMP pcrel

   5 Target : <0x0001221e> { _vprintk + 0x142 }

     Source : <0x0001234e> { _vprintk + 0x272 } JUMP.S

   6 Target : <0x0001234e> { _vprintk + 0x272 }

     Source : <0x00011e44> { _console_unlock + 0x1a8 } RTS

   7 Target : <0x00011e1e> { _console_unlock + 0x182 }

     Source : <0x00011e10> { _console_unlock + 0x174 } IF CC JUMP pcrel (BP)

   8 Target : <0x00011e08> { _console_unlock + 0x16c }

     Source : <0x000277ee> { _up + 0x3e } RTS

   9 Target : <0x000277e8> { _up + 0x38 }

     Source : <0x000277da> { _up + 0x2a } IF CC JUMP pcrel (BP)

  10 Target : <0x000277b0> { _up + 0x0 }

     Source : <0x00011e04> { _console_unlock + 0x168 } JUMP.L

  11 Target : <0x00011de2> { _console_unlock + 0x146 }

     Source : <0x00011cfa> { _console_unlock + 0x5e } IF CC JUMP pcrel

  12 Target : <0x00011cce> { _console_unlock + 0x32 }

     Source : <0x00011d30> { _console_unlock + 0x94 } IF CC JUMP pcrel (BP)

  13 Target : <0x00011d28> { _console_unlock + 0x8c }

     Source : <0x00011816> { __call_console_drivers + 0x62 } RTS

  14 Target : <0x00011810> { __call_console_drivers + 0x5c }

     Source : <0x000117ea> { __call_console_drivers + 0x36 } IF CC JUMP pcrel

  15 Target : <0x000117da> { __call_console_drivers + 0x26 }

     Source : <0x000117ca> { __call_console_drivers + 0x16 } IF !CC JUMP pcrel (BP)

Stack info:

SP: [0x02ab7e44] <0x02ab7e44> /* kernel dynamic memory */

FP: (0x02ab7fa0)

Memory from 0x02ab7e40 to 02ab8000

02ab7e40: 000115f6 [02ab7e90] 000115fa  02ab7e90  001c5278  e3ff6041  001c5278  0000007c

02ab7e60: 000f562c  00011664  0203b404  00000000  00000000  ffc03b80  0000003f  e6b1180a

02ab7e80: 304b0204  0159e120  00000009  02ab7e90  001c5298  02ab7ea8  000f562c  e1224348

02ab7ea0: 08100044  0a101875  00000006  00000003  000f5df6  02074e1c  0203b404  02ab7eec

02ab7ec0: 0000d7a2  0205e820  0205e820  000f6018  00a3efa0  028c04c0  02ab7f8c  00000001

02ab7ee0: 00000000  c0008200  028d5000  02ab7f1c <0000d14c> 000e623c  028c04c0  02ab1ee4

02ab7f00: 00000000  0000003f  ffffff98  00000000  0205e96c  028df360  0205e820  000e6fb0

02ab7f20: 0000000a  0000003f  00000064  02ab7f90  02ab7f44  0000d686  0202b5ac  02ab6008

02ab7f40: 000f1fde  02ab1e60  001fcd70  02aba4ec  02ab7f98  02ab1c00  02ab6000  02ab1c00

02ab7f60:<000ccdb6> 02aba4e0  02ab1c00  00000000  0205e820  02ab7fa0  0016b15e  0206bbf0

02ab7f80: 02ab6000  02ab6000  02ab1c34  02ab1c44  02ab7f90  02ab7f90  02aba4ec  02aba4ec

02ab7fa0:(00000000)<000240ac> 0206bbf0  000ccb60  00000000  02ab1c00  00000000  00000000

02ab7fc0: 00000000  00000000  00000000  00024050  00000000  02ab1c00  00000000  02ab7fdc

02ab7fe0: 02ab7fdc

00000000  00000000  00000000  00000000  ffffffff  00000006

Return addresses in stack:

    address : <0x0000d14c> { _dequeue_task + 0x1c }

    address : <0x000ccdb6> { _scsi_error_handler + 0x256 }

   frame  1 : <0x000240ac> { _kthread + 0x5c }

    address : <0x00001556> { _kernel_thread_helper + 0x6 }

---[ end trace f50312e5357d9c77 ]---

--

 

Follow-ups

 

--- Vivi Li                                                  2011-06-20 04:14:02

Because of this bug, ltp test case inotify03/mount0*/umount0* crashed.

 

--- Bob Liu                                                  2011-06-29 05:28:00

fixed

 

--- Vivi Li                                                  2011-09-02 03:57:06

OK.Close it.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

config.usbhost_bf5xx.dma    application/octet-stream    47306    Vivi Li

Outcomes