SP chips have a hardware bug preventing XON flow control support,
so the driver disables it.

Fixes: 69ce8c8a4ce3 ("net/txgbe: support flow control")
Cc: [email protected]

Signed-off-by: Zaiyu Wang <[email protected]>
---
 drivers/net/txgbe/base/txgbe_hw.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/txgbe/base/txgbe_hw.c 
b/drivers/net/txgbe/base/txgbe_hw.c
index 0d3310e15c..b1a1483dab 100644
--- a/drivers/net/txgbe/base/txgbe_hw.c
+++ b/drivers/net/txgbe/base/txgbe_hw.c
@@ -1037,8 +1037,10 @@ s32 txgbe_fc_enable(struct txgbe_hw *hw)
        for (i = 0; i < TXGBE_DCB_TC_MAX; i++) {
                if ((hw->fc.current_mode & txgbe_fc_tx_pause) &&
                    hw->fc.high_water[i]) {
-                       fcrtl = TXGBE_FCWTRLO_TH(hw->fc.low_water[i]) |
-                               TXGBE_FCWTRLO_XON;
+                       fcrtl = TXGBE_FCWTRLO_TH(hw->fc.low_water[i]);
+                       /* SP doesn't support xon */
+                       if (hw->mac.type == txgbe_mac_aml || hw->mac.type == 
txgbe_mac_aml40)
+                               fcrtl |= TXGBE_FCWTRLO_XON;
                        fcrth = TXGBE_FCWTRHI_TH(hw->fc.high_water[i]) |
                                TXGBE_FCWTRHI_XOFF;
                } else {
-- 
2.21.0.windows.1

Reply via email to