2010-12-29 20:45:42     Linux crashes when inserting USB flash drive

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

2010-12-29 20:45:42     Linux crashes when inserting USB flash drive

Jay Ku (UNITED STATES)

Message: 97061   

 

I have a custom 537 board using a SL811 USB host controller.  I'm running svn-0921M (seems to be close to the recetnly releassed 2010).    I'm running Most of the board is tested now, but I'm having trouble with my USB host port.  I've followed the various instructions in the wiki for configuring the part, and when I boot the board with nothing pluggin into the USB port I see:

 

## Booting kernel from Legacy Image at 01000000 ...

   Image Name:   bf537-2.6.34.7-ADI-2010R1-pre-sv

   Created:      2010-12-30   0:54:19 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    6559692 Bytes =  6.3 MB

   Load Address: 00001000

   Entry Point:  0025f61c

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 0025f61c

Linux version 2.6.34.7-ADI-2010R1-pre-svn9156 (jayk@jayk-desktop) (gcc version 4.3.5 (ADI-trunk                          /svn-4912) ) #240 Wed Dec 29 16:54:12 PST 2010

register early platform devices

bootconsole [early_shadow0] enabled

bootconsole [early_BFuart0] enabled

early printk enabled on early_BFuart0

Board Memory: 32MB

Kernel Managed Memory: 32MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x001930a8

  rodata    = 0x001930a8-0x00220780

  bss       = 0x00221000-0x00234814

  data      = 0x00234814-0x00254000

    stack   = 0x00252000-0x00254000

  init      = 0x00254000-0x00c9d000

  available = 0x00c9d000-0x01f00000

  DMA Zone  = 0x01f00000-0x02000000

Hardware Trace Active and Enabled

Boot Mode: 3

Recovering from Watchdog event

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

Compiled for ADSP-BF537 Rev 0.3

Blackfin Linux support by   blackfin.uclinux.org/

Processor Speed: 500 MHz core clock and 125 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: 7874

Kernel command line: root=/dev/mtdblock0 rw clkin_hz=25000000 earlyprintk=serial,uart0,57600 co                          nsole=ttyBF0,57600

PID hash table entries: 128 (order: -3, 512 bytes)

Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)

Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)

Memory available: 18540k/32768k RAM, (10532k init code, 1608k kernel code, 772k data, 1024k dma                          , 292k reserved)

Hierarchical RCU implementation.

NR_IRQS:138

Configuring Blackfin Priority Driven Interrupts

console [ttyBF0] enabled, bootconsole disabled

console [ttyBF0] enabled, bootconsole disabled

Calibrating delay loop... 993.28 BogoMIPS (lpj=1986560)

Security Framework initialized

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 (35 KB free)

NET: Registered protocol family 16

Blackfin DMA Controller

js10000_2_init(): registering device resources

bfin_plat_nand_init: gpio_req = 0

bfin_plat_nand_init: gpio_val = 1

bfin_plat_nand_init: EBIU_AMBCTL0 = 0x22a47be0

bfin_plat_nand_init: EBIU_AMBCTL1 = 0xcc407bb0

bfin_plat_nand_init: PORT_MUX = 0x80

bfin_plat_nand_init: PORTF_FER = 0xbf43

bfin_plat_nand_init: PORTFIO_DIR = 0x0

bfin_plat_nand_init: PORTFIO_INEN = 0x4000

bio: create slab <bio-0> at 0

SCSI subsystem initialized

spi spi0.4: Warning: SPI CPHA not set: Slave Select not under software control!

See Documentation/blackfin/bfin-spi-notes.txt

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

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

cfg80211: Calling CRDA to update world regulatory domain

Switching to clocksource bfin_cs_cycles

NET: Registered protocol family 2

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

TCP established hash table entries: 1024 (order: 1, 8192 bytes)

TCP bind hash table entries: 1024 (order: 0, 4096 bytes)

TCP: Hash tables configured (established 1024 bind 1024)

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

msgmni has been set to 36

alg: No test for stdrng (krng)

io scheduler noop registered

io scheduler cfq registered (default)

bfin-uart: Blackfin serial driver

bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART

brd: module loaded

NAND device: Manufacturer ID: 0x20, Chip ID: 0xdc (ST Micro NAND 512MiB 3,3V 8-bit)

Scanning device for bad blocks

bd->options & NAND_BBT_SCANALLPAGES=0  numblocks=8192  scanlen=0  readlen=2

Bad eraseblock 869 at 0x000006ca0000

RedBoot partition parsing not available

Creating 2 MTD partitions on "gen_nand":

0x000000000000-0x000000800000 : "linux kernel(nand)"

0x000000800000-0x000020000000 : "file system(nand)"

CAN device driver interface

bfin_mii_bus: probed

bfin_mac: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=0:00, irq=-1, mdc_clk=25                          00000Hz(mdc_div=24)@sclk=125MHz)

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

sl811: driver sl811-hcd, 19 May 2005

sl811-hcd sl811-hcd.0: SL811HS v1.5

sl811-hcd sl811-hcd.0: new USB bus registered, assigned bus number 1

sl811-hcd sl811-hcd.0: irq 84, io mem 0x20300000

usb usb1: New USB device found, idVendor=1d6b, idProduct=0001

usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

usb usb1: Product: SL811HS v1.5

usb usb1: Manufacturer: Linux 2.6.34.7-ADI-2010R1-pre-svn9156 sl811-hcd

usb usb1: SerialNumber: sl811-hcd.0

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

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

TCP cubic registered

NET: Registered protocol family 17

can: controller area network core (rev 20090105 abi 8)

NET: Registered protocol family 29

can: raw protocol (rev 20090105)

can: broadcast manager protocol (rev 20090105 t)

lib80211: common routines for IEEE802.11 drivers

rtc-bfin rtc-bfin: setting system clock to 1970-01-01 17:20:48 UTC (62448)

dma_alloc_init: dma_page @ 0x01d21000 - 256 pages at 0x01f00000

Freeing unused kernel memory: 10532k freed

bf537-com43: initialized

ad7877 spi0.4: Warning: SPI CPHA not set: Slave Select not under software control!

See Documentation/blackfin/bfin-spi-notes.txt

input: AD7877 Touchscreen as /devices/platform/bfin-spi.0/spi0.4/input/input0

UBI: attaching mtd1 to ubi0

UBI: physical eraseblock size:   131072 bytes (128 KiB)

UBI: logical eraseblock size:    129024 bytes

UBI: smallest flash I/O unit:    2048

UBI: sub-page size:              512

UBI: VID header offset:          512 (aligned 512)

UBI: data offset:                2048

UBI: attached mtd1 to ubi0

UBI: MTD device name:            "file system(nand)"

UBI: MTD device size:            504 MiB

UBI: number of good PEBs:        4031

UBI: number of bad PEBs:         1

UBI: max. allowed volumes:       128

UBI: wear-leveling threshold:    4096

UBI: number of internal volumes: 1

UBI: number of user volumes:     1

UBI: available PEBs:             126

UBI: total number of reserved PEBs: 3905

UBI: number of PEBs reserved for bad PEB handling: 40

UBI: max/mean erase counter: 2/1

UBI: image sequence number: 0

UBI: background thread "ubi_bgt0d" started, PID 239

UBI device number 0, total 4031 LEBs (520095744 bytes, 496.0 MiB), available 126 LEBs (16257024                           bytes, 15.5 MiB), LEB size 129024 bytes (126.0 KiB)

UBIFS: recovery needed

UBIFS: recovery completed

UBIFS: mounted UBI device 0, volume 0, name "ubifs0"

UBIFS: file system size:   496226304 bytes (484596 KiB, 473 MiB, 3846 LEBs)

UBIFS: journal size:       24901632 bytes (24318 KiB, 23 MiB, 193 LEBs)

UBIFS: media format:       w4/r0 (latest is w4/r0)

UBIFS: default compressor: lzo

UBIFS: reserved for root:  4952683 bytes (4836 KiB)

                           _____________________________________

        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.16.2 (2010-12-29 16:50:43 PST) hush - the humble shell

 

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

 

 

 

 

 

However, if I boot with a flash drive in the port I get this (boot never finishes):

 

 

 

...

 

alg: No test for stdrng (krng)

io scheduler noop registered

io scheduler cfq registered (default)

bfin-uart: Blackfin serial driver

bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART

brd: module loaded

NAND device: Manufacturer ID: 0x20, Chip ID: 0xdc (ST Micro NAND 512MiB 3,3V 8-bit)

Scanning device for bad blocks

bd->options & NAND_BBT_SCANALLPAGES=0  numblocks=8192  scanlen=0  readlen=2

Bad eraseblock 869 at 0x000006ca0000

RedBoot partition parsing not available

Creating 2 MTD partitions on "gen_nand":

0x000000000000-0x000000800000 : "linux kernel(nand)"

0x000000800000-0x000020000000 : "file system(nand)"

CAN device driver interface

bfin_mii_bus: probed

bfin_mac: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=0:00, irq=-1, mdc_clk=25                          00000Hz(mdc_div=24)@sclk=125MHz)

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

sl811: driver sl811-hcd, 19 May 2005

sl811-hcd sl811-hcd.0: SL811HS v1.5

sl811-hcd sl811-hcd.0: new USB bus registered, assigned bus number 1

sl811-hcd sl811-hcd.0: irq 84, io mem 0x20300000

NULL pointer access

Kernel OOPS in progress

Deferred Exception context

CURRENT PROCESS:

COMM=swapper PID=1  CPU=0

invalid mm

return address: [0x00106672]; contents of:

0x00106650:  6651  e418  001c  6408  e618  001c  2fdf  0000

0x00106660:  05f4  e14d  0023  e10d  8494  916a  0167  6fa6

0x00106670:  3031 [a210] 6007  3265  0c00  1009  0c07  1411

0x00106680:  0000  9152  a210  0c00  180c  9362  3006  e3ff

 

ADSP-BF537-0.3 500(MHz CCLK) 125(MHz SCLK) (mpu off)

Linux version 2.6.34.7-ADI-2010R1-pre-svn9156 (jayk@jayk-desktop) (gcc version 4.3.5 (ADI-trunk                          /svn-4912) ) #242 Wed Dec 29 17:26:44 PST 2010

 

SEQUENCER STATUS:               Not tainted

SEQSTAT: 00000027  IPEND: 8808  IMASK: 003f  SYSCFG: 0006

  Peripheral interrupts masked off

  Kernel interrupts masked off

  EXCAUSE   : 0x27

  physical IVG3 asserted : <0xffa007b0> { _trap + 0x0 }

  physical IVG11 asserted : <0xffa00f38> { _evt_evt11 + 0x0 }

  physical IVG15 asserted : <0xffa00fec> { _evt_system_call + 0x0 }

  logical irq   6 mapped  : <0xffa003ec> { _bfin_coretmr_interrupt + 0x0 }

  logical irq  24 mapped  : <0x00106660> { _bfin_mac_interrupt + 0x0 }

  logical irq  84 mapped  : <0x0010ba64> { _usb_hcd_irq + 0x0 }

RETE: <0x00000000> /* Maybe null pointer? */

RETN: <0x0101bce8> /* kernel dynamic memory (maybe user-space) */

RETX: <0x00000480> /* Maybe fixed code section */

RETS: <0x000320b2> { _handle_IRQ_event + 0x4a }

PC  : <0x00106672> { _bfin_mac_interrupt + 0x12 }

DCPLB_FAULT_ADDR: <0x00000020> /* Maybe null pointer? */

ICPLB_FAULT_ADDR: <0x00106672> { _bfin_mac_interrupt + 0x12 }

PROCESSOR STATE:

R0 : 00000018    R1 : 01d0a400    R2 : 00010000    R3 : 0000143c

R4 : 0000003f    R5 : 00000018    R6 : 01d0a400    R7 : 00000000

P0 : 0022e0a4    P1 : 00033834    P2 : 00000000    P3 : 0023dd60

P4 : ffffffc0    P5 : 00238494    FP : 01c7d260    SP : 0101bc0c

LB0: 0011640e    LT0: 0011640e    LC0: 00000000

LB1: 00116410    LT1: 0011640a    LC1: 00000000

B0 : 0000001b    L0 : 00000000    M0 : ffffffff    I0 : 00000000

B1 : 00000000    L1 : 00000000    M1 : 00000000    I1 : 001a3a2c

B2 : 00000000    L2 : 00000000    M2 : 00000000    I2 : 00000020

B3 : 00000000    L3 : 00000000    M3 : 00000000    I3 : 0000000f

A0.w: 00000000   A0.x: 00000000   A1.w: 00000000   A1.x: 00000000

USP : 00000000  ASTAT: 00002000

 

Hardware Trace:

   0 Target : <0x00003efc> { _trap_c + 0x0 }

     Source : <0xffa00744> { _exception_to_level5 + 0xa4 } CALL pcrel

   1 Target : <0xffa006a0> { _exception_to_level5 + 0x0 }

     Source : <0xffa00554> { _bfin_return_from_exception + 0x18 } RTX

   2 Target : <0xffa0053c> { _bfin_return_from_exception + 0x0 }

     Source : <0xffa005f8> { _ex_trap_c + 0x74 } JUMP.S

   3 Target : <0xffa00584> { _ex_trap_c + 0x0 }

     Source : <0xffa0080a> { _trap + 0x5a } JUMP (P4)

   4 Target : <0xffa007b0> { _trap + 0x0 }

      FAULT : <0x00106672> { _bfin_mac_interrupt + 0x12 } P0 = W[P2 + 8]

     Source : <0x00106670> { _bfin_mac_interrupt + 0x10 } 0x3031

   5 Target : <0x00106660> { _bfin_mac_interrupt + 0x0 }

     Source : <0x000320b0> { _handle_IRQ_event + 0x48 } CALL (P2)

   6 Target : <0x000320aa> { _handle_IRQ_event + 0x42 }

     Source : <0x00032094> { _handle_IRQ_event + 0x2c } JUMP.S

   7 Target : <0x00032084> { _handle_IRQ_event + 0x1c }

     Source : <0x00032076> { _handle_IRQ_event + 0xe } IF !CC JUMP pcrel (BP)

   8 Target : <0x00032068> { _handle_IRQ_event + 0x0 }

     Source : <0x0003386c> { _handle_simple_irq + 0x38 } CALL pcrel

   9 Target : <0x00033834> { _handle_simple_irq + 0x0 }

     Source : <0xffa0039e> { _asm_do_IRQ + 0x7a } CALL (P1)

  10 Target : <0xffa00396> { _asm_do_IRQ + 0x72 }

     Source : <0x00031c0a> { _irq_to_desc + 0x1a } RTS

  11 Target : <0x00031bf0> { _irq_to_desc + 0x0 }

     Source : <0xffa00392> { _asm_do_IRQ + 0x6e } JUMP.L

  12 Target : <0xffa00390> { _asm_do_IRQ + 0x6c }

     Source : <0xffa00346> { _asm_do_IRQ + 0x22 } IF CC JUMP pcrel (BP)

  13 Target : <0xffa00340> { _asm_do_IRQ + 0x1c }

     Source : <0x00015caa> { _irq_enter + 0x3e } RTS

  14 Target : <0x00015c94> { _irq_enter + 0x28 }

     Source : <0x00015c78> { _irq_enter + 0xc } IF CC JUMP pcrel (BP)

  15 Target : <0x00015c76> { _irq_enter + 0xa }

     Source : <0x0000c458> { _idle_cpu + 0x1c } RTS

Kernel Stack

Stack info:

SP: [0x0101bde0] <0x0101bde0> /* kernel dynamic memory (maybe user-space) */

FP: (0x0101bfe4)

Memory from 0x0101bde0 to 0101c000

0101bde0:[00000000] 00000000  00000000  00000000  ffffffff  0000000f  00000020  001a3a2c

0101be00: 00000000  00000000  01c7d260  01d0104c  01d01000  01d17800  20300004  20100000

0101be20: 01d01000  00000000  00000084  00000054  00000000  0000143c  00000006  000001f4

0101be40: 000001f4  000001f4  01d01000  00000006  00000000  001a94a8  01042620  00000054

0101be60:<00200678> 20300000  00000000  00192d3e  0023e0d4  01d010c8  01d01000  20300000

0101be80: 20300004  00000404  00000054  00000000  0101be94  01c7d260  0007a372  00000001

0101bea0:<000dafd8> 0023e0dc  00238004  00250728  0023e110  0101bf0c  00250728  00000000

0101bec0: 001f1c80  0101216c  00000000  0007a3f2  000db11c  0023e0dc  00250728  00250728

0101bee0: 0023e110  00000000  0101beec  01c7d260 <000da9b8> 000db0b8  0024dec8  00000000

0101bf00: 00000000  00000000  000bbefe  010055d8  01037470  000daeae  00279000  00000000

0101bf20: 00000000  00000000  000da3b6  0101bf4c  000da3f0  000db0b8  000da40e  001dd954

