[U-Boot] [PATCH] USB:host: Attribute packed removed from usb structures

Marek Vasut marek.vasut at gmail.com
Mon Feb 27 14:14:26 CET 2012


> On 2/25/2012 3:42 PM, Albert ARIBAUD wrote:
> > Hi Amit,
> 
> Hello Albert,
> 
> > Le 24/02/2012 12:58, Amit Virdi a écrit :
> >> From: Vipin Kumar<vipin.kumar at st.com>
> >> 
> >> Packed attribute is forcing a bytewise write on device registers,
> >> there by, resulting in a misbehavior on gcc-4.4.1.
> >> Reverting the structures to non-packed
> > 
> > If (just asking, not asserting) the issue is caused by fields being u8
> > where u8 access is not possible, then should you not make the fields u16
> > / u32 according to access requirements?
> 
> The problem is not with the fields being of a different width. AFAIK,
> the packed attribute changes the generated code to access even the word
> field elements in a byte by byte manner
> 
> Infact, there is a discussion on lkml that I can point
> https://lkml.org/lkml/2011/4/27/278
> 
> It seems that the discussion did not lead to a conclusion but it was
> sensible (at least for ARM) to remove the packed attribute from this
> structure
> 
What does the USB spec say ? It might be a HW bug?

M


More information about the U-Boot mailing list