All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers: net: ethernet: cpsw: consider number of slaves in interation
@ 2013-02-26 14:06 Daniel Mack
  2013-02-26 14:55 ` Mugunthan V N
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Mack @ 2013-02-26 14:06 UTC (permalink / raw)
  To: netdev; +Cc: Daniel Mack, Mugunthan V N, David S. Miller

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>
---
 drivers/net/ethernet/ti/cpsw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 7e93df6..01ffbc4 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,
-- 
1.8.1.2

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

* Re: [PATCH] drivers: net: ethernet: cpsw: consider number of slaves in interation
  2013-02-26 14:06 [PATCH] drivers: net: ethernet: cpsw: consider number of slaves in interation Daniel Mack
@ 2013-02-26 14:55 ` Mugunthan V N
  2013-02-26 22:26   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Mugunthan V N @ 2013-02-26 14:55 UTC (permalink / raw)
  To: Daniel Mack; +Cc: netdev, David S. Miller

On 2/26/2013 7:36 PM, Daniel Mack wrote:
> 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>
Looks ok for me

Acked-by: Mugunthan V N <mugunthanvnm@ti.com>

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

* Re: [PATCH] drivers: net: ethernet: cpsw: consider number of slaves in interation
  2013-02-26 14:55 ` Mugunthan V N
@ 2013-02-26 22:26   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2013-02-26 22:26 UTC (permalink / raw)
  To: mugunthanvnm; +Cc: zonque, netdev

From: Mugunthan V N <mugunthanvnm@ti.com>
Date: Tue, 26 Feb 2013 20:25:46 +0530

> On 2/26/2013 7:36 PM, Daniel Mack wrote:
>> 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>
> Looks ok for me
> 
> Acked-by: Mugunthan V N <mugunthanvnm@ti.com>

Applied, thanks.

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

end of thread, other threads:[~2013-02-26 22:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-26 14:06 [PATCH] drivers: net: ethernet: cpsw: consider number of slaves in interation Daniel Mack
2013-02-26 14:55 ` Mugunthan V N
2013-02-26 22:26   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.