0101bf40: 0026f584  000db350  001f1c80  001a94a8  0026f7e8  000db350  00279000  0022900c

0101bf60: 00250728  00000000  00000000  00000000  0022900c  00220000 <00001028> 00279000

0101bf80: 0022900c  00220000  00000000  00000000  00000000  00240000  0003402c  00240c3c

0101bfa0: 00278dc8  00000000  0025c130  00279000  0027906c  00000000  00000000  00000000

0101bfc0: 00000000  00278dc8  00278dc8  00000000  0025c1a4  00278dc8  00278dc8  00000000

0101bfe0: 00000000 (00000000)<000014ae> 00000000  00000000  00000000  ffffffff  00000006

Return addresses in stack:

    address : <0x00200678> /* kernel dynamic memory (maybe user-space) */

    address : <0x000dafd8> { _really_probe + 0x64 }

    address : <0x000da9b8> { _bus_for_each_dev + 0x44 }

    address : <0x00001028> { _do_one_initcall + 0x28 }

   frame  1 : <0x000014ae> { _kernel_thread_helper + 0x6 }

Modules linked in:

Kernel panic - not syncing: Kernel exception

Hardware Trace:

Stack info:

SP: [0x0101bb30] <0x0101bb30> /* kernel dynamic memory (maybe user-space) */

FP: (0x0101bd3c)

Memory from 0x0101bb30 to 0101c000

0101bb30:[001d7c54] 0019327e  0101bc0c  001d7c54  0022e3ce  0022e3ce  0022e3ce  0101bb60

0101bb50: 00004338  0101bc0c  00008808  0101bc0c  0000003f  0000003f  00000001  00000000

0101bb70: 0003000b  00000000  006e735b  00000001  2c959300  0002903c  00000000  ffffffea

0101bb90: 00000000  2c959454  003d0900  2cc7975a  00000001  00000001  0101bbe0  00000000

0101bbb0: 00000000  0023d5ac  00000000  00000000  00000015  7fffffff  00000e34  00000077

0101bbd0: 0101bc00  000013a8  00000001  2dc6c000  0002903c  00000000  ffa00748  0022b000

0101bbf0: 00008808  00000027  00000018  0000003f  00000001  0101bc3c  00000480  00000480

0101bc10: 00008808  00000027  00000000  0101bce8  00000480  00106672 <000320b2> 00000018

0101bc30: 00002000  00116410  0011640e  0011640a  0011640e  00000000  00000000  00000000

0101bc50: 00000000  00000000  00000000  00000000  00000000  00000000  0000001b  00000000

0101bc70: 00000000  00000000  00000000  00000000  00000000  00000000  ffffffff  0000000f

0101bc90: 00000020  001a3a2c  00000000  00000000  01c7d260  00238494  ffffffc0  0023dd60

0101bcb0: 00000000  00033834  0022e0a4  00000000  01d0a400  00000018  0000003f  0000143c

0101bcd0: 00010000  01d0a400  00000018  00000018  0022e0a4  00000006  00240e20  01d01000

0101bcf0: 01d17800 <000320b2> 01c5f3e0  ffffffc0  00000000  00000000  01d17800  00000006

0101bd10: 00000000  00033870  002413c0  01d01000  01d17800  00000018  00000000  00000054

0101bd30: 00000000  01c7d260  00015c76 (00000000)<ffa003a0> 0024d490  00000018  00000000

0101bd50: 00000000  00000000  ffa00c90  01d0104c  00000000  00000084  00003024  00116410

0101bd70: 0011640e  0010c6c0  00008810  00000000  00000000  00000000  00000000  0010c6c0

0101bd90:<0010c6aa> 0000000b  00003025  00116410  0011640e  0011640a  0011640e  00000000

0101bdb0: 00000000  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0101bdd0: 0000001b  00000000  00000000  00000000  00000000  00000000  00000000  00000000

0101bdf0: ffffffff  0000000f  00000020  001a3a2c  00000000  00000000  01c7d260  01d0104c

0101be10: 01d01000  01d17800  20300004  20100000  01d01000  00000000  00000084  00000054

0101be30: 00000000  0000143c  00000006  000001f4  000001f4  000001f4  01d01000  00000006

0101be50: 00000000  001a94a8  01042620  00000054 <00200678> 20300000  00000000  00192d3e

0101be70: 0023e0d4  01d010c8  01d01000  20300000  20300004  00000404  00000054  00000000

0101be90: 0101be94  01c7d260  0007a372  00000001 <000dafd8> 0023e0dc  00238004  00250728

0101beb0: 0023e110  0101bf0c  00250728  00000000  001f1c80  0101216c  00000000  0007a3f2

0101bed0: 000db11c  0023e0dc  00250728  00250728  0023e110  00000000  0101beec  01c7d260

0101bef0:<000da9b8> 000db0b8  0024dec8  00000000  00000000  00000000  000bbefe  010055d8

0101bf10: 01037470  000daeae  00279000  00000000  00000000  00000000  000da3b6  0101bf4c

0101bf30: 000da3f0  000db0b8  000da40e  001dd954  0026f584  000db350  001f1c80  001a94a8

0101bf50: 0026f7e8  000db350  00279000  0022900c  00250728  00000000  00000000  00000000

0101bf70: 0022900c  00220000 <00001028> 00279000  0022900c  00220000  00000000  00000000

0101bf90: 00000000  00240000  0003402c  00240c3c  00278dc8  00000000  0025c130  00279000

0101bfb0: 0027906c  00000000  00000000  00000000  00000000  00278dc8  00278dc8  00000000

0101bfd0: 0025c1a4  00278dc8  00278dc8  00000000  00000000  00000000 <000014ae> 00000000

0101bff0: 00000000  00000000  ffffffff  00000006

Return addresses in stack:

    address : <0x000320b2> { _handle_IRQ_event + 0x4a }

    address : <0x000320b2> { _handle_IRQ_event + 0x4a }

   frame  1 : <0xffa003a0> { _asm_do_IRQ + 0x7c }

    address : <0x0010c6aa> { _usb_add_hcd + 0x1b6 }

    address : <0x00200678> /* kernel dynamic memory (maybe user-space) */

    address : <0x000dafd8> { _really_probe + 0x64 }

    address : <0x000da9b8> { _bus_for_each_dev + 0x44 }

    address : <0x00001028> { _do_one_initcall + 0x28 }

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

 

And if I boot with nothing in the slot but then insert a jump drive, my board freezes (no messages print), the console dies, and a few seconds  later the board reboots.

 

 

 

Any thoughts on how to trouble-shoot this?

QuoteReplyEditDelete

 

 

2010-12-30 17:49:56     Re: Linux crashes when inserting USB flash drive

Jay Ku (UNITED STATES)

Message: 97076   

 

A little more information...  I'm using the sl811 driver from the latest 2010R1-RC5 release.  If I watch the INTRQ from the SL811 to the BF537 I can see this signal go high (asserted) when I plug in a USB device, and at that point my system has crashed (no console output, it's non-responsive, and it reboots to u-boot in a few seconds).  Once INTRQ goes high, it seems to stay there - I don't see any activity on it after the initial L->H transistion.  I know hardware interrupts are working generally on my board because my AD7877 touchscreen IC is working fine (I can see its interrupt line going active briefly when I touch the touchscreen).  I have the SL811 connected to AMS3 (nothing else us on this CS) and I'm using AMS1 as the 'dummy' CS.  INTRQ is connected to PH2 on the Blackfin.  Things are generally configured per the Wiki (  docs.blackfin.uclinux.org/doku.php?id=hw:cards:usb_ez-extender&s[]=sl811) - this includes the timing on AMS3 and AMS1.  My board config file looks like this:

 

#if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)

// SL811HS is on BAMS3n (nothing else on this select)

//  SL811 A0 connected to BA2

//  SL811 IRQ connected to PH2

static struct resource sl811_hcd_resources[] = {

    {

        .start = 0x20300000,

        .end = 0x20300000,

        .flags = IORESOURCE_MEM,

    }, {

        .start = 0x20300004,

        .end = 0x20300004,

        .flags = IORESOURCE_MEM,

    }, {

        .start = IRQ_PH2,

        .end = IRQ_PH2,

        .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,

    },

};

 

#if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)

void sl811_port_power(struct device *dev, int is_on)

{

    gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");

    gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);

}

#endif

 

static struct sl811_platform_data sl811_priv = {

    .potpg = 10,

    .power = 250,       /* == 500mA */

#if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)

    .port_power = &sl811_port_power,

#endif

};

 

static struct platform_device sl811_hcd_device = {

    .name = "sl811-hcd",

    .id = 0,

    .dev = {

        .platform_data = &sl811_priv,

    },

    .num_resources = ARRAY_SIZE(sl811_hcd_resources),

    .resource = sl811_hcd_resources,

};

#endif

QuoteReplyEditDelete

 

 

2010-12-30 18:00:29     Re: Linux crashes when inserting USB flash drive

Mike Frysinger (UNITED STATES)

Message: 97077   

 

if the irq is configured as level triggered, and the irq stays high (triggering), then perhaps you should configure it as edge triggered so it doesnt flood interrupts

QuoteReplyEditDelete

 

 

2010-12-30 20:36:47     Re: Linux crashes when inserting USB flash drive

Jay Ku (UNITED STATES)

Message: 97079   

 

How can I tell if the irq is configured as level- or edge-triggered?

 

I assume the IRQ is staying high because the driver isn't clearing it.  According to the data sheet, the SL811 IRQ is meant for level-triggering (multiple things can trigger it, and it isn't de-asserted until all triggering conditions are cleared).  The driver itself makes mention of the IRQ being level-triggered.

 

The SL811 sits on an expansion board.  Would it have been tested as part of the 2010 release?

QuoteReplyEditDelete

 

 

2010-12-30 20:56:07     Re: Linux crashes when inserting USB flash drive

Mike Frysinger (UNITED STATES)

Message: 97080   

 

your own post clearly shows the resources which declare the irq flags

QuoteReplyEditDelete

 

 

2010-12-31 09:46:01     Re: Linux crashes when inserting USB flash drive

Jay Ku (UNITED STATES)

Message: 97108   

 

I see that now - it wasn't clear 'HIGHLEVEL' meant active-high level-triggered until I looked at ioport.h (i.e.   www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/include/linux/ioport.h#L60) - the _HIGHEDGE and _LOWEDGE defines make it pretty clear.  Just for kicks I tried changing the flag to _HIGHEDGE, but I got the same result.

 

If anyone knows for sure if the SL811 driver is still working with the 2010 release, I'd appreciate confirmation.  I know the 2009 811 driver worked fine (at least on an older 533-based board).  That code used the same HIGHLEVEL for the interrupt that this latest driver is using, but there've been some other minor changes to the driver from 2009 to 2010.  Just for kicks I tried building with the 2009 version of the driver - it built ok and my board boots the same as before, but I get the same behvior when I plug in a device.

QuoteReplyEditDelete

 

 

2011-01-03 22:55:49     Re: Linux crashes when inserting USB flash drive

Sonic Zhang (CHINA)

Message: 97150   

 

The SL811 host driver passed the USB storage device testing in 2010R1 release.

QuoteReplyEditDelete

 

 

2011-01-03 23:17:58     Re: Linux crashes when inserting USB flash drive

Jay Ku (UNITED STATES)

Message: 97151   

 

Did it pass using the EZ-Extender board (  docs.blackfin.uclinux.org/doku.php?id=hw:cards:usb_ez-extender&s[]=sl811)?  I'm connecting the SL811 IRQ to PH2, while the EZ-Extender uses PF2-7.  I wonder if my crash could be related to some problem configuring PH2 as the SL811 interrupt.

 

I've attached my schematic - the connection is pretty straightforward.  The SL811 seems to be recognized correctly at boot (see my earlier transcript) - the crash doesn't happen until I plug in a device (which generates an interrupt).  Any suggestions how to debug this?

 

usbhost.pdf

QuoteReplyEditDelete

 

 

2011-01-03 23:39:02     Re: Linux crashes when inserting USB flash drive

Sonic Zhang (CHINA)

Message: 97153   

 

Yes

QuoteReplyEditDelete

 

 

2011-01-06 02:11:22     Re: Linux crashes when inserting USB flash drive

Jay Ku (UNITED STATES)

Message: 97210   

 

I just jumpered my board to connect the SL811 IRQ to PF4 instead of PH2 (in addition to making the appropriate changes to my board config file).  The USB works fine now.  I'll submit a bug to the tracker tomorrow.

 

I'm using the RMII interface on Port H (which works fine) - maybe that's somehow contributing to the problem with using PH2 as an interrupt input.

QuoteReplyEditDelete

Attachments

Outcomes