]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ixgbe: Do not support flow control autonegotiation for X553
authorTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 7 Jun 2017 21:36:20 +0000 (14:36 -0700)
committerJack Vogel <jack.vogel@oracle.com>
Fri, 13 Oct 2017 02:43:49 +0000 (19:43 -0700)
Flow control autonegotiation is not supported for fiber on X553.  Add
device ID checks in ixgbe_device_supports_autoneg_fc() to return the
appropriate value.

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 26785078
(cherry picked from commit ae84dbf7ff485b3b59740c6ea69df0613f6cd4f7)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Ethan Zhao <ethan.zhao@oracle.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c

index d4933d22b7fe2f42a68dff0b66a22c167ef8f2b2..f1c9c32f01308505edc4438a37eed2ba8cf89747 100644 (file)
@@ -79,13 +79,22 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)
 
        switch (hw->phy.media_type) {
        case ixgbe_media_type_fiber:
-               hw->mac.ops.check_link(hw, &speed, &link_up, false);
-               /* if link is down, assume supported */
-               if (link_up)
-                       supported = speed == IXGBE_LINK_SPEED_1GB_FULL ?
+               /* flow control autoneg black list */
+               switch (hw->device_id) {
+               case IXGBE_DEV_ID_X550EM_A_SFP:
+               case IXGBE_DEV_ID_X550EM_A_SFP_N:
+                       supported = false;
+                       break;
+               default:
+                       hw->mac.ops.check_link(hw, &speed, &link_up, false);
+                       /* if link is down, assume supported */
+                       if (link_up)
+                               supported = speed == IXGBE_LINK_SPEED_1GB_FULL ?
                                true : false;
-               else
-                       supported = true;
+                       else
+                               supported = true;
+               }
+
                break;
        case ixgbe_media_type_backplane:
                supported = true;
@@ -111,6 +120,10 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)
                break;
        }
 
+       if (!supported)
+               hw_dbg(hw, "Device %x does not support flow control autoneg\n",
+                      hw->device_id);
+
        return supported;
 }