I wrote: > Felipe Tonello wrote: >> DSP (read sensors and read/send MIDI) <- UART -> SOC (imx6) <- USB >> MIDI GADGET -> HOST >> >> When the throughput from the DSP is high, thus causing the throughput >> on the USB to be high as well, I get a Kernel Panic saying to increase >> the coherent_pool. I've used some crazy sizes like 1M, 4M and even 8M. >> Obviously when I increase, it takes longer to crash but it still >> crashes. > > This sounds like a memory leak in your USB host controller's driver > (whatever it is). > > The USB MIDI driver uses URB_NO_TRANSFER_DMA_MAP with bulk transfers, Sorry, wrong driver. There's no URB_NO_TRANSFER_DMA_MAP in the gadget API. The f_midi driver does not use pre-mapped buffers, and the URB buffers would use streaming DMA mappings anyway. The coherent pool is used by host controller drivers for their internal structures, such as DMA descriptors. The "fsl_usb2_udc" driver (if that is what you're using) uses a coherent DMA pool for "TD management". I see no obvious problem with how it calls dma_pool_alloc()/dma_pool_free(). Are there any messages in the system log? You might want to modify the kernel to check how often it calls these functions. Regards, Clemens -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html