From: Marek Vasut Date: Mon, 8 Jul 2013 15:06:14 +0200 Subject: [U-Boot] [PATCH] usb: fix unaligned access in device_qual() In-Reply-To: <20130704135027.1fa89a27@lilith> References: <1372320297-16275-1-git-send-email-hs@denx.de> <201307031530.20299.marex@denx.de> <20130704135027.1fa89a27@lilith> Message-ID: <201307081506.14301.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Albert ARIBAUD, > Hi Marek, > > On Wed, 3 Jul 2013 15:30:20 +0200, Marek Vasut wrote: > > Dear Albert ARIBAUD, > > > > > Hi Marek, > > > > > > On Thu, 27 Jun 2013 15:23:33 +0200, Marek Vasut wrote: > > > > Hello Albert, > > > > > > > > > Hi Marek, > > > > > > > > > > On Thu, 27 Jun 2013 13:26:39 +0200, Marek Vasut wrote: > > > > > > Dear Heiko Schocher, > > > > > > > > > > > > > while playing with dfu, I tapped in an unaligned access > > > > > > > when doing on the host side a "lsusb -d [vendornr]: -v" > > > > > > > > > > > > > I get on the board: > > > > > > Applied, thanks > > > > > > > > > > Now we have console log output in commit messages. :( > > > > > > > > Don't be sad, I will buy you a tartelette ;) > > > > > > Actually the sad part is that the patch in itself is bad: the actual > > > alignment boundary should have been 16 bit, not one cacheline. Also, > > > the issue could / should have been solved by reordering the fields > > > rather than using an attribute. > > > > Why 16 bit? I think cacheline alignment here makes sense if the > > descriptor is to be flush()'d from dcache. > > If it is then it should be moved out of the struct it currently lives > in, in order to avoid a big alignment gap, and replaced with a pointer. > Also, the commit message would then be wrong... Good point, Heiko, can you comment? Best regards, Marek Vasut