public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ARM: davici_emac: Fix condition for number of phy detects
@ 2011-11-17 12:53 prabhakar.csengg at gmail.com
  2011-11-17 13:04 ` Heiko Schocher
  0 siblings, 1 reply; 4+ messages in thread
From: prabhakar.csengg at gmail.com @ 2011-11-17 12:53 UTC (permalink / raw)
  To: u-boot

From: Prabhakar Lad <prabhakar.csengg@gmail.com>

Fix the condition for number of phys in
davinci_eth_phy_detect() function.
CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT indicates number of
phys. From this commit id dc02badab480563b0bf9d3908046ea9d6b22ae63
davinci emac initilazed one less than the number of phy count.

Signed-off-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
---
 drivers/net/davinci_emac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 36c33af..34b6f94 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -176,7 +176,7 @@ static int davinci_eth_phy_detect(void)
 	for (i = 0, j = 0; i < 32; i++)
 		if (phy_act_state & (1 << i)) {
 			count++;
-			if (count < CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT) {
+			if (count <= CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT) {
 				active_phy_addr[j++] = i;
 			} else {
 				printf("%s: to many PHYs detected.\n",
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] ARM: davici_emac: Fix condition for number of phy detects
  2011-11-17 12:53 [U-Boot] [PATCH] ARM: davici_emac: Fix condition for number of phy detects prabhakar.csengg at gmail.com
@ 2011-11-17 13:04 ` Heiko Schocher
  2011-11-29  4:30   ` Prabhakar Lad
  0 siblings, 1 reply; 4+ messages in thread
From: Heiko Schocher @ 2011-11-17 13:04 UTC (permalink / raw)
  To: u-boot

Hello prabhakar.csengg at gmail.com

prabhakar.csengg at gmail.com wrote:
> From: Prabhakar Lad <prabhakar.csengg@gmail.com>
> 
> Fix the condition for number of phys in
> davinci_eth_phy_detect() function.
> CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT indicates number of
> phys. From this commit id dc02badab480563b0bf9d3908046ea9d6b22ae63
> davinci emac initilazed one less than the number of phy count.
> 
> Signed-off-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
> ---
>  drivers/net/davinci_emac.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
> index 36c33af..34b6f94 100644
> --- a/drivers/net/davinci_emac.c
> +++ b/drivers/net/davinci_emac.c
> @@ -176,7 +176,7 @@ static int davinci_eth_phy_detect(void)
>  	for (i = 0, j = 0; i < 32; i++)
>  		if (phy_act_state & (1 << i)) {
>  			count++;
> -			if (count < CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT) {
> +			if (count <= CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT) {
>  				active_phy_addr[j++] = i;
>  			} else {
>  				printf("%s: to many PHYs detected.\n",

good catch!

Acked-by: Heiko Schocher <hs@denx.de>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] ARM: davici_emac: Fix condition for number of phy detects
  2011-11-17 13:04 ` Heiko Schocher
@ 2011-11-29  4:30   ` Prabhakar Lad
  2011-11-29 20:38     ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Prabhakar Lad @ 2011-11-29  4:30 UTC (permalink / raw)
  To: u-boot

Sandeep,

Can you take this patch ?

Regards,
--Prabhakar Lad

On Thu, Nov 17, 2011 at 6:34 PM, Heiko Schocher <hs@denx.de> wrote:

> Hello prabhakar.csengg at gmail.com
>
> prabhakar.csengg at gmail.com wrote:
> > From: Prabhakar Lad <prabhakar.csengg@gmail.com>
> >
> > Fix the condition for number of phys in
> > davinci_eth_phy_detect() function.
> > CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT indicates number of
> > phys. From this commit id dc02badab480563b0bf9d3908046ea9d6b22ae63
> > davinci emac initilazed one less than the number of phy count.
> >
> > Signed-off-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
> > ---
> >  drivers/net/davinci_emac.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
> > index 36c33af..34b6f94 100644
> > --- a/drivers/net/davinci_emac.c
> > +++ b/drivers/net/davinci_emac.c
> > @@ -176,7 +176,7 @@ static int davinci_eth_phy_detect(void)
> >       for (i = 0, j = 0; i < 32; i++)
> >               if (phy_act_state & (1 << i)) {
> >                       count++;
> > -                     if (count < CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT) {
> > +                     if (count <= CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT) {
> >                               active_phy_addr[j++] = i;
> >                       } else {
> >                               printf("%s: to many PHYs detected.\n",
>
> good catch!
>
> Acked-by: Heiko Schocher <hs@denx.de>
>
> bye,
> Heiko
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] ARM: davici_emac: Fix condition for number of phy detects
  2011-11-29  4:30   ` Prabhakar Lad
@ 2011-11-29 20:38     ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2011-11-29 20:38 UTC (permalink / raw)
  To: u-boot

On Mon, Nov 28, 2011 at 9:30 PM, Prabhakar Lad
<prabhakar.csengg@gmail.com> wrote:
> Sandeep,
>
> Can you take this patch ?
>
> Regards,
> --Prabhakar Lad
>
> On Thu, Nov 17, 2011 at 6:34 PM, Heiko Schocher <hs@denx.de> wrote:
>
>> Hello prabhakar.csengg at gmail.com
>>
>> prabhakar.csengg at gmail.com wrote:
>> > From: Prabhakar Lad <prabhakar.csengg@gmail.com>
>> >
>> > Fix the condition for number of phys in
>> > davinci_eth_phy_detect() function.
>> > CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT indicates number of
>> > phys. From this commit id dc02badab480563b0bf9d3908046ea9d6b22ae63
>> > davinci emac initilazed one less than the number of phy count.
>> >
>> > Signed-off-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
>> > ---
>> > ?drivers/net/davinci_emac.c | ? ?2 +-
>> > ?1 files changed, 1 insertions(+), 1 deletions(-)
>> >
>> > diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
>> > index 36c33af..34b6f94 100644
>> > --- a/drivers/net/davinci_emac.c
>> > +++ b/drivers/net/davinci_emac.c
>> > @@ -176,7 +176,7 @@ static int davinci_eth_phy_detect(void)
>> > ? ? ? for (i = 0, j = 0; i < 32; i++)
>> > ? ? ? ? ? ? ? if (phy_act_state & (1 << i)) {
>> > ? ? ? ? ? ? ? ? ? ? ? count++;
>> > - ? ? ? ? ? ? ? ? ? ? if (count < CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT) {
>> > + ? ? ? ? ? ? ? ? ? ? if (count <= CONFIG_SYS_DAVINCI_EMAC_PHY_COUNT) {
>> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? active_phy_addr[j++] = i;
>> > ? ? ? ? ? ? ? ? ? ? ? } else {
>> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? printf("%s: to many PHYs detected.\n",
>>
>> good catch!
>>
>> Acked-by: Heiko Schocher <hs@denx.de>

(Will be) queued to u-boot-ti, thanks!

-- 
Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-29 20:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-17 12:53 [U-Boot] [PATCH] ARM: davici_emac: Fix condition for number of phy detects prabhakar.csengg at gmail.com
2011-11-17 13:04 ` Heiko Schocher
2011-11-29  4:30   ` Prabhakar Lad
2011-11-29 20:38     ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox