diff options
author | Daniel Mack <zonque@gmail.com> | 2013-02-26 08:06:20 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-27 02:26:11 +0400 |
commit | 0237c11044b3670adcbe80cd6dd721285347f497 (patch) | |
tree | a52189d3590fe007ff3e60f74246a4d2cedda5e1 /drivers/net/ethernet/ti | |
parent | b86c761f691d4f8f16b5a40c3d6b71c62e4cb04d (diff) | |
download | linux-0237c11044b3670adcbe80cd6dd721285347f497.tar.xz |
drivers: net: ethernet: cpsw: consider number of slaves in interation
Make cpsw_add_default_vlan() look at the actual number of slaves for its
iteration, so boards with less than 2 slaves don't ooops at boot.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Mugunthan V N <mugunthanvnm@ti.com>
Cc: David S. Miller <davem@davemloft.net>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 7e93df6585e7..01ffbc486982 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -731,7 +731,7 @@ static inline void cpsw_add_default_vlan(struct cpsw_priv *priv) writel(vlan, &priv->host_port_regs->port_vlan); - for (i = 0; i < 2; i++) + for (i = 0; i < priv->data.slaves; i++) slave_write(priv->slaves + i, vlan, reg); cpsw_ale_add_vlan(priv->ale, vlan, ALE_ALL_PORTS << port, |