Skip to content

Commit

Permalink
ARM: davici_emac: Fix condition for number of phy detects
Browse files Browse the repository at this point in the history
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 dc02bad
davinci emac initilazed one less than the number of phy count.

Signed-off-by: Prabhakar Lad <[email protected]>
Acked-by: Heiko Schocher <[email protected]>
  • Loading branch information
prabhakarlad authored and albert-aribaud-u-boot committed Dec 6, 2011
1 parent 5cb939f commit b609009
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/davinci_emac.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,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",
Expand Down

0 comments on commit b609009

Please sign in to comment.