From: Matt Carlson Date: Wed, 22 Feb 2012 12:35:18 +0000 (+0000) Subject: tg3: Fix link check in tg3_adjust_link X-Git-Tag: v3.4-rc1~177^2~225 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34655ad63893d3dd64f3fbaaaa0791550e554fa9;p=pandora-kernel.git tg3: Fix link check in tg3_adjust_link The tg3 driver tried to detect link changes by comparing the tg3 local active_speed member with SPEED_UNKNOWN (or formerly SPEED_INVALID). This check is not correct, since phylib will never set its speed member to either of these two values. The code only appeared to work because tg3 initializes active_speed to SPEED_INVALID during tg3_init_one. This patch introduces a new "old_link" tg3 member and then compares the phy_device's link member against it to detect link state changes. Signed-off-by: Matt Carlson Signed-off-by: David S. Miller --- Reading git-diff-tree failed