public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] tsec: Configure the buffer descriptor bases to always include all of the descriptors
Date: Wed, 10 Aug 2011 21:24:50 +0200	[thread overview]
Message-ID: <m2k4alm5ml.fsf@ohwell.denx.de> (raw)
In-Reply-To: <CANr=Z=b5yPy=AnuocNtRjxs5+EszGgJF0gauBZTNxp5NxRVo=w@mail.gmail.com> (Joe Hershberger's message of "Wed, 10 Aug 2011 14:15:09 -0500")

Hi Joe,

> On Wed, Aug 10, 2011 at 7:29 AM, Detlev Zundel <dzu@denx.de> wrote:
>>> diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
>>> index 78ffc95..1805ca0 100644
>>> --- a/drivers/net/tsec.c
>>> +++ b/drivers/net/tsec.c
>>> @@ -250,8 +250,8 @@ static void startup_tsec(struct eth_device *dev)
>>> ? ? ? txIdx = 0;
>>>
>>> ? ? ? /* Point to the buffer descriptors */
>>> - ? ? out_be32(&regs->tbase, (unsigned int)(&rtx.txbd[txIdx]));
>>> - ? ? out_be32(&regs->rbase, (unsigned int)(&rtx.rxbd[rxIdx]));
>>> + ? ? out_be32(&regs->tbase, (unsigned int)(&rtx.txbd[0]));
>>> + ? ? out_be32(&regs->rbase, (unsigned int)(&rtx.rxbd[0]));
>>>
>>> ? ? ? /* Initialize the Rx Buffer descriptors */
>>> ? ? ? for (i = 0; i < PKTBUFSRX; i++) {
>>
>> I see these two lines just before the code you change (one is even in
>> the context of your patch):
>>
>> ? ? ? ?/* reset the indices to zero */
>> ? ? ? ?rxIdx = 0;
>> ? ? ? ?txIdx = 0;
>>
>> So can you tell me, what your change actually does? ?I cannot remember
>> that we have concurrency issues here, or do we?
>
> My apologies... I ported this patch from my work in u-boot 2009.11 and
> did not notice that change above.  I think explicitly using 0 when
> assigning the base address pointers is clearer, though.
>
> It seems the resetting of the indexes to 0 was added by Andy Fleming
> in 063c12633d5ad74d52152d9c358e715475e17629, though the log doesn't
> discuss it..

Yes, I see - it even slipped my review :(  For the patch as such I don't
have a preference - looking at the code both ways really read the same
for me.

Cheers
  Detlev

-- 
I've never understood the tendency to pick up tastes because they are popular.
In fact,  I think it is  foolish to do that.  I mean, don't  you know what you
like?  People who  are so weak that  they will take  their tastes  from people
around  them  in  the  desperate  desire  to be  accepted,  I think of them as
cowards.               -- Richard M. Stallman
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

  reply	other threads:[~2011-08-10 19:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-10  7:12 [U-Boot] [PATCH] tsec: Configure the buffer descriptor bases to always include all of the descriptors Joe Hershberger
2011-08-10 12:29 ` Detlev Zundel
2011-08-10 19:15   ` Joe Hershberger
2011-08-10 19:24     ` Detlev Zundel [this message]
2011-08-10 19:49       ` Andy Fleming
2011-08-10 20:59         ` Detlev Zundel
2011-08-10 14:10 ` Andy Fleming
2011-08-10 19:20   ` Joe Hershberger
2011-08-24 22:46     ` Wolfgang Denk
2011-08-24 22:48       ` Joe Hershberger
2011-08-10 21:14 ` Andy Fleming
2011-08-11 12:26 ` Sergei Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2k4alm5ml.fsf@ohwell.denx.de \
    --to=dzu@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox