[Linux-Xtensa] USB host on linux-xtensa

Johannes Weiner jw at emlix.com
Sun May 17 22:22:21 PDT 2009


On Thu, May 14, 2009 at 04:39:32AM -0700, Sanu Mathews wrote:
> Hi,
> 
>   Has anyone tried enabling the USB support for xtensa-linux 2.6.24 ? I did the hook ups and when I run ,I see that the device descriptor request is reaching the device (the first eigth bytes after reset) and I have verified the data on the device side. I see that my target system (custom-xtensa-cpu) crashes and I get the following error
> -------------------------------------------------------------------------------------------
> BUG: spinlock bad magic on CPU#0, khubd/8

It hits a spinlock that is either not properly initialized or memory
corruption overwriting the lock magic.

> Unable to handle kernel paging request at virtual address 000001d2
>  pc = d00844f4, ra = 900845b0
> Oops: sig: 11 [#1]
> 
> a00: 900845b0 d3849a40 d3849e24 d012bd5c 00000002 00000000 000002b8 00000016
> a08: 900844e6 d38499f0 0000002d d012bd5c 00000004 d381d2b8 00000008 80008048
> pc: d00844f4, ps: 00060613, depc: 00000018, excvaddr: 000001d2
> lbeg: d00fca70, lend: d00fca7e lcount: 00000000, sar: 0000001e
> 
> Stack: 00000002 00000000 000002b8 00000016 90007728 d3849a90 00060403 00000001
>        00000001 00000005 00060003 d014ed94 00000000 ffffffff d06798b4 d24494c0
>        900ab25c d3849ab0 d3849e20 00060003 d06798b4 00000000 d3848000 ffffffff
> Call Trace:
>  [<d00fe1f2>] _spin_lock_irqsave+0xe/0x10
>  [<d0007728>] complete+0x10/0x34
>  [<d00ab25c>] usb_api_blocking_completion+0x10/0x14
>  [<d00a9c1e>] usb_hcd_giveback_urb+0x3e/0x70
>  [<d00b3288>] ehci_urb_done+0x68/0x74
>  [<d00b3989>] qh_completions+0x289/0x300
>  [<d00b436d>] ehci_work+0xa9/0x4a0
>  [<d00b66e0>] ehci_irq+0x1f8/0x6f0
>  [<d00aa2c4>] usb_hcd_irq+0x48/0x50
>  [<d00229d0>] handle_IRQ_event+0x1c/0x40
>  [<d002396d>] handle_edge_irq+0x95/0x108
>  [<d0002668>] do_IRQ+0x38/0x44
>  [<d0003efc>] do_interrupt+0x9c/0xcc
>  [<d0001af1>] common_exception_return+0x0/0x3f

This is all usb core code, nothing xtensa related.  .24 is pretty old,
you might want to retry your luck with a more recent kernel, chances
are that this has long been fixed.


More information about the linux-xtensa mailing list