RE: gadget framework data alignment

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

 



On Tue, 15 Dec 2009, Gadiyar, Anand wrote:

> For g_ether, the buffers are allocated using kmalloc(), but the
> networking code seems to move the data in the buffer out by 2
> bytes, and passes this unaligned address down to the gadget driver.
> 
> The MUSB controller in the beagleboard could handle these unaligned
> DMA address, but looks like newer MUSB controllers don't seem to
> like this.

This is different from the point made in the earlier message (that 
buffers need to be aligned for clean/invalidate/flush buffer).

Assuming you can't get the network layer to avoid moving the data out,
you could modify either the controller driver or g_ether.  It's
probably best to make g_ether move the data back to the beginning of
the buffer.  The USB stack generally has strict requirements on data
alignment (because of the need to use maxpacket-sized DMA transfers).

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