[U-Boot] [PATCH] arm:kirkwood See to it that sent data is 8-byte aligned

Prafulla Wadaskar prafulla at marvell.com
Thu Aug 20 10:37:17 CEST 2009


 

> -----Original Message-----
> From: Jean-Christophe PLAGNIOL-VILLARD [mailto:plagnioj at jcrosoft.com] 
> Sent: Thursday, August 20, 2009 4:07 AM
> To: Simon Kagstrom
> Cc: Prafulla Wadaskar; U-Boot ML; Prabhanjan Sarnaik; Ashish Karkare
> Subject: Re: [U-Boot] [PATCH] arm:kirkwood See to it that 
> sent data is 8-byte aligned
> 
> On 12:48 Tue 18 Aug     , Simon Kagstrom wrote:
> > Thanks for the review Prafulla!
> > 
> > On Tue, 18 Aug 2009 03:12:07 -0700
> > Prafulla Wadaskar <prafulla at marvell.com> wrote:
> > 
> > > > v2: Malloc send buffer (comment from Stefan Roese)
> > > Malloc will always be an overhead.
> > 
> > It's only allocated once (the first time a non-aligned buffer is
> > passed), so the overhead is minimal.
> > 
> > > I strongly recommend- we should pass aligned buffers from 
> upper layers
> > > to avoid such rework in all low level drivers, (few are already
> > > aligned).
> > 
> > We could put the same fix in eth_send instead. Then the 
> issue is really
> > just how we know what alignment requirement to go for. I guess one
> > could add a field to the eth_device structure to store this and then
> > fixup all drivers to supply this.
> > 
> > If the rest of you thinks this is a good idea, I can cook 
> up a patch.
> > Opinions?
> some drivers would also have the possibility to have multiple 
> receive buffer
> specially when you use dma
> so IMHO it make more sense to let each drivers handle it itself
In that case it makes more sense to implement this even for rx path too in upper layer.
We should always push common functionalities to upper layers
And this is very generic need for any driver that uses dma for transfers

Regards..
Prafulla . .

> 
> Best Regards,
> J.
> 


More information about the U-Boot mailing list