diff options
| author | Lennart Sorensen <[email protected]> | 2014-10-31 17:28:54 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2014-10-31 20:16:42 +0000 |
| commit | 35532c211b1feda52078685bef0bf9b5f3b0991c (patch) | |
| tree | d35fd25f0fdce665a75d7b6134172b0d097ae3dd /drivers/net/xen-netback/interface.c | |
| parent | ethernet: mvneta: Use PHY status standard message (diff) | |
| download | kernel-35532c211b1feda52078685bef0bf9b5f3b0991c.tar.gz kernel-35532c211b1feda52078685bef0bf9b5f3b0991c.zip | |
drivers: net: cpsw: Fix broken loop condition in switch mode
0d961b3b52f566f823070ce2366511a7f64b928c (drivers: net: cpsw: fix buggy
loop condition) accidentally fixed a loop comparison in too many places
while fixing a real bug.
It was correct to fix the dual_emac mode section since there 'i' is used
as an index into priv->slaves which is a 0 based array.
However the other two changes (which are only used in switch mode)
are wrong since there 'i' is actually the ALE port number, and port 0
is the host port, while port 1 and up are the slave ports.
Putting the loop condition back in the switch mode section fixes it.
A comment has been added to point out the intent clearly to avoid future
confusion. Also a comment is fixed that said the opposite of what was
actually happening.
Signed-off-by: Len Sorensen <[email protected]>
Acked-by: Heiko Schocher <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/xen-netback/interface.c')
0 files changed, 0 insertions, 0 deletions
