Message ID | 1392299247-16917-1-git-send-email-hs@denx.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thursday 13 February 2014 07:17 PM, Heiko Schocher wrote: > commit: > From 0cd8f9cc0654c06adde353c6532114c5f53a18e8 Mon Sep 17 00:00:00 2001 > From: Mugunthan V N <mugunthanvnm@ti.com> > Date: Thu, 23 Jan 2014 00:03:12 +0530 > Subject: [PATCH] drivers: net: cpsw: enable promiscuous mode support > > Enable promiscuous mode support for CPSW. > > Introduced a crash on an am335x based board (similiar to am335x-evm). > Reason is buggy end condition in for loop in cpsw_set_promiscious() > > for (i = 0; i <= priv->data.slaves; i++) > > should be > > for (i = 0; i < priv->data.slaves; i++) > > Fix this ... > > Signed-off-by: Heiko Schocher <hs@denx.de> > Cc: Mugunthan V N <mugunthanvnm@ti.com> > Cc: David S. Miller <davem@davemloft.net> > Cc: Sebastian Siewior <bigeasy@linutronix.de> > Cc: Daniel Mack <zonque@gmail.com> > Cc: Felipe Balbi <balbi@ti.com> > Cc: Markus Pargmann <mpa@pengutronix.de> > Cc: netdev@vger.kernel.org > Cc: linux-kernel@vger.kernel.org Ah, it's copy paste error, thanks for the fix. Acked-by: Mugunthan V N <mugunthanvnm@ti.com> Regards Mugunthan V N
From: Heiko Schocher <hs@denx.de> Date: Thu, 13 Feb 2014 14:47:27 +0100 > commit: > From 0cd8f9cc0654c06adde353c6532114c5f53a18e8 Mon Sep 17 00:00:00 2001 > From: Mugunthan V N <mugunthanvnm@ti.com> > Date: Thu, 23 Jan 2014 00:03:12 +0530 > Subject: [PATCH] drivers: net: cpsw: enable promiscuous mode support The correct way to reference a commit is: $(SHA1_ID) ("Commit message header text.") So in this case it would be: Commit 0cd8f9cc0654c06adde353c6532114c5f53a18e8 ("drivers: net: cpsw: enable promiscuous mode support") I fixed this up when applying this patch. I will not extend this same courtesy next time. > Enable promiscuous mode support for CPSW. > > Introduced a crash on an am335x based board (similiar to am335x-evm). > Reason is buggy end condition in for loop in cpsw_set_promiscious() > > for (i = 0; i <= priv->data.slaves; i++) > > should be > > for (i = 0; i < priv->data.slaves; i++) > > Fix this ... > > Signed-off-by: Heiko Schocher <hs@denx.de> Applied, thanks.
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index bde63e3..34b4262 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -554,7 +554,7 @@ static void cpsw_set_promiscious(struct net_device *ndev, bool enable) * common for both the interface as the interface shares * the same hardware resource. */ - for (i = 0; i <= priv->data.slaves; i++) + for (i = 0; i < priv->data.slaves; i++) if (priv->slaves[i].ndev->flags & IFF_PROMISC) flag = true; @@ -578,7 +578,7 @@ static void cpsw_set_promiscious(struct net_device *ndev, bool enable) unsigned long timeout = jiffies + HZ; /* Disable Learn for all ports */ - for (i = 0; i <= priv->data.slaves; i++) { + for (i = 0; i < priv->data.slaves; i++) { cpsw_ale_control_set(ale, i, ALE_PORT_NOLEARN, 1); cpsw_ale_control_set(ale, i, @@ -606,7 +606,7 @@ static void cpsw_set_promiscious(struct net_device *ndev, bool enable) cpsw_ale_control_set(ale, 0, ALE_P0_UNI_FLOOD, 0); /* Enable Learn for all ports */ - for (i = 0; i <= priv->data.slaves; i++) { + for (i = 0; i < priv->data.slaves; i++) { cpsw_ale_control_set(ale, i, ALE_PORT_NOLEARN, 0); cpsw_ale_control_set(ale, i,