[#4265] WARNING: at lib/kref.c:33 kref_get() when using USB peripherals on BF54x, BF52x MUSB driver
Submitted By: Michael Hennerich
Open Date
2008-07-18 11:15:50 Close Date
2008-08-18 05:17:20
Priority:
Medium Assignee:
Bryan Wu
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
Drivers Board:
EZKIT Lite
Processor:
BF548 Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
App binary format:
N/A
Summary: WARNING: at lib/kref.c:33 kref_get() when using USB peripherals on BF54x, BF52x MUSB driver
Details:
A similar bug triggers when using the uvc video driver.
Playback video from the camera on mplayer or luvcview and then press CNTRL-C.
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).
usbcore: registered new interface driver snd-usb-audio
ALSA device list:
#0: C-Media USB Headphone Set at usb-musb_hdrc.0-1, full speed
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting system clock to 1970-01-01 10:49:02 UTC (38942)
IP-Config: Gateway not on directly connected network.
Freeing unused kernel memory: 6164k freed
dma_alloc_init: dma_page @ 0x001bc000 - 256 pages at 0x01f00000
init: Booting to single user mode
BusyBox v1.10.1 (2008-07-17 13:25:36 CEST) built-in shell (msh)
Enter 'help' for a list of built-in commands.
root:/> PHY: 0:01 - Link is Up - 100/Full
root:/> cat /dev/dsp > dev/dsp
WARNING: at lib/kref.c:33 kref_get()
Hardware Trace:
0 Target : <0x0000456c> { _dump_stack + 0x0 }
Source : <0x000829e4> { _kref_get + 0x54 }
1 Target : <0x000829e4> { _kref_get + 0x54 }
Source : <0x0000edca> { _printk + 0x16 }
2 Target : <0x0000edc6> { _printk + 0x12 }
Source : <0x0000ec7e> { _vprintk + 0x1be }
3 Target : <0x0000ec72> { _vprintk + 0x1b2 }
Source : <0xffa00bb2> { __common_int_entry + 0xca }
4 Target : <0xffa00b50> { __common_int_entry + 0x68 }
Source : <0xffa009b2> { _return_from_int + 0x4e }
5 Target : <0xffa009b2> { _return_from_int + 0x4e }
Source : <0xffa00992> { _return_from_int + 0x2e }
6 Target : <0xffa00964> { _return_from_int + 0x0 }
Source : <0xffa00b4c> { __common_int_entry + 0x64 }
7 Target : <0xffa00b4a> { __common_int_entry + 0x62 }
Source : <0xffa002ec> { _asm_do_IRQ + 0x6c }
8 Target : <0xffa002e4> { _asm_do_IRQ + 0x64 }
Source : <0x00012e52> { __local_bh_enable + 0x3e }
9 Target : <0x00012e14> { __local_bh_enable + 0x0 }
Source : <0x00012f5c> { ___do_softirq + 0x94 }
10 Target : <0x00012f54> { ___do_softirq + 0x8c }
Source : <0x00012f34> { ___do_softirq + 0x6c }
11 Target : <0x00012f28> { ___do_softirq + 0x60 }
Source : <0x00015f20> { _run_timer_softirq + 0x84 }
12 Target : <0x00015eb0> { _run_timer_softirq + 0x14 }
Source : <0x00021308> { _hrtimer_run_queues + 0xdc }
13 Target : <0x000212f8> { _hrtimer_run_queues + 0xcc }
Source : <0x000212c4> { _hrtimer_run_queues + 0x98 }
14 Target : <0x000212c0> { _hrtimer_run_queues + 0x94 }
Source : <0x000212fe> { _hrtimer_run_queues + 0xd2 }
15 Target : <0x000212f8> { _hrtimer_run_queues + 0xcc }
Source : <0x000212c4> { _hrtimer_run_queues + 0x98 }
Stack from 0191fad0:
00000080 000829e8 01e87080 01e87080 01e87780 00175690 00000021 0013f7fc
000a953c 01ee0400 01e87280 00000001 00000000 000a8892 00000020 01ded800
01e87280 01e87380 000a7f4c 01e87380 01ee0400 00000001 00000000 01e87680
000df620 01891db4 0191a7e0 01891ea8 00000000 0191a7e0 00000001 00000080
00000000 01ded800 0191a7e0 01ee0610 000a7f4c 0191a7e0 01ee0400 01ee04d0
00000400 0000000f 00200000 003d08c9 000b47a4 000b47a4 01ee0610 00000000
Call Trace:
[<0000ab24>] _update_curr+0xc0/0xc8
[<000b490c>] _musb_advance_schedule+0x2c/0x7c
[<000dda00>] _start_urbs+0xe4/0x1d0
[<000cbbe4>] _snd_pcm_do_prepare+0x10/0x2c
[<000cb91e>] _snd_pcm_action_single+0x26/0x58
[<00137368>] _down_read+0xc/0x18
[<000cc7e4>] _snd_pcm_action_nonatomic+0x58/0x5c
[<00006018>] _gpio_request+0x74/0x10c
[<000ce4f6>] _snd_pcm_common_ioctl1+0x3da/0xcd0
[<000ce50c>] _snd_pcm_common_ioctl1+0x3f0/0xcd0
[<0002ce60>] _handle_simple_irq+0x74/0x78
[<00086144>] _memcpy+0xc/0x70
[<00004cbd>] _dma_map_single+0x5/0x54
[<00086144>] _memcpy+0xc/0x70
[<0000c000>] _sched_move_task+0x48/0xd0
[<00086144>] _memcpy+0xc/0x70
[<000dac78>] _snd_pcm_area_copy+0xb4/0x17c
[<00086190>] _memcpy+0x58/0x70
[<0008618e>] _memcpy+0x56/0x70
[<00007fff>] _dma_insw+0x67/0x9c
[<000cf18e>] _snd_pcm_playback_ioctl1+0x2a/0x368
[<00006018>] _gpio_request+0x74/0x10c
[<00006018>] _gpio_request+0x74/0x10c
[<000cf4fe>] _snd_pcm_kernel_ioctl+0x32/0x58
[<00006018>] _gpio_request+0x74/0x10c
[<000d7412>] _snd_pcm_oss_prepare+0x16/0x40
[<00006018>] _gpio_request+0x74/0x10c
[<00006018>] _gpio_request+0x74/0x10c
[<00001000>] _run_init_process+0x0/0x18
[<000d74b6>] _snd_pcm_oss_write3+0x7a/0x90
[<00006018>] _gpio_request+0x74/0x10c
[<000da9aa>] _snd_pcm_plug_write_transfer+0x6a/0x98
[<00006018>] _gpio_request+0x74/0x10c
[<00006018>] _gpio_request+0x74/0x10c
[<000d7524>] _snd_pcm_oss_write2+0x58/0xc8
[<00001000>] _run_init_process+0x0/0x18
[<000d7412>] _snd_pcm_oss_prepare+0x16/0x40
[<000d8bb4>] _snd_pcm_oss_write+0x164/0x1ac
[<00001000>] _run_init_process+0x0/0x18
[<00001000>] _run_init_process+0x0/0x18
[<0000ab24>] _update_curr+0xc0/0xc8
[<0003d316>] _vfs_write+0x7a/0xe8
[<00001000>] _run_init_process+0x0/0x18
[<0003d78a>] _sys_write+0x32/0x64
[<00001000>] _run_init_process+0x0/0x18
[<0003b900>] _sys_open+0x0/0x24
[<0003d758>] _sys_write+0x0/0x64
[<0000fffe>] _exit_mm+0x7e/0xfc
[<00008000>] _dma_insw+0x68/0x9c
[<0000c000>] _sched_move_task+0x48/0xd0
[<00001000>] _run_init_process+0x0/0x18
[<00001000>] _run_init_process+0x0/0x18
WARNING: at lib/kref.c:33 kref_get()
Hardware Trace:
0 Target : <0x0000456c> { _dump_stack + 0x0 }
Source : <0x000829e4> { _kref_get + 0x54 }
1 Target : <0x000829e4> { _kref_get + 0x54 }
Source : <0x0000edca> { _printk + 0x16 }
2 Target : <0x0000edc6> { _printk + 0x12 }
Source : <0x0000ec7e> { _vprintk + 0x1be }
3 Target : <0x0000ec72> { _vprintk + 0x1b2 }
Source : <0xffa00bb2> { __common_int_entry + 0xca }
4 Target : <0xffa00b50> { __common_int_entry + 0x68 }
Source : <0xffa009b2> { _return_from_int + 0x4e }
5 Target : <0xffa009b2> { _return_from_int + 0x4e }
Source : <0xffa00992> { _return_from_int + 0x2e }
6 Target : <0xffa00964> { _return_from_int + 0x0 }
Source : <0xffa00b4c> { __common_int_entry + 0x64 }
7 Target : <0xffa00b4a> { __common_int_entry + 0x62 }
Source : <0xffa002ec> { _asm_do_IRQ + 0x6c }
8 Target : <0xffa002e4> { _asm_do_IRQ + 0x64 }
Source : <0x00012e52> { __local_bh_enable + 0x3e }
9 Target : <0x00012e14> { __local_bh_enable + 0x0 }
Source : <0x00012f5c> { ___do_softirq + 0x94 }
10 Target : <0x00012f54> { ___do_softirq + 0x8c }
Source : <0x00012f34> { ___do_softirq + 0x6c }
11 Target : <0x00012f28> { ___do_softirq + 0x60 }
Source : <0x00015f20> { _run_timer_softirq + 0x84 }
12 Target : <0x00015eb0> { _run_timer_softirq + 0x14 }
Source : <0x00021308> { _hrtimer_run_queues + 0xdc }
13 Target : <0x000212f8> { _hrtimer_run_queues + 0xcc }
Source : <0x000212c4> { _hrtimer_run_queues + 0x98 }
14 Target : <0x000212c0> { _hrtimer_run_queues + 0x94 }
Source : <0x000212fe> { _hrtimer_run_queues + 0xd2 }
15 Target : <0x000212f8> { _hrtimer_run_queues + 0xcc }
Source : <0x000212c4> { _hrtimer_run_queues + 0x98 }
Stack from 0191fad0:
0000ffff 000829e8 01e87180 01e87180 00000000 00175690 00000021 0013f7fc
000a953c 01ee0400 01891c10 00000020 00000001 000a8892 00000020 01ee0400
01e87280 01e87380 000a7f4c 01e87380 01ee0400 00000001 00000000 01e87680
000df620 01891db4 0191a7e0 01891ea8 00000000 0191a7e0 00000001 00000080
00000000 01ded800 0191a7e0 01ee0610 000a7f4c 0191a7e0 01ee0400 01ee04d0
00000400 0000000f 00200000 003d08c9 000b47a4 000b47a4 01ee0610 00000000
Call Trace:
[<0000ab24>] _update_curr+0xc0/0xc8
[<000b490c>] _musb_advance_schedule+0x2c/0x7c
[<000dda00>] _start_urbs+0xe4/0x1d0
[<000cbbe4>] _snd_pcm_do_prepare+0x10/0x2c
[<000cb91e>] _snd_pcm_action_single+0x26/0x58
[<00137368>] _down_read+0xc/0x18
[<000cc7e4>] _snd_pcm_action_nonatomic+0x58/0x5c
[<00006018>] _gpio_request+0x74/0x10c
[<000ce4f6>] _snd_pcm_common_ioctl1+0x3da/0xcd0
[<000ce50c>] _snd_pcm_common_ioctl1+0x3f0/0xcd0
[<0002ce60>] _handle_simple_irq+0x74/0x78
[<00086144>] _memcpy+0xc/0x70
[<00004cbd>] _dma_map_single+0x5/0x54
[<00086144>] _memcpy+0xc/0x70
[<0000c000>] _sched_move_task+0x48/0xd0
[<00086144>] _memcpy+0xc/0x70
[<000dac78>] _snd_pcm_area_copy+0xb4/0x17c
[<00086190>] _memcpy+0x58/0x70
[<0008618e>] _memcpy+0x56/0x70
[<00007fff>] _dma_insw+0x67/0x9c
[<000cf18e>] _snd_pcm_playback_ioctl1+0x2a/0x368
[<00006018>] _gpio_request+0x74/0x10c
[<00006018>] _gpio_request+0x74/0x10c
[<000cf4fe>] _snd_pcm_kernel_ioctl+0x32/0x58
[<00006018>] _gpio_request+0x74/0x10c
[<000d7412>] _snd_pcm_oss_prepare+0x16/0x40
[<00006018>] _gpio_request+0x74/0x10c
[<00006018>] _gpio_request+0x74/0x10c
[<00001000>] _run_init_process+0x0/0x18
[<000d74b6>] _snd_pcm_oss_write3+0x7a/0x90
[<00006018>] _gpio_request+0x74/0x10c
[<000da9aa>] _snd_pcm_plug_write_transfer+0x6a/0x98
[<00006018>] _gpio_request+0x74/0x10c
[<00006018>] _gpio_request+0x74/0x10c
[<000d7524>] _snd_pcm_oss_write2+0x58/0xc8
[<00001000>] _run_init_process+0x0/0x18
[<000d7412>] _snd_pcm_oss_prepare+0x16/0x40
[<000d8bb4>] _snd_pcm_oss_write+0x164/0x1ac
[<00001000>] _run_init_process+0x0/0x18
[<00001000>] _run_init_process+0x0/0x18
[<0000ab24>] _update_curr+0xc0/0xc8
[<0003d316>] _vfs_write+0x7a/0xe8
[<00001000>] _run_init_process+0x0/0x18
[<0003d78a>] _sys_write+0x32/0x64
[<00001000>] _run_init_process+0x0/0x18
[<0003b900>] _sys_open+0x0/0x24
[<0003d758>] _sys_write+0x0/0x64
[<0000fffe>] _exit_mm+0x7e/0xfc
[<00008000>] _dma_insw+0x68/0x9c
[<0000c000>] _sched_move_task+0x48/0xd0
[<00001000>] _run_init_process+0x0/0x18
[<00001000>] _run_init_process+0x0/0x18
WARNING: at lib/kref.c:33 kref_get()
Hardware Trace:
Follow-ups
--- Bryan Wu 2008-07-21 03:15:05
Hi Michael,
Do you have the URL of C-Media USB headphone? I plan to buy one since we don't
have such device in Shanghai.
-Bryan
--- Michael Hennerich 2008-07-21 03:31:58
Bryan,
I used a Speed Link USB Audio dongle (Speed Link SL-8850 UltraPortable Audio
Card USB), using the generic USB Audio Device class driver.
www.play.com/Product.aspx?r=PCSH&title=902582&source=9593
I think any USB Audio gadget with input an output capabilities may work to
reproduce the bug.
-Michael
--- Bryan Wu 2008-07-21 04:57:45
Thanks a lot, vivi gave me a SpeedLink USB audio dongle.
I will debug it.
-Bryan
--- Bryan Wu 2008-07-21 06:17:03
Hi Michael,
I can not reproduce this bug on my bf548-ezkit. I used CTRL-C to stop the cat
operation. Here is the log:
---
root:/> usb 1-1: new full speed USB device using musb_hdrc and address 2
usb 1-1: Product: C-Media USB Headphone Set
usb 1-1: configuration #1 chosen from 1 choice
input: C-Media USB Headphone Set as /class/input/input1
input: USB HID v1.00 Device [C-Media USB Headphone Set ] on usb-musb_hdrc.0-1
root:/>
root:/> cat /dev/dsp > dev/dsp
root:/>
root:/> cat /dev/dsp > dev/dsp
root:/>
root:/> cat /dev/dsp > dev/dsp
root:/>
root:/> dmesg
Linux version 2.6.22.19-ADI-2008R1.5-svn4959 (roc@roc-desktop) (gcc version
4.1.2 (ADI svn)) #380 Mon Jul 21 17:29:50 CST 2008
early printk enabled on early_BFuart0
Hardware Trace Active and Enabled
Reset caused by Software reset
Blackfin support (C) 2004-2007 Analog Devices, Inc.
Compiled for ADSP-BF548 Rev 0.0
Warning: Compiled for Rev 0, but running on Rev 1
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 525 MHz core clock and 131 MHz System Clock
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
text = 0x00001000-0x001a7540
rodata = 0x001a8000-0x0022ff04
data = 0x00230000-0x0024c000
stack = 0x00230000-0x00232000
init = 0x0024c000-0x00a23000
bss = 0x00a23000-0x00a34ed0
available = 0x00a34ed0-0x03dff000
DMA Zone = 0x03e00000-0x04000000
On node 0 totalpages: 15871
DMA zone: 123 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 15748 pages, LIFO batch:3
Normal zone: 0 pages used for memmap
Instruction Cache Enabled
Data Cache Enabled (write-through)
Built 1 zonelists. Total pages: 15748
Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart1,57600
console=tty0 console=ttyBF0,57600
ip=192.168.0.66:192.168.0.55:192.168.0.55:255.2f
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 256 (order: 8, 1024 bytes)
console handover: boot [early_BFuart0] -> real [ttyBF0]
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Kernel managed physical pages: 15871
Memory available: 52456k/65536k RAM, (8028k init code, 1689k kernel code, 730k
data, 2048k dma, 584k reserved)
Blackfin Scratchpad data SRAM: 4 KB
Blackfin Data A SRAM: 16 KB (15 KB free)
Blackfin Data B SRAM: 16 KB (16 KB free)
Blackfin Instruction SRAM: 48 KB (42 KB free)
Calibrating delay loop... 1046.52 BogoMIPS (lpj=2093056)
Security Framework v1.0.0 initialized
Mount-cache hash table entries: 512
NET: Registered protocol family 16
Blackfin GPIO Controller
Blackfin DMA Controller
ezkit_init(): registering device resources
SCSI subsystem initialized
libata version 2.21 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
musb_hdrc: version 6.0, musb-dma, host, debug=0
musb_hdrc: ConfigData=0x00 (UTMI-8)
musb_hdrc: kernel must blacklist external hubs
musb_hdrc: hw_ep 0shared, max 64
musb_hdrc: hw_ep 1tx, max 128
musb_hdrc: hw_ep 1rx, max 128
musb_hdrc: hw_ep 2tx, max 128
musb_hdrc: hw_ep 2rx, max 128
musb_hdrc: hw_ep 3tx, max 128
musb_hdrc: hw_ep 3rx, max 128
musb_hdrc: hw_ep 4tx, max 128
musb_hdrc: hw_ep 4rx, max 128
musb_hdrc: hw_ep 5tx, max 1024
musb_hdrc: hw_ep 5rx, max 1024
musb_hdrc: hw_ep 6tx, max 1024
musb_hdrc: hw_ep 6rx, max 1024
musb_hdrc: hw_ep 7tx, max 1024
musb_hdrc: hw_ep 7rx, max 1024
musb_hdrc: USB Host mode controller at ffc03c00 using DMA, IRQ 82
musb_hdrc musb_hdrc.0: MUSB HDRC host driver
drivers/usb/core/inode.c: creating file 'devices'
drivers/usb/core/inode.c: creating file '001'
musb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number 1
usb usb1: default language 0x0409
usb usb1: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: MUSB HDRC host driver
usb usb1: Manufacturer: Linux 2.6.22.19-ADI-2008R1.5-svn4959 musb-hcd
usb usb1: SerialNumber: musb_hdrc.0
usb usb1: uevent
usb usb1: usb_probe_device
usb usb1: configuration #1 chosen from 1 choice
usb usb1: adding 1-0:1.0 (config #1, interface 0)
usb 1-0:1.0: uevent
usb 1-0:1.0: uevent
hub 1-0:1.0: usb_probe_interface
hub 1-0:1.0: usb_probe_interface - got id
hub 1-0:1.0: USB hub found
dma_alloc_init: dma_page @ 0x00ae9000 - 512 pages at 0x03e00000
hub 1-0:1.0: 1 port detected
hub 1-0:1.0: standalone hub
hub 1-0:1.0: individual port power switching
hub 1-0:1.0: no over-current protection
hub 1-0:1.0: Single TT
hub 1-0:1.0: TT requires at most 8 FS bit times (666 ns)
hub 1-0:1.0: power on to power good time: 10ms
hub 1-0:1.0: local power source is good
hub 1-0:1.0: enabling power on all ports
hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0000
drivers/usb/core/inode.c: creating file '001'
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
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
bf54x-lq043: FrameBuffer initializing...
bfin-otp: initialized
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc02000 (irq = 48) is a BFIN-UART
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
smsc911x: Driver version 2007-07-13.
register bfin atapi driver
scsi0 : pata-bf54x
ata1: PATA max UDMA/66 cmd 0x00000000 ctl 0xffc03800 bmdma 0x00000000 irq 68
ata1.00: ATA-6: TOSHIBA MK4032GAX, AD101A, max UDMA/100
ata1.00: 78140160 sectors, multi 16: LBA48
ata1.00: configured for UDMA/66
blk_queue_max_hw_segments: set to minimum 1
scsi 0:0:0:0: Direct-Access ATA TOSHIBA MK4032GA AD10 PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 78140160 512-byte hardware sectors (40008 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
sd 0:0:0:0: [sda] 78140160 512-byte hardware sectors (40008 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
sda: sda1 sda2
sd 0:0:0:0: [sda] Attached SCSI disk
physmap platform flash device: 00400000 at 20000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
NOR chip too large to fit in mapping. Attempting to cope...
Intel/Sharp Extended Query Table at 0x010A
Unknown Intel/Sharp Extended Query version 1.5.
gen_probe: No supported Vendor Command Set found
physmap-flash physmap-flash.0: map_probe failed
BF5xx on-chip NAND FLash Controller Driver, Version 1.2 (c) 2007 Analog
Devices, Inc.
bf5xx-nand bf5xx-nand.0: page_size=256, 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)
Creating 2 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x00000000-0x00400000 : "Linux Kernel"
0x00400000-0x10000000 : "File System"
bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Contoller Driver, Version 1.0,
regs_base@ffc00500, dma channel@4
bfin-spi bfin-spi.1: Blackfin BF5xx on-chip SPI Contoller Driver, Version 1.0,
regs_base@ffc02300, dma channel@5
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
input: bf54x-keys as /class/input/input0
bf54x-keys: Blackfin BF54x Keypad registered IRQ 76
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
i2c /dev entries driver
i2c-bfin-twi i2c-bfin-twi.1: Blackfin BF5xx on-chip I2C TWI Contoller Driver,
Version 1.8, regs_base@ffc02200
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50
2006 UTC).
usbcore: registered new interface driver snd-usb-audio
ASoC version 0.13.1
dma rx:0 tx:1, err irq:10, regs:ffc00800
AD1980 SoC Audio Codec
asoc: AC97 <-> bf5xx-ac97 mapping ok
ALSA device list:
#0: bf5xx-board (AD1980)
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Setting up Blackfin MMR debugfs
rtc-bfin rtc-bfin: setting the system clock to 1970-01-01 00:38:32 (2312)
eth0: SMSC911x/921x identified at 0x24000000, IRQ: 175
eth0: SMSC911x MAC Address: 00:e0:22:fe:b8:3d
eth0: link down
IP-Config: Complete:
device=eth0, addr=192.168.0.66, mask=255.255.255.0, gw=192.168.0.55,
host=bf548-ezkit, domain=, nis-domain=(none),
bootserver=192.168.0.55, rootserver=192.168.0.55, rootpath=
Freeing unused kernel memory: 8028k freed
eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1
hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
hub 1-0:1.0: port 1, status 0101, change 0001, 12 Mb/s
hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x101
usb 1-1: new full speed USB device using musb_hdrc and address 2
usb 1-1: skipped 10 descriptors after interface
usb 1-1: skipped 2 descriptors after interface
usb 1-1: skipped 1 descriptor after endpoint
usb 1-1: skipped 2 descriptors after interface
usb 1-1: skipped 1 descriptor after endpoint
usb 1-1: skipped 1 descriptor after interface
usb 1-1: default language 0x0409
usb 1-1: new device strings: Mfr=0, Product=1, SerialNumber=0
usb 1-1: Product: C-Media USB Headphone Set
usb 1-1: uevent
usb 1-1: usb_probe_device
usb 1-1: configuration #1 chosen from 1 choice
usb 1-1: adding 1-1:1.0 (config #1, interface 0)
usb 1-1:1.0: uevent
usb 1-1:1.0: uevent
snd-usb-audio 1-1:1.0: usb_probe_interface
snd-usb-audio 1-1:1.0: usb_probe_interface - got id
usb 1-1: adding 1-1:1.1 (config #1, interface 1)
usb 1-1:1.1: uevent
usb 1-1:1.1: uevent
usb 1-1: adding 1-1:1.2 (config #1, interface 2)
usb 1-1:1.2: uevent
usb 1-1:1.2: uevent
usb 1-1: adding 1-1:1.3 (config #1, interface 3)
usb 1-1:1.3: uevent
usb 1-1:1.3: uevent
usbhid 1-1:1.3: usb_probe_interface
usbhid 1-1:1.3: usb_probe_interface - got id
input: C-Media USB Headphone Set as /class/input/input1
input: USB HID v1.00 Device [C-Media USB Headphone Set ] on usb-musb_hdrc.0-1
drivers/usb/core/inode.c: creating file '002'
hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
hub 1-0:1.0: port 1 enable change, status 00000103
---
-Bryan
--- Bryan Wu 2008-07-21 06:53:16
After discussing with Michael, I tested wrong ALSA device.
/dev/dsp is for AD1860 and /dev/dsp1 is for usb audio dangle.
So I tried again, got different result from Michael. Michael's result is from
bf527-ezkit but mine is from bf548-ezkit.
---
root:/> cat /proc/asound/card1/id
default
root:/> cat /proc/asound/cards
0 [bf5xxboard ]: AD1980 - bf5xx-board
bf5xx-board (AD1980)
1 [default ]: USB-Audio - C-Media USB Headphone Set
C-Media USB Headphone Set at usb-musb_hdrc.0-1, full
speed
root:/> cat /dev/dsp1 > /dev/dsp1
cat: read error: Input/output error
---
cat has run for a while and the red-led of the usb audio dangle flashed
finally, we got "read error".
-Bryan
--- Michael Hennerich 2008-07-21 07:17:39
Bryan,
I once got the same error as you - however I get most of the time the
WARNING: at lib/kref.c:33 kref_get()
error ...
-Michael
root:/> version
kernel: Linux release 2.6.24.7-ADI-2008R2-pre-svn5022, build #5024 Mon Jul
21 12:52:23 CEST 2008
toolchain: bfin-uclinux-gcc release gcc version 4.1.2 (ADI svn)
user-dist: release svn-6748, build #1732 Mon Jul 21 12:51:47 CEST 2008
root:/> cat /proc/cpuinfo
processor : 0
vendor_id : Analog Devices
cpu family : 0x27de000
model name : ADSP-BF548 500(MHz CCLK) 125(MHz SCLK) (mpu off)
stepping : 1
cpu MHz : 500.000/125.000
bogomips : 997.37
Calibration : 498688000 loops
cache size : 16 KB(L1 icache) 32 KB(L1 dcache-wb) 0 KB(L2 cache)
dbank-A/B : cache/cache
icache setup : 4 Sub-banks/4 Ways, 32 Lines/Way
dcache setup : 2 Super-banks/4 Sub-banks/2 Ways, 64 Lines/Way
board name : ADSP-BF548-EZKIT
board memory : 65536 kB (0x00000000 -> 0x04000000)
kernel memory : 63480 kB (0x00001000 -> 0x03dff000)
root:/> cat /dev/dsp > /dev/dsp
WARNING: at lib/kref.c:33 kref_get()
Hardware Trace:
0 Target : <0x00004a04> { _dump_stack + 0x0 }
Source : <0x000bc260> { _kref_get + 0x54 } CALL pcrel
1 Target : <0x000bc260> { _kref_get + 0x54 }
Source : <0x0000de1a> { _printk + 0x16 } RTS
2 Target : <0x0000de16> { _printk + 0x12 }
Source : <0x0000dcce> { _vprintk + 0x1be } RTS
3 Target : <0x0000dcc2> { _vprintk + 0x1b2 }
Source : <0xffa00cba> { __common_int_entry + 0xca } RTI
4 Target : <0xffa00c58> { __common_int_entry + 0x68 }
Source : <0xffa00ab4> { _return_from_int + 0x58 } RTS
5 Target : <0xffa00ab4> { _return_from_int + 0x58 }
Source : <0xffa00a8a> { _return_from_int + 0x2e } IF !CC JUMP
6 Target : <0xffa00a5c> { _return_from_int + 0x0 }
Source : <0xffa00c54> { __common_int_entry + 0x64 } CALL pcrel
7 Target : <0xffa00c52> { __common_int_entry + 0x62 }
Source : <0xffa003e4> { _asm_do_IRQ + 0x6c } RTS
8 Target : <0xffa003dc> { _asm_do_IRQ + 0x64 }
Source : <0x00011ea2> { __local_bh_enable + 0x3e } RTS
9 Target : <0x00011e64> { __local_bh_enable + 0x0 }
Source : <0x00011fac> { ___do_softirq + 0x94 } JUMP.L
10 Target : <0x00011fa4> { ___do_softirq + 0x8c }
Source : <0x00011f84> { ___do_softirq + 0x6c } IF !CC JUMP
11 Target : <0x00011f78> { ___do_softirq + 0x60 }
Source : <0x00014f74> { _run_timer_softirq + 0x84 } RTS
--- Bryan Wu 2008-07-21 22:50:11
Hi Michael,
I got the reason. My result is on the 08r1 branch header. Yours is on trunk
header. I met the same issue you posted here on trunk. I plan to upgrade the
trunk to 2.6.26 this week. After that, I will test it again.
-Bryan
--- Michael Hennerich 2008-08-08 05:02:45
Bryan,
This issue is still around in 2.6.26.
-Michael
--- Bryan Wu 2008-08-11 23:37:47
Yes, I'm debugging this bug these days.
It's weird that it was introduced in 2.6.24 upgrading. USB API changed since
that time. It looks like a race condition. Currently, don't find a solution
yet.
-Bryan
--- Bryan Wu 2008-08-12 05:45:18
The WARN_ON fired in kref_get is because the refcount == 0. That means the urb
containing the kref was destroyed or freed. But someone else still try to use
this urb object.
-Bryan
--- Bryan Wu 2008-08-14 07:00:06
Should be fixed now.
when musb_urb_dequeue calls __musb_giveback directly, it missed to call
usb_hcd_unlink_urb_from_ep before usb_hcd_giveback_urb.
-Bryan
--- Michael Hennerich 2008-08-14 07:44:33
Bryan,
Great! - works like a dream now.
Do we need this fix in 2008R1 as well ?
-Michael
--- Bryan Wu 2008-08-15 00:11:56
Hi Michael,
I tested it on branch and did not meet such bug, because this issue was
introduced by the 2.6.24 kernel USB API upgrade.
-Bryan
--- Michael Hennerich 2008-08-18 05:17:14
Thanks!
Fixed -> closed.
-Michael
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found