FAQ: [#7143] USBOTG: fail to uninstall gadget module in usb otg test on bf548/bf527(2012)

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

[#7143] USBOTG: fail to uninstall gadget module in usb otg test on bf548/bf527

Submitted By: Vivi Li

Open Date

2012-06-05 01:42:35     Close Date

2012-09-07 03:50:13

Priority:

Medium     Assignee:

Bob Liu

Status:

Closed     Fixed In Release:

N/A

Found In Release:

N/A     Release:

Category:

N/A     Board:

EZKIT Lite

Processor:

BF548     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Out of Date

Uboot version or rev.:

    Toolchain version or rev.:

gcc4.3-2012_Feb_15

App binary format:

N/A     

Summary: USBOTG: fail to uninstall gadget module in usb otg test on bf548/bf527

Details:

 

Fail to uninstall gadget module in usb otg test on bf548/bf527.

But it works in other specified usb gadget test.

 

--

Linux version 3.3.0-ADI-2012R1-pre-00713-g67cb7ad (test@uclinux62-548-usbdev) (gcc version 4.3.5 (ADI-trunk/svn-5764) ) #306 Tue2

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

  rodata    = 0x001e15b8-0x00285318

  bss       = 0x00286000-0x00298148

  data      = 0x00298148-0x002ba000

    stack   = 0x002b8000-0x002ba000

  init      = 0x002ba000-0x00a77000

  available = 0x00a77000-0x03e00000

  DMA Zone  = 0x03e00000-0x04000000

Hardware Trace active and enabled

Boot Mode: 1

Blackfin support (C) 2004-2010 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 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: 52164k/65536k RAM, (7924k init code, 1921k kernel code, 867k data, 2048k dma, 612k reserved)

NR_IRQS:295

Configuring Blackfin Priority Driven Interrupts

Šconsole [ttyBF1] enabled, bootconsole disabledrly

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)

Blackfin L2 SRAM: 128 KB (128 KB free)

NET: Registered protocol family 16

gpiochip_add: registered GPIOs 0 to 159 on device: BFIN-GPIO

Blackfin DMA Controller

ezkit_init(): registering device resources

bio: create slab <bio-0> at 0

SCSI subsystem initialized

spi spi0.2: 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@ffc00500, dma channel@4

bfin-spi bfin-spi.1: Blackfin on-chip SPI Controller Driver, Version 1.0, regs@ffc02300, dma channel@5

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@ffc00700

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

Advanced Linux Sound Architecture Driver Version 1.0.24.

musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)

musb-hdrc: kernel must blacklist external hubs

musb-hdrc 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

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 101

io scheduler noop registered (default)

bf54x-lq043: FrameBuffer initializing...

dma_alloc_init: dma_page @ 0x02a52000 - 512 pages at 0x03e00000

bfin-uart: Blackfin serial driver

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

bfin-otp: initialized

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. Manufacturer ID 0x000089 Chip ID 0x00881e

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

Creating 5 MTD partitions on "physmap-flash.0":

0x000000000000-0x000000080000 : "bootloader(nor)"

0x000000080000-0x000000480000 : "linux kernel(nor)"

0x000000480000-0x000000fe0000 : "file system(nor)"

0x000000fe0000-0x000000ff8000 : "config(nor)"

0x000000ff8000-0x000001000000 : "u-boot env(nor)"

m25p80 spi0.1: m25p16 (2048 Kbytes)

Creating 2 MTD partitions on "m25p80":

0x000000000000-0x000000080000 : "bootloader(spi)"

0x000000080000-0x000000200000 : "linux kernel(spi)"

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

ata1.00: 78140160 sectors, multi 16: LBA

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

bf5xx-nand bf5xx-nand.0: 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)

ata1.00: configured for UDMA/66

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

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

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

0x000000000000-0x000000080000 : "bootloader(nand)"

0x000000080000-0x000000480000 : "linux kernel(nand)"

