ARM: davici_emac: Fix condition for number of phy detects
PATCH 1/1 ARM: davici_emac: Fix condition for number of phy detects
From: Prabhakar Lad <[email protected]>
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.
--- drivers/net/davinci_emac.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/davinci_emac.c +1 -1
@@ -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",
Signature · 1 line
1.7.0.4
PATCH 1/1 ARM: davici_emac: Fix condition for number of phy detects
Hello prabhakar.csengg at gmail.com
Quoted 18 lines · prabhakar.csengg at gmail.com
From: Prabhakar Lad <[email protected]>
Fix the condition for number of phys in
davinci_eth_phy_detect()function.CONFIG_SYS_DAVINCI_EMAC_PHY_COUNTindicates number of phys. From this commit iddc02badab480563b0bf9d3908046ea9d6b22ae63davinci emac initilazed one less than the number of phy count.Signed-off-by Prabhakar Lad <[email protected]>--- drivers/net/davinci_emac.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/net/davinci_emac.c +0
-0
drivers/net/davinci_emac.c static int davinci_eth_phy_detect(void) · line 182
Quoted 8 lines
drivers/net/davinci_emac.c +1
-1@@ -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!
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 1/1 ARM: davici_emac: Fix condition for number of phy detects
Sandeep,
Can you take this patch ?
Regards,
--Prabhakar Lad
Quoted 40 lines · Heiko Schocher
Hello prabhakar.csengg at gmail.com
Quoted 18 lines · prabhakar.csengg at gmail.com
From: Prabhakar Lad <[email protected]>
Fix the condition for number of phys in
davinci_eth_phy_detect()function.CONFIG_SYS_DAVINCI_EMAC_PHY_COUNTindicates number of phys. From this commit iddc02badab480563b0bf9d3908046ea9d6b22ae63davinci emac initilazed one less than the number of phy count.Signed-off-by Prabhakar Lad <[email protected]>--- drivers/net/davinci_emac.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/net/davinci_emac.c +0
-0drivers/net/davinci_emac.c static int davinci_eth_phy_detect(void) · line 182
Quoted 8 lines
drivers/net/davinci_emac.c +1
-1@@ -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 <[email protected]>bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 1/1 ARM: davici_emac: Fix condition for number of phy detects
Quoted 42 lines · Prabhakar Lad
Sandeep,
Can you take this patch ?
Regards,
--Prabhakar LadQuoted 33 lines · Heiko Schocher
Hello prabhakar.csengg at gmail.com
Quoted 18 lines · prabhakar.csengg at gmail.com
From: Prabhakar Lad <[email protected]>
Fix the condition for number of phys in
davinci_eth_phy_detect()function.CONFIG_SYS_DAVINCI_EMAC_PHY_COUNTindicates number of phys. From this commit iddc02badab480563b0bf9d3908046ea9d6b22ae63davinci emac initilazed one less than the number of phy count.Signed-off-by Prabhakar Lad <[email protected]>---
?drivers/net/davinci_emac.c | ? ?2 +-
?1 files changed, 1 insertions(+), 1 deletions(-)drivers/net/davinci_emac.c +0
-0drivers/net/davinci_emac.c static int davinci_eth_phy_detect(void) · line 182
Quoted 8 lines
drivers/net/davinci_emac.c +1
-1@@ -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 <[email protected]>
(Will be) queued to u-boot-ti, thanks!
Signature · 1 line
Tom