public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm, davinci_emac: fixup
Date: Wed, 09 Nov 2011 13:26:20 +0100	[thread overview]
Message-ID: <4EBA716C.5000105@denx.de> (raw)
In-Reply-To: <CA+V-a8tjFocNxsyxWFG0EYnwasxfW2OWvmuYD7RO4qCaK007Zw@mail.gmail.com>

Hello Prabhakar Lad,

Prabhakar Lad wrote:
> Hi Heiko,
> 
> On Wed, Nov 9, 2011 at 11:56 AM, Heiko Schocher <hs@denx.de> wrote:
[...]
>> Signed-off-by: Heiko Schocher <hs@denx.de>
>> Cc: Sandeep Paulraj <s-paulraj@ti.com>
>> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
>> Cc: Wolfgang Denk <wd@denx.de>
>> Cc: Manjunath Hadli <manjunath.hadli@ti.com>
>> ---
>>  drivers/net/davinci_emac.c |   17 +++++++++++------
>>  1 files changed, 11 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
>> index fa31159..a31e9f1 100644
>> --- a/drivers/net/davinci_emac.c
>> +++ b/drivers/net/davinci_emac.c
[...]
>> @@ -175,7 +174,13 @@ static int davinci_eth_phy_detect(void)
>>        for (i = 0, j = 0; i < 32; i++)
>>                if (phy_act_state & (1 << i)) {
>>                        count++;
>> -                       active_phy_addr[j++] = i;
>> +                       if (count < MAX_PHY)
>> +                               active_phy_addr[j++] = i;
>> +                       else {
>> +                               printf("%s: to much PHYs detected.\n",
>> +                                       __func__);
>>
>        why not make here count = 0 and then break, so that later
>        in davinci_emac_initialize() it wont initializes the phy's

I prefer here the error printf, because you see immediately what
is wrong...

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

  reply	other threads:[~2011-11-09 12:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-09  6:26 [U-Boot] [PATCH] arm, davinci_emac: fixup Heiko Schocher
2011-11-09  6:51 ` Wolfgang Denk
2011-11-09  6:56   ` Heiko Schocher
2011-11-09 11:39 ` Prabhakar Lad
2011-11-09 12:26   ` Heiko Schocher [this message]
2011-11-09 12:38     ` Prabhakar Lad
2011-11-09 12:45       ` Heiko Schocher
2011-11-09 13:04 ` [U-Boot] [PATCH v2] " Heiko Schocher
2011-11-09 16:23   ` Mike Frysinger
2011-11-09 16:50 ` [U-Boot] [PATCH v3] arm, davinci_emac: fix driver bug if more then 3 PHYs are detected Heiko Schocher
2011-11-09 17:05   ` Tom Rini
2011-11-10  4:43     ` Heiko Schocher
2011-11-10  5:04       ` Tom Rini
2011-11-10  6:00   ` [U-Boot] [PATCH v4] " Heiko Schocher
2011-11-10 14:37     ` Tom Rini

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=4EBA716C.5000105@denx.de \
    --to=hs@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