Re: usb_bulk_msg kernel hangs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 29 Apr 2010, Jeremy Ramer wrote:

> I have traced this hang as far as the function map_urb_for_dma()
> called in usb_hcd_submit_urb().  Since it seems DMA-related I have
> made the following patch to my driver that seems to have fixed the
> hang.  Are there any concerns with allocating the DMA coherent memory
> in the probe? Is it better to do this allocation on every transfer?

If you're going to use coherent memory, you might as well allocate it
just once.  The real question is whether it's better to use coherent
memory vs. ordinary streaming mappings.  For the x86 architecture
there's not much difference.  The memory allocated by
usb_alloc_buffer() uses up an entire page, but for only two buffers
that won't matter.

So you can continue doing this if it solves your problem.  On the other
hand, I would be interested to learn what's going wrong, if you can
track down the cause of your hangs into the DMA mapping code.

Alan Stern

--
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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux