From: Jean-Christophe PLAGNIOL-VILLARD Date: Wed, 8 Jul 2009 23:03:33 +0200 Subject: [U-Boot] [PATCH 4/4]: arm: Kirkwood: See to it that sent data is 8-byte aligned In-Reply-To: <20090708144439.4f7e3331@marrow.netinsight.se> References: <20090708130542.321f7951@marrow.netinsight.se> <73173D32E9439E4ABB5151606C3E19E202DD54DE20@SC-VEXCH1.marvell.com> <20090708144439.4f7e3331@marrow.netinsight.se> Message-ID: <20090708210333.GG12394@game.jcrosoft.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 14:44 Wed 08 Jul , Simon Kagstrom wrote: > On Wed, 8 Jul 2009 05:17:08 -0700 > Prafulla Wadaskar wrote: > > > > U-boot might use non-8-byte-aligned addresses for sending > > > data, which the kwgbe_send doesn't accept (bootp does this > > > for me). This patch copies the data to be sent to a temporary > > > buffer if it is non-aligned. > > Kirkwood egiga driver may not be the only client for this kind of requirements. Any Ethernet controller using DMA will require aligned data pointer. > > I would suggest either upper layers should pass the aligned buffer pointers > > Or > > this patch should go in net/ethic, so that other drivers can benefit > > Well, I've looked around a bit and other drivers also handle it this > way - see greth.c for example. I agree that it would be nice to handle > it at an upper layer, but that would require a good code review to find > the potential places where this problem could occur. I feel I'm a bit > too U-boot green to do that as of now :-) > > I'll submit a new patch with this malloc'ed though. I agree with Prafulla Ben what do you think? Best Regards, J.