]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
igb: Fix for I347AT4 PHY cable length unit detection
authorKantecki, Tomasz <tomasz.kantecki@intel.com>
Mon, 17 Oct 2011 22:06:59 +0000 (22:06 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 2 Nov 2011 23:55:08 +0000 (16:55 -0700)
The PHY cable length unit detection was not using the correct
the correct PHY data variable for I347AT4.

Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igb/e1000_phy.c

index 7edf31efe756a45bc56844eb672bd025a1dd7fb6..b17d7c20f8177816434f914f15635b3624361d5e 100644 (file)
@@ -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);