From: Kantecki, Tomasz Date: Mon, 17 Oct 2011 22:06:59 +0000 (+0000) Subject: igb: Fix for I347AT4 PHY cable length unit detection X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~249 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2c5bddd6d74f5f6785ea7ecec21f9356e9fc2e07;p=users%2Fjedix%2Flinux-maple.git igb: Fix for I347AT4 PHY cable length unit detection The PHY cable length unit detection was not using the correct the correct PHY data variable for I347AT4. (cherry picked from commit d5a0e3640c05b7d07c548f9f8f986dbb87cfad98) Signed-off-by: Tomasz Kantecki Signed-off-by: Jeff Kirsher Signed-off-by: Joe Jin --- diff --git a/drivers/net/igb/e1000_phy.c b/drivers/net/igb/e1000_phy.c index 7edf31efe756a..b17d7c20f8177 100644 --- a/drivers/net/igb/e1000_phy.c +++ b/drivers/net/igb/e1000_phy.c @@ -1687,7 +1687,7 @@ s32 igb_get_cable_length_m88_gen2(struct e1000_hw *hw) if (ret_val) goto out; - is_cm = !(phy_data & I347AT4_PCDC_CABLE_LENGTH_UNIT); + is_cm = !(phy_data2 & I347AT4_PCDC_CABLE_LENGTH_UNIT); /* Populate the phy structure with cable length in meters */ phy->min_cable_length = phy_data / (is_cm ? 100 : 1);