0x000000480000-0x000010000000 : "file system(nand)"

smsc911x: Driver version 2008-10-21

smsc911x-mdio: probed

smsc911x smsc911x.0: eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=smsc911x-0:01, irq=-1)

smsc911x smsc911x.0: eth0: MAC Address: 00:e0:22:fe:bd:09

Initializing USB Mass Storage driver...

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

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 1987-07-23 02:56:17 UTC (554007377)

smsc911x smsc911x.0: 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=

sda: sda1

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

Freeing unused kernel memory: 7924k freed

mmc0: host does not support reading read-only switch. assuming write-enable.

mmc0: new SD card at address e624

                           _____________________________________

        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 (2012-06-04 23:28:25 CST) hush - the humble shell

 

root:/>

root:/>

root:/>

root:/> modprobe g_zero

gadget: Gadget Zero, version: Cinco de Mayo 2008

gadget: zero ready

root:/>  gadget: high-speed config #3: source/sink

 

root:/> modprobe -r g_zero

NULL pointer access

Kernel OOPS in progress

Deferred Exception context

CURRENT PROCESS:

COMM=modprobe PID=362  CPU=0

TEXT = 0x02e00040-0x02e54f60        DATA = 0x02e54f80-0x02e699a8

BSS = 0x02e699a8-0x02e6b380  USER-STACK = 0x02e74f68

 

return address: [0x02d854ae]; contents of:

0x02d85480:  6c66  3043  6011  0127  0483  0052  6c66  0127

0x02d85490:  0483  0010  05fd  0167  e14a  000f  6fa6  e10a

0x02d854a0:  4db4  6500  0062  3228  0037  61f8  0040 [a0e8]

0x02d854b0:  0c00  1807  e14a  02d8  3045  e10a  4234  0062

 

ADSP-BF548-0.2 525(MHz CCLK) 131(MHz SCLK) (mpu off)

Linux version 3.3.0-ADI-2012R1-pre-00713-g67cb7ad (test@uclinux62-548-usbdev) (gcc version 4.3.5 (ADI-trunk/svn-5764) ) #306 Tue2

 

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 : <0xffa00774> { _trap + 0x0 }

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

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

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

  logical irq   9 mapped  : <0x000e4a08> { _bfin_bf54x_irq_error + 0x0 }

  logical irq  14 mapped  : <0x00152fec> { _bfin_rtc_interrupt + 0x0 }

  logical irq  48 mapped  : <0x000f091c> { _bfin_serial_dma_rx_int + 0x0 }

  logical irq  49 mapped  : <0x000f0744> { _bfin_serial_dma_tx_int + 0x0 }

  logical irq  52 mapped  : <0x00155774> { _bfin_twi_interrupt_entry + 0x0 }

  logical irq  53 mapped  : <0x00155774> { _bfin_twi_interrupt_entry + 0x0 }

  logical irq  68 mapped  : <0x0011b5e4> { _bfin_ata_interrupt + 0x0 }

  logical irq  74 mapped  : <0x001602e0> { _sdh_dma_irq + 0x0 }

  logical irq  76 mapped  : <0x0015060c> { _bfin_kpad_isr + 0x0 }

  logical irq  79 mapped  : <0x00160764> { _sdh_stat_irq + 0x0 }

  logical irq  82 mapped  : <0x0014cb44> { _blackfin_interrupt + 0x0 }

  logical irq  85 mapped  : <0x0014c54c> { _dma_controller_irq + 0x0 }

  logical irq 175 mapped  : <0x00134f34> { _smsc911x_irqhandler + 0x0 }

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

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

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

RETS: <0x02d854a6> { :g_zero:_usb_composite_unregister + 0x13a }

PC  : <0x02d854ae> { :g_zero:_usb_composite_unregister + 0x142 }

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

ICPLB_FAULT_ADDR: <0x02d854ae> { :g_zero:_usb_composite_unregister + 0x142 }

PROCESSOR STATE:

