summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ti/cpsw_ale.c
diff options
context:
space:
mode:
authorLennart Sorensen2014-10-31 18:28:54 +0100
committerDavid S. Miller2014-10-31 21:17:56 +0100
commit6f979eb3fcfb4c3f42f230d174db4bbad0080710 (patch)
treea5773dd32b92bda204ac7d91280e6aef51918924 /drivers/net/ethernet/ti/cpsw_ale.c
parentnet: ethtool: Return -EOPNOTSUPP if user space tries to read EEPROM with lengh 0 (diff)
downloadkernel-qcow2-linux-6f979eb3fcfb4c3f42f230d174db4bbad0080710.tar.gz
kernel-qcow2-linux-6f979eb3fcfb4c3f42f230d174db4bbad0080710.tar.xz
kernel-qcow2-linux-6f979eb3fcfb4c3f42f230d174db4bbad0080710.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 <lsorense@csclub.uwaterloo.ca> Acked-by: Heiko Schocher <hs@denx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti/cpsw_ale.c')
0 files changed, 0 insertions, 0 deletions