ixgbe: Disable Flow Control for certain devices
authorPJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
Tue, 24 Nov 2009 18:51:28 +0000 (18:51 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 29 Nov 2009 08:33:58 +0000 (00:33 -0800)
Flow Control autoneg should be disabled for certain adapters
that don't support autonegotiation of Flow Control at 10 gigabit.
These interfaces are the 10GBASE-T devices, CX4, and SFP+, all
running at 10 gigabit only.  1 gigabit is fine.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ixgbe/ixgbe_common.c

index 40ff120a9ad4374e5755f4fa3b3d7010238b8917..f42a954ef6600d3da7fe8b3dbee4b0714424c24c 100644 (file)
@@ -1783,6 +1783,20 @@ s32 ixgbe_fc_autoneg(struct ixgbe_hw *hw)
                }
        }
 
+       /*
+        * Bail out on
+        * - copper or CX4 adapters
+        * - fiber adapters running at 10gig
+        */
+       if ((hw->phy.media_type == ixgbe_media_type_copper) ||
+            (hw->phy.media_type == ixgbe_media_type_cx4) ||
+            ((hw->phy.media_type == ixgbe_media_type_fiber) &&
+            (speed == IXGBE_LINK_SPEED_10GB_FULL))) {
+               hw->fc.fc_was_autonegged = false;
+               hw->fc.current_mode = hw->fc.requested_mode;
+               goto out;
+       }
+
        /*
         * Read the AN advertisement and LP ability registers and resolve
         * local flow control settings accordingly