[U-Boot] [PATCH 1/5] net: ll_temac: Add LL TEMAC driver to u-boot
Stephan Linz
linz at li-pro.net
Mon Jan 16 18:46:53 CET 2012
Am Montag, den 16.01.2012, 09:14 +0100 schrieb Wolfgang Denk:
> Dear Stephan Linz,
Hi Wolfgang,
you are right in all points. I'll go into the next round and handle all
new request.
br,
Stephan
>
> In message <1326652166.18981.213.camel at keto> you wrote:
> >
> > > come code already declares PktBuf ... can't you use that ?
> >
> > Hm, what do you mean exactly here?
> >
> > These are the two DMA transfer buffers. I have no idea if there are
> > buffers in the upper layer (NET) and how I can use it for DMA transfers.
>
> It's a bad thing not to look at common code, but thnings like that
> happen too easily.
>
> However, now that this has been pointed out, you cannot simply ignore
> such a request.
>
> > Therfore I create my own rx/tx buffers and copy data. That reduce the
> > performance a little bit, but it's OK. Furthermore I have to use DMA
> > safe buffers here (no cache, 32 byte alignment).
>
> I could imagine this to be a pretty common requirement.
>
> > > this looks like a struct that should get allocated on the fly based on
> > > arguments given to the driver's registration func
> >
> > OK, it wast a little bit RAM. We can optimize the code later. I want to
> > see more testing results on differnet Microblaze and PPC platforms.
>
> we can fix this now, right?
>
> > > the memory is already zero-ed by the call to calloc, so this for loop is
> > > useless (and if it wasn't, you'd still use memset())
> >
> > Sure, we can remove this part in one of the next code optimization.
>
> No. Please fix this now, and then add a cleaned up driver. This is
> what the peer review process is all about.
>
> Best regards,
>
> Wolfgang Denk
>
More information about the U-Boot
mailing list