ixgbe: Indicate support for pause frames in all cases
authorMark Rustad <mark.d.rustad@intel.com>
Fri, 26 Aug 2016 21:48:33 +0000 (14:48 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 23 Sep 2016 07:14:33 +0000 (00:14 -0700)
All the MACs supported by ixgbe support pause frames, so indicate
that support in ethtool. Also set advertising according to requested
mode.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c

index 9547191e26c9d9bd272db6b21294da63b0991972..730a99f0f002ef069aa73229816dd9a5da50a660 100644 (file)
@@ -313,6 +313,25 @@ static int ixgbe_get_settings(struct net_device *netdev,
                break;
        }
 
+       /* Indicate pause support */
+       ecmd->supported |= SUPPORTED_Pause;
+
+       switch (hw->fc.requested_mode) {
+       case ixgbe_fc_full:
+               ecmd->advertising |= ADVERTISED_Pause;
+               break;
+       case ixgbe_fc_rx_pause:
+               ecmd->advertising |= ADVERTISED_Pause |
+                                    ADVERTISED_Asym_Pause;
+               break;
+       case ixgbe_fc_tx_pause:
+               ecmd->advertising |= ADVERTISED_Asym_Pause;
+               break;
+       default:
+               ecmd->advertising &= ~(ADVERTISED_Pause |
+                                      ADVERTISED_Asym_Pause);
+       }
+
        if (netif_carrier_ok(netdev)) {
                switch (adapter->link_speed) {
                case IXGBE_LINK_SPEED_10GB_FULL: