lkml.org 
[lkml]   [2014]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: drivers: net: cpsw: Fix broken loop condition in switch mode
From
From: "Lennart Sorensen" <lsorense@csclub.uwaterloo.ca>
Date: Fri, 31 Oct 2014 13:28:54 -0400

> 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>

Applied.


\
 
 \ /
  Last update: 2014-10-31 21:41    [W:0.033 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site