Skip to content

Commit

Permalink
drivers: net: cpsw: fix dt probe for one port ethernet
Browse files Browse the repository at this point in the history
When only one port of the two port is pinned out, then dt probe is failing
because second port phy is not found. fixing this by checking the number of
slaves and breaking the loop.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Mugunthan V N authored and David S. Miller committed Dec 2, 2013
1 parent 8496e85 commit 3a27bfa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/ti/cpsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1816,6 +1816,8 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
}

i++;
if (i == data->slaves)
break;
}

return 0;
Expand Down

0 comments on commit 3a27bfa

Please sign in to comment.