R0 : 0000003f    R1 : 00000000    R2 : 00000020    R3 : 00000000

R4 : 00000098    R5 : 00000000    R6 : 00000020    R7 : 0000003f

P0 : 0028b260    P1 : 02089088    P2 : 0208cba0    P3 : ffe02104

P4 : 00000098    P5 : 00000000    FP : 002a0034    SP : 02d93af8

LB0: 000d6ebc    LT0: 000d6eba    LC0: 00000000

LB1: 00015126    LT1: 00015114    LC1: 00000000

B0 : 00000000    L0 : 00000000    M0 : 00000000    I0 : 00299794

B1 : 00000000    L1 : 00000000    M1 : 00000000    I1 : 02d83d9c

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

B3 : 00000000    L3 : 00000000    M3 : 00000000    I3 : 00000000

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

USP : 02e74b90  ASTAT: 00003004

 

Hardware Trace:

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

     Source : <0xffa00708> { _exception_to_level5 + 0xa4 } JUMP.L

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

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

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

     Source : <0xffa005be> { _ex_trap_c + 0x72 } JUMP.S

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

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

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

      FAULT : <0x02d854ae> { :g_zero:_usb_composite_unregister + 0x142 } P0 = W[P5 + 3]

     Source : <0x02d854ac> { :g_zero:_usb_composite_unregister + 0x140 } STI R0

   5 Target : <0x02d854a6> { :g_zero:_usb_composite_unregister + 0x13a }

     Source : <0x000f4dc8> { _dev_get_drvdata + 0x14 } RTS

   6 Target : <0x000f4dbc> { _dev_get_drvdata + 0x8 }

     Source : <0x000f4db6> { _dev_get_drvdata + 0x2 } IF !CC JUMP pcrel

   7 Target : <0x000f4db4> { _dev_get_drvdata + 0x0 }

     Source : <0x02d854a4> { :g_zero:_usb_composite_unregister + 0x138 } CALL (P2)

   8 Target : <0x02d85494> { :g_zero:_usb_composite_unregister + 0x128 }

     Source : <0x00148dba> { _musb_g_disconnect + 0x42 } CALL (P2)

   9 Target : <0x00148da2> { _musb_g_disconnect + 0x2a }

     Source : <0x0014c6de> { _bfin_musb_set_power + 0x2 } RTS

  10 Target : <0x0014c6dc> { _bfin_musb_set_power + 0x0 }

     Source : <0x00148d6a> { _musb_gadget_vbus_draw + 0x12 } JUMP (P1)

  11 Target : <0x00148d58> { _musb_gadget_vbus_draw + 0x0 }

     Source : <0x00148d9e> { _musb_g_disconnect + 0x26 } CALL pcrel

  12 Target : <0x00148d78> { _musb_g_disconnect + 0x0 }

     Source : <0x00147e9a> { _musb_interrupt + 0x486 } CALL pcrel

  13 Target : <0x00147e98> { _musb_interrupt + 0x484 }

     Source : <0x00147d9e> { _musb_interrupt + 0x38a } JUMP (P2)

  14 Target : <0x00147d92> { _musb_interrupt + 0x37e }

     Source : <0x00147c08> { _musb_interrupt + 0x1f4 } IF CC JUMP pcrel (BP)

  15 Target : <0x00147bf2> { _musb_interrupt + 0x1de }

     Source : <0x00147b5c> { _musb_interrupt + 0x148 } IF CC JUMP pcrel (BP)

Kernel Stack

Stack info:

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

FP: (0x02d93ef4)

Memory from 0x02d93d50 to 02d94000

02d93d50: 00000000  00000000 [00000000] 00000000  00000000  00000000  02d83d9c  00299794

02d93d70: 02e74b90  0000065c  020885c8  ffc03c24  020880d0  000000d4  02088160  0029b650

02d93d90: 00000001  00000004  020788a8  fffeecd7  00000238  000000d4  00000006  00000006

02d93db0: 00000006  0029b650  00000006  00299794  002b1158  0029a0ac  0029c790  00000000

02d93dd0: 02d93dd0  02d93dd0 <000fbe5c> 02078808  02089090  02d86d88  02089088  0208dadc

02d93df0: 02d92000  02078878  02d86a40  00149480  020880d0  02088880  0000003f  02e74b9c

02d93e10: 000fc2e4  02078808  020880d0  02d810dc  0000ffff  00000004  00000000  02e19e9c

02d93e30: 02afe1a0  00000004 <02d8614c> 00149286  0208a000  02d86d34  00000080 <02d854c0>

02d93e50: 02e74b9c <0014ced2><0014cede> 0208a000  00000081  02d810dc  02d86d34  00000080

02d93e70: 00000000  00000000  00000000  024efb34  0014cf74  fffffebc  001e0394  0263d704

02d93e90: 000348e0 <00034a08> 02d86dec  02d81160  00000100  00000010  02475268  657a5f67

02d93eb0: 00006f72  00000000  00000000  00000000  00000000  00000000  00000000  00000000

02d93ed0: 00000000  00000000  00000000  00000000  00000000  00040000  00000000  02475260

02d93ef0: ffffe000 (00000000)<ffa00906> 00034838  00000081  00000000  ffffe000  02cfbff1

02d93f10: 02aa0580  02af72e0  00000000  02e19e9c  00000000  02e02a78  00008000  00000000

02d93f30: 00000000  02d94000  02e02a78  02e02a78  02e1bca8  ffa01024  02001005  02b92beb

02d93f50: 02e0ce37  02b92be0  02e0ce24  00000000  fffffffd  00000000  00000000  00000000

02d93f70: 00000000  00000000  02d81160  00000000  00000001  00000000  00000000  00000000

02d93f90: 00000000  00000000  00000000  00000001  00000000  00000000  02e74c04  00000000

02d93fb0: 02d812a0  02e74b90  02e74b9c  02e6a93c  02d81144  02d810dc  02e6ae68  0000010c

02d93fd0: 00000081  00000000  00000000  00000000  02e19e9c  00000000  00000000  00000080

02d93ff0: 02d81160  02d81160  00000081  00000006

Return addresses in stack:

    address : <0x000fbe5c> { _rpm_resume + 0x270 }

    address : <0x02d8614c> { :g_zero:_usb_composite_unregister + 0xde0 }

    address : <0x02d854c0> { :g_zero:_usb_composite_unregister + 0x154 }

    address : <0x0014ced2> { _usb_gadget_remove_driver + 0x3a }

    address : <0x0014cede> { _usb_gadget_remove_driver + 0x46 }

    address : <0x00034a08> { _sys_delete_module + 0x1d0 }

   frame  1 : <0xffa00906> { _system_call + 0x6a }

Modules linked in: g_zero(-)

Kernel panic - not syncing: Kernel exception

--

 

Follow-ups

 

--- Bob Liu                                                  2012-06-18 03:32:03

Can't reproduce after fixed:

[#7142] MUSB: musb can not work in trunk

 

--- Vivi Li                                                  2012-06-26 07:05:53

Still can not remove g_zero in latest trunk, it hangs without any error

message.

Please try with attached configs.

 

--

modprobe -r g_zero

musb-hdrc musb-hdrc: remove, state 1

usb usb1: USB disconnect, device number 1

musb-hdrc musb-hdrc: USB bus 1 deregistered

(it hangs here)

--

 

--- Bob Liu                                                  2012-07-10 05:09:46

disable CONFIG_PM_RUNTIME

 

--- Vivi Li                                                  2012-09-07 04:50:21

I didn't disable CONFIG_PM_RUNTIME, this bug just disappeared in latest trunk.

So close it as out-of-date.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

config.usbdev.dma    application/octet-stream    52682    Vivi Li

config.linux.usbotg    application/octet-stream    52507    Vivi Li

Outcomes