From: rketcham <Ric...@gm...> - 2009-03-25 14:25:37
|
Hello, I'm trying to cross-compile a proprietary driver for a USB device. When I load the driver and try to initialize the USB device I get the following error repeatedly: BUG: at arch/arm/mm/consistent.c:364 dma_free_coherent() (See end of this message for the entire error dump) This warning corresponds with this bit of code in consistent.c: WARN_ON(irqs_disabled()); After spitting this out a couple dozen times, the USB driver succeeds in initializing the device and the warnings stop. My question is: Is this a problem with my USB driver and the way it handles IRQs or is it something with the Gumstix software. Unfortunately, I can't post any code but I would appreciate any opinions on how to diagnose this or general incite. Thanks, Rich e2mausb is the USB driver I'm trying to get working. BUG: at arch/arm/mm/consistent.c:364 dma_free_coherent() [<c002ddc8>] (dump_stack+0x0/0x14) from [<c002ecd4>] (dma_free_coherent+0x38/0x20c) [<c002ec9c>] (dma_free_coherent+0x0/0x20c) from [<bf057450>] (hcd_buffer_free+0x80/0x88 [usbcore]) [<bf0573d0>] (hcd_buffer_free+0x0/0x88 [usbcore]) from [<bf04e2b0>] (usb_buffer_free+0x2c/0x30 [usbcore]) r4 = C7223600 [<bf04e284>] (usb_buffer_free+0x0/0x30 [usbcore]) from [<bf0bb004>] (usbWriteAsyncCompletion+0x40/0x50 [e2mausb]) [<bf0bafc4>] (usbWriteAsyncCompletion+0x0/0x50 [e2mausb]) from [<bf051fe4>] (usb_hcd_giveback_urb+0x28/0x74 [usbcore]) r4 = C7223600 [<bf051fbc>] (usb_hcd_giveback_urb+0x0/0x74 [usbcore]) from [<bf06b7d4>] (finish_urb+0xb4/0xe0 [ohci_hcd]) r4 = C7223600 [<bf06b720>] (finish_urb+0x0/0xe0 [ohci_hcd]) from [<bf06b974>] (dl_done_list+0x174/0x204 [ohci_hcd]) r5 = FFC64040 r4 = C6DB45E0 [<bf06b800>] (dl_done_list+0x0/0x204 [ohci_hcd]) from [<bf06dfd4>] (ohci_irq+0x13c/0x1c0 [ohci_hcd]) r8 = 00000002 r7 = C8880000 r6 = C75394D8 r5 = C7539400 r4 = C7539400 [<bf06de98>] (ohci_irq+0x0/0x1c0 [ohci_hcd]) from [<bf05282c>] (usb_hcd_irq+0x3c/0x8c [usbcore]) r8 = BEB4BE08 r7 = 00000003 r6 = 00000000 r5 = 00000000 r4 = C7539400 [<bf0527f0>] (usb_hcd_irq+0x0/0x8c [usbcore]) from [<c005a164>] (handle_IRQ_event+0x9c/0xe4) r4 = C7568520 [<c005a0c8>] (handle_IRQ_event+0x0/0xe4) from [<c005b9b4>] (handle_level_irq+0xb0/0x108) r7 = 0000000F r6 = 00000000 r5 = 00000003 r4 = C01E00C0 [<c005b904>] (handle_level_irq+0x0/0x108) from [<c002a598>] (asm_do_IRQ+0x44/0x60) r5 = C01E00C0 r4 = 00000003 [<c002a554>] (asm_do_IRQ+0x0/0x60) from [<c0029a00>] (__irq_usr+0x40/0x80) r6 = 00000008 r5 = BEB4BDF8 r4 = FFFFFFFF -- View this message in context: http://www.nabble.com/Warning-from-USB-driver-tp22702785p22702785.html Sent from the Gumstix mailing list archive at Nabble.com. |
From: rketcham <Ric...@gm...> - 2009-03-25 15:34:17
|
rketcham wrote: > > Unfortunately, I can't post any code but I would appreciate any opinions > on how to diagnose this or general incite. > I also found this post on the topic: http://linux.derkeiler.com/Mailing-Lists/Kernel/2007-08/msg04536.html WARNING: at arch/arm/mm/consistent.c:364 dma_free_coherent() ARM has a problem with dma_free_coherent with IRQ disabled. Unfortunately under high load ARM decides to use dma_free_coherent inside dma_unmap_sg(). This as far as I can see is an ARM problem not a libata problem and one you can duplicate with other drivers under high load. If someone knows about this problem that could explain to me what's going on and how I might mitigate it, I'd really appreciate it. Rich -- View this message in context: http://www.nabble.com/Warning-from-USB-driver-tp22702785p22704219.html Sent from the Gumstix mailing list archive at Nabble.com. |
From: Dave H. <dhy...@gm...> - 2009-03-25 16:15:16
|
Hi Rich, > I also found this post on the topic: > > http://linux.derkeiler.com/Mailing-Lists/Kernel/2007-08/msg04536.html > > WARNING: at arch/arm/mm/consistent.c:364 dma_free_coherent() > > ARM has a problem with dma_free_coherent with IRQ disabled. Unfortunately > under high load ARM decides to use dma_free_coherent inside > dma_unmap_sg(). This as far as I can see is an ARM problem not a libata > problem and one you can duplicate with other drivers under high load. It was my understanding that the dma_alloc/free and map/unmap stuff weren't supposed to be called from an atomic context (i.e. interrupts disabled is an atomic context). So the real issue seems to be with the driver which is calling the dma functions from the wrong context. -- Dave Hylands Shuswap, BC, Canada http://www.DaveHylands.com/ |