]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bnxt_en: Fix ethtool -a reporting.
authorMichael Chan <michael.chan@broadcom.com>
Mon, 28 Mar 2016 23:46:07 +0000 (19:46 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 00:37:07 +0000 (17:37 -0700)
Orabug: 23221795

To report flow control tx/rx settings accurately regardless of autoneg
setting, we should use link_info->req_flow_ctrl.  Before this patch,
the reported settings were only correct when autoneg was on.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 3c02d1bb32347d0674714ee170772d771d513469)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

index 1fc6798df7784e97e5c7e5838fb6db6e378c0412..9c31f856f0395abbedcff076b0865ba68d15a849 100644 (file)
@@ -882,10 +882,8 @@ static void bnxt_get_pauseparam(struct net_device *dev,
        if (BNXT_VF(bp))
                return;
        epause->autoneg = !!(link_info->autoneg & BNXT_AUTONEG_FLOW_CTRL);
-       epause->rx_pause =
-               ((link_info->auto_pause_setting & BNXT_LINK_PAUSE_RX) != 0);
-       epause->tx_pause =
-               ((link_info->auto_pause_setting & BNXT_LINK_PAUSE_TX) != 0);
+       epause->rx_pause = !!(link_info->req_flow_ctrl & BNXT_LINK_PAUSE_RX);
+       epause->tx_pause = !!(link_info->req_flow_ctrl & BNXT_LINK_PAUSE_TX);
 }
 
 static int bnxt_set_pauseparam(struct net_device *dev,