On Tue, Mar 26, 2013 at 07:06:19PM +0200, Felipe Balbi wrote: > On Tue, Mar 26, 2013 at 05:58:37PM +0100, Michael Grzeschik wrote: > > The udc uses an shared dma memory space between hard and software. This > > memory layout is described in ci13xxx_qh and ci13xxx_td which are marked > > with the attribute ((packed)). > > > > The compiler currently does not know about the alignment of the memory > > layout, and will create strb and ldrb operations. > > > > The Datasheet of the synopsys core describes, that some operations on > > the mapped memory need to be atomic double word operations. I.e. the > > next pointer addressing in the qhead, as otherwise the hardware could > > read wrong data and totally stuck. > > > > This patch adds the attribute ((aligned(4))) to the structures to tell > > the compiler to use 32bit operations. It also adds an wmb() for the > > prepared TD data before it gets enqueued into the qhead. > > > > Signed-off-by: Michael Grzeschik <m.grzeschik@xxxxxxxxxxxxxx> > > Cc stable ? Yes, will add when repost. -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- 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