Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possible racecondition in dwc_otg driver #830

Closed
flipreverse opened this issue Feb 14, 2015 · 19 comments
Closed

possible racecondition in dwc_otg driver #830

flipreverse opened this issue Feb 14, 2015 · 19 comments
Assignees

Comments

@flipreverse
Copy link
Contributor

Hi all,

i discovered a seriuos bug in the dwc driver. When i connect multiple usb devices and each of them generates a serious amount of traffic, i get a null pointer dereference error after a while.
The error message itself is quoted below. I narrowed the bug down to drivers/usb/host/dwc_otg/dwc_otg_hcd.c line 1205. To be more precise, the assignement of the new predecessor of the next element fails.

(elm)->field.cqe_next->field.cqe_prev =                 \
                    (elm)->field.cqe_prev;

This might happen while a certain context tries to remove an item from the free list another context already removed. Hence, the first context fails during the DWC_CIRECLEQ_REMOVE_INIT macro.
As a first guess, i secured the list using a spinlock. I'm currently testing my fix.
I'll inform you as soon as i know if i fixed that issue.
Meanwhile, can you please tell me if there might be other sources for this bug?

Thanks!

Greetings
flip

[ 4989.166141] Unable to handle kernel NULL pointer dereference at virtual address 00000034                                                                                                
[ 4989.174235] pgd = ede30000                                                                                                                                                              
[ 4989.176936] [00000034] *pgd=2cef2831, *pte=00000000, *ppte=00000000                                                                                                                     
[ 4989.183214] Internal error: Oops: 817 [#1] PREEMPT SMP ARM                                                                                                                              
[ 4989.188689] Modules linked in: ipv6 snd_bcm2835 sg uas evdev rc_su3000 ts2022 ds3103 ts2020 ds3000 dvb_usb_dw2102 dvb_usb dvb_core rc_core snd_soc_wm8804 snd_soc_pcm512x_i2c regmap_sp8
[ 4989.221576] CPU: 0 PID: 3261 Comm: mpegts_input_th Not tainted 3.18.5-v7-al-gddabc66-dirty #1                                                                                           
[ 4989.230085] task: ec17c500 ti: ecf2e000 task.ti: ecf2e000                                                                                                                               
[ 4989.235480] PC is at assign_and_init_hc+0x60/0x610                                                                                                                                      
[ 4989.240264] LR is at dwc_otg_hcd_select_transactions+0x244/0x370                                                                                                                        
[ 4989.246261] pc : [<c03d76fc>]    lr : [<c03d9850>]    psr: 00000193                                                                                                                     
[ 4989.246261] sp : ecf2f928  ip : ecf2f960  fp : ecf2f95c                                                                                                                                 
[ 4989.257716] r10: edced828  r9 : ee6c9000  r8 : e1b334c0                                                                                                                                 
[ 4989.262929] r7 : ee6c9000  r6 : edced800  r5 : e1b33cc0  r4 : ee79c000                                                                                                                  
[ 4989.269442] r3 : ee6c9060  r2 : 00000000  r1 : 00000000  r0 : ee6c9000                                                                                                                  
[ 4989.275957] Flags: nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user                                                                                                          
[ 4989.283163] Control: 10c5387d  Table: 2de3006a  DAC: 00000015                                                                                                                           
[ 4989.288895] Process mpegts_input_th (pid: 3261, stack limit = 0xecf2e238)                                                                                                               
[ 4989.295669] Stack: (0xecf2f928 to 0xecf30000)                                                                                                                                           
[ 4989.300019] f920:                   ecf2f94c ecf2f938 c0533c6c c00d14ec ee78a3c0 c081248a                                                                                               
[ 4989.308183] f940: edced800 ee6c9014 ee6c9060 ee6c9000 ecf2f9a4 ecf2f960 c03d9850 c03d76a8                                                                                               
[ 4989.316347] f960: ee78a3c0 00000008 ee6c9038 ee6c901c ecf2f994 20000193 c0533c6c ee6c9000                                                                                               
[ 4989.324511] f980: ee780f00 edced800 ee78a3c0 00000002 e1b33dc0 00000001 ecf2f9cc ecf2f9a8                                                                                               
[ 4989.332675] f9a0: c03dc758 c03d9618 0c004c14 20000193 ee6c9000 ee780f00 e1b33e00 ee6c9000                                                                                               
[ 4989.340839] f9c0: ecf2f9f4 ecf2f9d0 c03dc930 c03dc5d4 00000002 ecf2f9e0 c03af8cc e1b33e00                                                                                               
[ 4989.349003] f9e0: ee780f00 f3980568 ecf2fa24 ecf2f9f8 c03dca6c c03dc88c 00000000 c03dd7f8                                                                                               
[ 4989.357168] fa00: ecf2fa24 e1b33e00 ee780f00 f3980560 ee6c9000 00000002 ecf2fa64 ecf2fa28                                                                                               
[ 4989.365331] fa20: c03ddaec c03dc9f4 00000002 c045ba3c ecf2fa84 ee78ee00 00000000 00000002                                                                                               
[ 4989.373496] fa40: ee6c9000 ee780f00 00000000 f3980560 e1b33e00 00000001 ecf2fabc ecf2fa68                                                                                               
[ 4989.381660] fa60: c03defe4 c03dd844 ee6c1800 c03d9c54 ee6c901c ec033628 ecf2fac4 ecf2fa88                                                                                               
[ 4989.389825] fa80: 00000023 00000000 f398056c f3980568 f3980000 00000003 00000008 ee6c9000                                                                                               
[ 4989.397988] faa0: 00000000 c08122b8 f301080e 00000000 ecf2fadc ecf2fac0 c03df3f4 c03dec8c                                                                                               
[ 4989.406153] fac0: ee6c9000 ee6c8c00 00000001 02000008 ecf2fb04 ecf2fae0 c03df6a4 c03df350                                                                                               
[ 4989.414316] fae0: ee78a600 c07cd95c 00000020 00000000 00000000 00000000 ecf2fb14 ecf2fb08                                                                                               
[ 4989.422481] fb00: c03dbbf4 c03df440 ecf2fb24 ecf2fb18 c03af870 c03dbbe4 ecf2fb64 ecf2fb28                                                                                               
[ 4989.430645] fb20: c0069a1c c03af848 c052dd98 c00d13c0 c052dd90 c07cd900 01400000 c07cd900                                                                                               
[ 4989.438809] fb40: c07cd95c ee78a040 00000000 00000000 00000000 00000002 ecf2fb84 ecf2fb68                                                                                               
[ 4989.446973] fb60: c0069c6c c00699e8 00020000 c07cd900 c07cd95c ecf2ffb0 ecf2fb9c ecf2fb88                                                                                               
[ 4989.455137] fb80: c006ccdc c0069c2c 00000020 c07c6d44 ecf2fbc4 ecf2fba0 c0069384 c006cc3c                                                                                               
[ 4989.463302] fba0: ecf2fbd8 c04ac6c0 60000113 f300b200 ecf2fc0c ec0e45b4 ecf2fbd4 ecf2fbc8                                                                                               
[ 4989.471466] fbc0: c0008564 c006930c ecf2fc94 ecf2fbd8 c05345f4 c0008544 000005a8 e19bc600                                                                                               
[ 4989.479630] fbe0: ad7c148c ad7d8857 ec0e4200 e19bc600 000005a8 00000001 ec0e45b4 00000000                                                                                               
[ 4989.487794] fc00: 00000002 ecf2fc94 00055f80 ecf2fc20 00000000 c04ac6c0 60000113 ffffffff                                                                                               
[ 4989.495958] fc20: ecf2fcb4 ecf2fc30 c04a8444 00000000 d216806a d216ff40 e19c2240 ec0e4200                                                                                               
[ 4989.504122] fc40: 0000cdca 0000006a ecf2fc64 c044799c c0447f1c c0135d44 00000000 00000001                                                                                               
[ 4989.512287] fc60: ec0e45b4 00000000 d216806a ec0e4200 d216806a e19c2240 00000020 ec0e4200                                                                                               
[ 4989.520451] fc80: 0000cdca 0000006a ecf2fcb4 ecf2fc98 c04ad59c c04ac660 00000020 c048b6a4                                                                                               
[ 4989.528615] fca0: ec0e4200 ec0e4200 ecf2fcec ecf2fcb8 c04a8fc8 c04ad568 ecf2fd1c 00000020                                                                                               
[ 4989.536779] fcc0: c03dbab4 c03e5d28 00004a00 e19c2240 ec0e4200 edcd5700 00000000 ec0e4200
[ 4989.544943] fce0: ecf2fd2c ecf2fcf0 c04b148c c04a8db8 ecf2fd0c edcede80 ee777e00 c046edc0                                                                                               
[ 4989.553107] fd00: 00000000 c04b3d3c e19c2240 c08191c0 ec0e4258 00000000 ec0e4200 0000cdca                                                                                               
[ 4989.561271] fd20: ecf2fd84 ecf2fd30 c04b3d54 c04b134c 00000020 00010220 00004b40 c0499da8                                                                                               
[ 4989.569435] fd40: 71b2a8c0 e19c2240 c08e5040 c048f7c8 c08191c0 a4364ac5 ecf2fdac c059bd7c                                                                                               
[ 4989.577599] fd60: 00000000 e19c2240 c07eb550 c08191c0 e19c2240 00000000 ecf2fdac ecf2fd88                                                                                               
[ 4989.585763] fd80: c048f7b0 c04b34fc ee6c1800 e19c2240 d2168000 e19c2240 ee6c1800 00000000                                                                                               
[ 4989.593927] fda0: ecf2fdd4 ecf2fdb0 c048ff04 c048f6d0 c9b2a8c0 000026fe 00000002 c04f9160                                                                                               
[ 4989.602091] fdc0: d2168056 d2168056 ecf2fdfc ecf2fdd8 c048fafc c048fec4 c044799c c0135aa8                                                                                               
[ 4989.610255] fde0: ecf2fe0c 00000056 d2168000 e19c2240 ecf2fe2c ecf2fe00 c0490250 c048f9a8                                                                                               
[ 4989.618419] fe00: ecf2fe2c ecf2fe10 c04f9160 c0447f48 c07ea6fc 00000008 ee6c1800 c07ea710                                                                                               
[ 4989.626583] fe20: ecf2fe7c ecf2fe30 c0459604 c048ff70 e19c2240 ede27380 ecf2e020 c03b2628                                                                                               
[ 4989.634747] fe40: ee401e80 e19c2240 ecf2fe74 c07ea710 c04aad0c e19c2240 ee9d51f4 00000000                                                                                               
[ 4989.642911] fe60: ee9d5194 00000040 ee9d51e4 00000000 ecf2fe94 ecf2fe80 c0459848 c0459010                                                                                               
[ 4989.651075] fe80: e19c2240 ee9d51f4 ecf2fecc ecf2fe98 c045b09c c0459834 c047b46c ee9d51f0                                                                                               
[ 4989.659240] fea0: ecf2fec4 00000001 00000000 00000040 0000012c ee9d5180 ecf2e000 ee9d51f4                                                                                               
[ 4989.667404] fec0: ecf2ff0c ecf2fed0 c045aea0 c045b004 ecf2ff0c 0007279c ee9d5188 ecf2e000                                                                                               
[ 4989.675568] fee0: c045776c 00000003 ecf2e000 c07cc08c 00000001 00000001 00000100 000002ff                                                                                               
[ 4989.683732] ff00: ecf2ff5c ecf2ff10 c0028ee0 c045ad70 01400000 c07cd900 00000001 00400040                                                                                               
[ 4989.691896] ff20: 0007279b 00000005 ecf2e010 0000000c c006c72c ecf2e020 c07c6d44 00000000                                                                                               
[ 4989.700060] ff40: 00000000 00000000 018cd15c 000002ff ecf2ff74 ecf2ff60 c00294bc c0028dc0                                                                                               
[ 4989.708224] ff60: 00000000 c07c6d44 ecf2ff9c ecf2ff78 c006938c c0029408 ecf2ffb0 b6b47408                                                                                               
[ 4989.716389] ff80: a0000010 f300b200 10c5387d 10c5387d ecf2ffac ecf2ffa0 c0008564 c006930c                                                                                               
[ 4989.724555] ffa0: 00000000 ecf2ffb0 c05349bc c0008544 b0100010 00000001 000005e8 00000000                                                                                               
[ 4989.732720] ffc0: 018cd1b0 000000bc 00000010 54df62ab 00000000 018cd15c 000002ff 80000000                                                                                               
[ 4989.740884] ffe0: 000cfc28 b1a82688 b6b473f4 b6b47408 a0000010 ffffffff 2effa821 2effac21                                                                                               
[ 4989.749065] [<c03d76fc>] (assign_and_init_hc) from [<c03d9850>] (dwc_otg_hcd_select_transactions+0x244/0x370)                                                                           
[ 4989.758971] [<c03d9850>] (dwc_otg_hcd_select_transactions) from [<c03dc758>] (release_channel.isra.10+0x190/0x224)                                                                      
[ 4989.769307] [<c03dc758>] (release_channel.isra.10) from [<c03dc930>] (halt_channel+0xb0/0x168)                                                                                          
[ 4989.777908] [<c03dc930>] (halt_channel) from [<c03dca6c>] (complete_non_periodic_xfer+0x84/0xa8)                                                                                        
[ 4989.786683] [<c03dca6c>] (complete_non_periodic_xfer) from [<c03ddaec>] (handle_hc_xfercomp_intr+0x2b4/0x430)                                                                           
[ 4989.796585] [<c03ddaec>] (handle_hc_xfercomp_intr) from [<c03defe4>] (dwc_otg_hcd_handle_hc_n_intr+0x364/0x6c4)                                                                         
[ 4989.806661] [<c03defe4>] (dwc_otg_hcd_handle_hc_n_intr) from [<c03df3f4>] (dwc_otg_hcd_handle_hc_intr+0xb0/0xf0)                                                                        
[ 4989.816822] [<c03df3f4>] (dwc_otg_hcd_handle_hc_intr) from [<c03df6a4>] (dwc_otg_hcd_handle_intr+0x270/0x368)                                                                           
[ 4989.826723] [<c03df6a4>] (dwc_otg_hcd_handle_intr) from [<c03dbbf4>] (dwc_otg_hcd_irq+0x1c/0x28)                                                                                        
[ 4989.835499] [<c03dbbf4>] (dwc_otg_hcd_irq) from [<c03af870>] (usb_hcd_irq+0x34/0x48)                                                                                                    
[ 4989.843236] [<c03af870>] (usb_hcd_irq) from [<c0069a1c>] (handle_irq_event_percpu+0x40/0x244)                                                                                           
[ 4989.851753] [<c0069a1c>] (handle_irq_event_percpu) from [<c0069c6c>] (handle_irq_event+0x4c/0x6c)                                                                                       
[ 4989.860619] [<c0069c6c>] (handle_irq_event) from [<c006ccdc>] (handle_level_irq+0xac/0x130)                                                                                             
[ 4989.868962] [<c006ccdc>] (handle_level_irq) from [<c0069384>] (__handle_domain_irq+0x84/0xdc)                                                                                           
[ 4989.877477] [<c0069384>] (__handle_domain_irq) from [<c0008564>] (asm_do_IRQ+0x2c/0x30)                                                                                                 
[ 4989.885472] [<c0008564>] (asm_do_IRQ) from [<c05345f4>] (__irq_svc+0x34/0x14c)
[ 4989.892679] Exception stack(0xecf2fbd8 to 0xecf2fc20)                                                                                                                                   
[ 4989.897719] fbc0:                                                       000005a8 e19bc600                                                                                               
[ 4989.905884] fbe0: ad7c148c ad7d8857 ec0e4200 e19bc600 000005a8 00000001 ec0e45b4 00000000                                                                                               
[ 4989.914048] fc00: 00000002 ecf2fc94 00055f80 ecf2fc20 00000000 c04ac6c0 60000113 ffffffff                                                                                               
[ 4989.922218] [<c05345f4>] (__irq_svc) from [<c04ac6c0>] (tcp_write_xmit+0x6c/0xc34)                                                                                                      
[ 4989.929781] [<c04ac6c0>] (tcp_write_xmit) from [<c04ad59c>] (__tcp_push_pending_frames+0x40/0xa0)                                                                                       
[ 4989.938643] [<c04ad59c>] (__tcp_push_pending_frames) from [<c04a8fc8>] (tcp_rcv_established+0x21c/0x610)                                                                                
[ 4989.948112] [<c04a8fc8>] (tcp_rcv_established) from [<c04b148c>] (tcp_v4_do_rcv+0x14c/0x368)                                                                                            
[ 4989.956541] [<c04b148c>] (tcp_v4_do_rcv) from [<c04b3d54>] (tcp_v4_rcv+0x864/0x878)                                                                                                     
[ 4989.964191] [<c04b3d54>] (tcp_v4_rcv) from [<c048f7b0>] (ip_local_deliver_finish+0xec/0x2d8)                                                                                            
[ 4989.972620] [<c048f7b0>] (ip_local_deliver_finish) from [<c048ff04>] (ip_local_deliver+0x4c/0xac)                                                                                       
[ 4989.981481] [<c048ff04>] (ip_local_deliver) from [<c048fafc>] (ip_rcv_finish+0x160/0x3ec)                                                                                               
[ 4989.989648] [<c048fafc>] (ip_rcv_finish) from [<c0490250>] (ip_rcv+0x2ec/0x4a4)                                                                                                         
[ 4989.996952] [<c0490250>] (ip_rcv) from [<c0459604>] (__netif_receive_skb_core+0x600/0x824)                                                                                              
[ 4990.005210] [<c0459604>] (__netif_receive_skb_core) from [<c0459848>] (__netif_receive_skb+0x20/0x70)                                                                                   
[ 4990.014418] [<c0459848>] (__netif_receive_skb) from [<c045b09c>] (process_backlog+0xa4/0x170)                                                                                           
[ 4990.022930] [<c045b09c>] (process_backlog) from [<c045aea0>] (net_rx_action+0x13c/0x294)                                                                                                
[ 4990.031011] [<c045aea0>] (net_rx_action) from [<c0028ee0>] (__do_softirq+0x12c/0x384)                                                                                                   
[ 4990.038831] [<c0028ee0>] (__do_softirq) from [<c00294bc>] (irq_exit+0xc0/0x110)                                                                                                         
[ 4990.046131] [<c00294bc>] (irq_exit) from [<c006938c>] (__handle_domain_irq+0x8c/0xdc)                                                                                                   
[ 4990.053951] [<c006938c>] (__handle_domain_irq) from [<c0008564>] (asm_do_IRQ+0x2c/0x30)                                                                                                 
[ 4990.061943] [<c0008564>] (asm_do_IRQ) from [<c05349bc>] (__irq_usr+0x3c/0x140)                                                                                                          
[ 4990.069150] Exception stack(0xecf2ffb0 to 0xecf2fff8)                                                                                                                                   
[ 4990.074191] ffa0:                                     b0100010 00000001 000005e8 00000000                                                                                               
[ 4990.082355] ffc0: 018cd1b0 000000bc 00000010 54df62ab 00000000 018cd15c 000002ff 80000000                                                                                               
[ 4990.090517] ffe0: 000cfc28 b1a82688 b6b473f4 b6b47408 a0000010 ffffffff                                                                                                                 
[ 4990.097123] Code: e1520003 05942034 15941034 05872064 (15821034)
@P33M
Copy link
Contributor

P33M commented Feb 14, 2015

For reference, which list is being modified?

@P33M P33M self-assigned this Feb 14, 2015
@flipreverse
Copy link
Contributor Author

Oh, sry. I'm talking about dwc_otg_hc_t.free_hc_list.

@flipreverse
Copy link
Contributor Author

I pushed my first fix to my github account: https://github.com/flipreverse/linux/commits/dwcotgfix

@P33M
Copy link
Contributor

P33M commented Feb 15, 2015

You're adding a lock to every circleq_* call site. Many of these are in different contexts - particularly with regard to the top-level HCD lock being held or not. This makes the possibility of an A-B-B-A type deadlock far more likely...

There should be no need to have an additional lock. Holding the HCD spinlock while manipulating the list should be sufficient.

@flipreverse
Copy link
Contributor Author

I've been running my fix for a few hours. No deadlock happened. Instead, the same null pointer panic occured again. So, why is the cqe_next pointer NULL?
This is a circular list and if doesn't get modified somewhere else, this should not happen.

@P33M
Copy link
Contributor

P33M commented Feb 15, 2015

Please post a lsusb -v and dmesg since boot.

@flipreverse
Copy link
Contributor Author

May i have your email address to send you the requested stuff?

@P33M
Copy link
Contributor

P33M commented Feb 17, 2015

Sent an email to the address you have listed on Github.

@flipreverse
Copy link
Contributor Author

A lot of crashs later, i've got a bit more information about the error itself.
The kernel used to crash in assign_and_init() in drivers/usb/host/dwc_otg/dwc_otg_hcd.c when the drivers tries to remove an item from the list: DWC_CIRCLEQ_REMOVE_INIT(&hcd->free_hc_list, hc, hc_list_entry);.
Nothing new so far.
I figured out that the list has at least two elements. The first one, which gets peeked by DWC_CIRCLEQ_FIRST(&hcd->free_hc_list), has an empty prev and next pointer.
I placed a BUG_ON((elm)->field.cqe_prev == NULL || (elm)->field.cqe_next == NULL) at the end of every DWC_CIRCLEQ_* macro which modifies a list. None of them triggered a panic.
In addition to the free list spinlock, i disabled the fiq before modifying the free list and enabled it afterwards with respect to the fiq_enable variable.

Any further advices what i could do to find the source of this bug?

@P33M
Copy link
Contributor

P33M commented Apr 5, 2015

Hm.

Thinking about this a bit - what happens if we have no host channels left and try to assign one?

Ordinarily this won't happen because it's very unlikely that you will have multiple transfers active on the bus at the same time - you would have to have 8 simultaneous outstanding transactions. With your particular use case I can see this happening.

Edit: Ordinarily this should be guarded by !dwc_circleq_empty in both cases but I wonder if the list itself gets corrupted if you e.g. hit zero channels available...

@flipreverse
Copy link
Contributor Author

Yeah, this might happen. But the hc list isn't empty.
I added the following code to get a slight insight into the situation:

if(hc->hc_list_entry.cqe_prev == NULL || hc->hc_list_entry.cqe_next ==  NULL) {
        printk(KERN_ERR "%s:%d hc=0x%p, hc->hc_num=%d, hc->hc_list_entry.cqe_prev=0x%p, hc->hc_list_entry.cqe_next=0x%p,\n isEmpty=%d hcd->free_hc_list.cqh_first=0x%p, hcd->free_hc_list.cqh_last=0x%p\n",
                        __func__,
                        __LINE__,
                        hc,
                        hc->hc_num,
                        hc->hc_list_entry.cqe_prev,
                        hc->hc_list_entry.cqe_next,
                        DWC_CIRCLEQ_EMPTY(&hcd->free_hc_list),
                        hcd->free_hc_list.cqh_first,
                        hcd->free_hc_list.cqh_last);
    }

This produces the following output:

[ 7409.347717] assign_and_init_hc:1219 hc=0xee7a0980, hc->hc_num=4, hc->hc_list_entry.cqe_prev=0x  (null), hc->hc_list_entry.cqe_next=0x (null),
[ 7409.347717]  isEmpty=0 hcd->free_hc_list.cqh_first=0xee7a0980, hcd->free_hc_list.cqh_last=0xee7a0900

@jkuek
Copy link

jkuek commented Sep 7, 2015

I've seen a similar (the same?) crash multiple times running Raspbian Jessie.

I'm not sure yet how to retrieve the crash log, but hopefully the attached screenshot is of use.

wp_20150907_14_14_26_pro

@P33M
Copy link
Contributor

P33M commented Sep 7, 2015

Can you post the output of sudo lsusb -v?

@jkuek
Copy link

jkuek commented Sep 7, 2015

Bus 001 Device 006: ID 0d8c:0016 C-Media Electronics, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0d8c C-Media Electronics, Inc.
  idProduct          0x0016 
  bcdDevice            1.00
  iManufacturer           1 C-Media Electronics Inc.
  iProduct                2 USB Audio Device
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          255
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol      0 
      iInterface              0 
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength          102
        bInCollection           2
        baInterfaceNr( 0)       1
        baInterfaceNr( 1)       2
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0 
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             2
        wTerminalType      0x0201 Microphone
        bAssocTerminal          0
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0 
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             6
        wTerminalType      0x0301 Speaker
        bAssocTerminal          0
        bSourceID               9
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             7
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               8
        iTerminal               0 
      AudioControl Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      5 (SELECTOR_UNIT)
        bUnitID                 8
        bNrInPins               1
        baSource( 0)           10
        iSelector               0 
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                 9
        bSourceID              15
        bControlSize            1
        bmaControls( 0)      0x01
          Mute Control
        bmaControls( 1)      0x02
          Volume Control
        bmaControls( 2)      0x02
          Volume Control
        iFeature                0 
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                10
        bSourceID               2
        bControlSize            1
        bmaControls( 0)      0x41
          Mute Control
          Automatic Gain Control
        bmaControls( 1)      0x02
          Volume Control
        bmaControls( 2)      0x02
          Volume Control
        iFeature                0 
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                13
        bSourceID               2
        bControlSize            1
        bmaControls( 0)      0x01
          Mute Control
        bmaControls( 1)      0x02
          Volume Control
        bmaControls( 2)      0x02
          Volume Control
        iFeature                0 
      AudioControl Interface Descriptor:
        bLength                13
        bDescriptorType        36
        bDescriptorSubtype      4 (MIXER_UNIT)
        bUnitID                15
        bNrInPins               2
        baSourceID( 0)          1
        baSourceID( 1)         13
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0 
        bmControls         0x00
        iMixer                  0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           1
        bDelay                  1 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                14
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            2 Discrete
        tSamFreq[ 0]        48000
        tSamFreq[ 1]        44100
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            9
          Transfer Type            Isochronous
          Synch Type               Adaptive
          Usage Type               Data
        wMaxPacketSize     0x00c8  1x 200 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         1 Milliseconds
          wLockDelay              1 Milliseconds
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           7
        bDelay                  1 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                14
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            2 Discrete
        tSamFreq[ 0]        48000
        tSamFreq[ 1]        44100
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes           13
          Transfer Type            Isochronous
          Synch Type               Synchronous
          Usage Type               Data
        wMaxPacketSize     0x00c8  1x 200 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         0 Undefined
          wLockDelay              0 Undefined
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.00
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      60
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x87  EP 7 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval               2
Device Status:     0x0000
  (Bus Powered)

Bus 001 Device 061: ID 1199:68a3 Sierra Wireless, Inc. MC8700 Modem
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x1199 Sierra Wireless, Inc.
  idProduct          0x68a3 MC8700 Modem
  bcdDevice            0.06
  iManufacturer           3 Sierra Wireless, Incorporated
  iProduct                2 SL8084T
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          310
    bNumInterfaces          5
    bConfigurationValue     1
    iConfiguration          1 Sierra Configuration
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 15 00 01
      ** UNRECOGNIZED:  05 24 06 00 00
      ** UNRECOGNIZED:  15 24 12 20 01 98 b0 6a 49 b0 9e 48 96 94 46 d9 9a 28 ca 4e 5d
      ** UNRECOGNIZED:  06 24 13 00 01 10
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 15 00 01
      ** UNRECOGNIZED:  05 24 06 01 01
      ** UNRECOGNIZED:  15 24 12 20 01 98 b0 6a 49 b0 9e 48 96 94 46 d9 9a 28 ca 4e 5d
      ** UNRECOGNIZED:  06 24 13 00 01 10
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 15 00 01
      ** UNRECOGNIZED:  05 24 06 02 02
      ** UNRECOGNIZED:  15 24 12 20 01 98 b0 6a 49 b0 9e 48 96 94 46 d9 9a 28 ca 4e 5d
      ** UNRECOGNIZED:  06 24 13 00 01 10
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 01 03 03
      ** UNRECOGNIZED:  05 24 06 03 03
      ** UNRECOGNIZED:  15 24 12 20 01 98 b0 6a 49 b0 9e 48 96 94 46 d9 9a 28 ca 4e 5d
      ** UNRECOGNIZED:  06 24 13 00 01 10
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               5
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        7
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               5
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x87  EP 7 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x05  EP 5 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

Bus 001 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          224 Wireless
  bDeviceSubClass         1 Radio Frequency
  bDeviceProtocol         1 Bluetooth
  bMaxPacketSize0        64
  idVendor           0x0a12 Cambridge Silicon Radio, Ltd
  idProduct          0x0001 Bluetooth Dongle (HCI mode)
  bcdDevice           88.91
  iManufacturer           0 
  iProduct                2 CSR8510 A10
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          177
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0000  1x 0 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0000  1x 0 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0009  1x 9 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0009  1x 9 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0011  1x 17 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0011  1x 17 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0019  1x 25 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0019  1x 25 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       4
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0021  1x 33 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0021  1x 33 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       5
      bNumEndpoints           2
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      1 Bluetooth
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0031  1x 49 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            1
          Transfer Type            Isochronous
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0031  1x 49 bytes
        bInterval               1
Device Status:     0x0001
  Self Powered

Bus 001 Device 049: ID 1a2c:0021 China Resource Semico Co., Ltd Keyboard
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x1a2c China Resource Semico Co., Ltd
  idProduct          0x0021 Keyboard
  bcdDevice            1.10
  iManufacturer           1 USB
  iProduct                2 USB Keykoard
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           59
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               98mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      54
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      50
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0003  1x 3 bytes
        bInterval              10
Device Status:     0x0000
  (Bus Powered)

Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         0 
  bDeviceProtocol         1 
  bMaxPacketSize0        64
  idVendor           0x0424 Standard Microsystems Corp.
  idProduct          0xec00 SMSC9512/9514 Fast Ethernet Adapter
  bcdDevice            2.00
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol    255 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               4
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         0 
  bDeviceProtocol         1 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         2 TT per port
  bMaxPacketSize0        64
  idVendor           0x0424 Standard Microsystems Corp.
  idProduct          0x9514 
  bcdDevice            2.00
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      1 Single TT
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      2 TT per port
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             5
  wHubCharacteristic 0x000d
    Per-port power switching
    Compound device
    Per-port overcurrent protection
    TT think time 8 FS bits
  bPwrOn2PwrGood       50 * 2 milli seconds
  bHubContrCurrent      1 milli Ampere
  DeviceRemovable    0x02
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0503 highspeed power enable connect
   Port 2: 0000.0303 lowspeed power enable connect
   Port 3: 0000.0103 power enable connect
   Port 4: 0000.0503 highspeed power enable connect
   Port 5: 0000.0103 power enable connect
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0 Full speed (or root) hub
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            4.01
  iManufacturer           3 Linux 4.1.6+ dwc_otg_hcd
  iProduct                2 DWC OTG Controller
  iSerial                 1 20980000.usb
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12
Hub Descriptor:
  bLength               9
  bDescriptorType      41
  nNbrPorts             1
  wHubCharacteristic 0x0008
    Ganged power switching
    Per-port overcurrent protection
    TT think time 8 FS bits
  bPwrOn2PwrGood        1 * 2 milli seconds
  bHubContrCurrent      0 milli Ampere
  DeviceRemovable    0x00
  PortPwrCtrlMask    0xff
 Hub Port Status:
   Port 1: 0000.0503 highspeed power enable connect
Device Status:     0x0001
  Self Powered

@jkuek
Copy link

jkuek commented Jan 21, 2016

I saw this happen again today
wp_20160121_16_58_28_pro

I wonder whether this isn't related to #1256

@bogardusj
Copy link

bogardusj commented Jun 1, 2016

I have also encountered this problem. I have encountered it on kernels 4.1.19-v7+ and 4.4.11-v7+ (built from git; with some extra printks). I have encountered it with various combinations of USB devices, but for me it seems to require 2 USB cameras (tried with multiple UVC and Playstation Eye cameras) and a custom pic24 based full-speed USB device. Throwing in continuous reads of an old, full-speed USB flash drive seems to help it occur more quickly.

I have determined that the free_hc_list list is being corrupted because an hc is being appended to the list twice. Occasionally, dwc_otg_hcd_handle_hc_intr() is reading that a given host channel has a pending interrupt, but the corresponding dwc_hc_t structure is already on the free_hc_list - at the end of the list in every case I've seen. When dwc_otg_hcd_handle_hc_n_intr() calls release_channel(), the dwc_hc_t structure gets appended to the free_hc_list, resulting in it effectively being in the free_hc_list twice (since its own cqe_next points to itself). Later, it will get removed from the free_hc_list twice. The first time clears the cqe_next pointer, so it contains NULL when removed a second time - resulting in the NULL pointer dereference.

I don't know enough about the hardware to know if/why there is either an extra interrupt or the original interrupt isn't being cleared.

lsusb.txt

@P33M
Copy link
Contributor

P33M commented Jun 1, 2016

If that's the case, then there is a path in the driver that is re-entrant in some strange way (two hardware interrupts arriving for the same channel, for example).

With there being a double-entry at the end of the list, I'd suspect bogus interrupts occurring in quick succession could cause this.

@P33M
Copy link
Contributor

P33M commented May 15, 2017

fixed in #2010

@P33M P33M closed this as completed May 15, 2017
@popcornmix
Copy link
Collaborator

rpi-update firmware contains latest kernel fixes. Please update and test.

pfpacket pushed a commit to pfpacket/linux-rpi-rust that referenced this issue Apr 7, 2023
rust: allow fs driver to initialise new superblocks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants