Re: DMA alignement in hcds

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

 



On Mon, Apr 20, 2009 at 11:51:41PM +0200, Martin Fuzzey wrote:
> Hi all,
> 
> I'm working on a HCD for the i.MX21 and am having problems with DMA
> alignment [my hardware requires DMA buffers to be aligned on a 4 byte
> boundary]
> 
> It seems that the usb core calls dma_map_single() from map_urb_for_dma()
> but that this only ensures the memory is is a DMAable region, not that
> it is correctly aligned.
> 
> Use case is pwc webcam driver which calls usb_control_message() with a
> non aligned stack allocated buffer pointer.

That's a bug, it should never do that.  I thought we fixed all of these
instances, what kernel version are you using that still does this?

> Does this mean the HCD has to handle this? (I ask because a brief look
> at the existing HCDs didn't turn up anything similar).

No, it doesn't, we should fix the driver to always submit heap allocated
pointers.

That should solve your problem, right?

thanks,

greg k-h
--
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