Explorar o código

ixgbe: only check pfc bits in hang logic if pfc is enabled

Only check pfc bits in hang logic if PFC is enabled.  Previously,
if DCB was enabled but PFC was disabled the incorrect pause
bits would be checked.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
John Fastabend %!s(int64=15) %!d(string=hai) anos
pai
achega
ca73948166
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/net/ixgbe/ixgbe_main.c

+ 1 - 1
drivers/net/ixgbe/ixgbe_main.c

@@ -642,7 +642,7 @@ static inline bool ixgbe_tx_xon_state(struct ixgbe_adapter *adapter,
 	u32 txoff = IXGBE_TFCS_TXOFF;
 	u32 txoff = IXGBE_TFCS_TXOFF;
 
 
 #ifdef CONFIG_IXGBE_DCB
 #ifdef CONFIG_IXGBE_DCB
-	if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
+	if (adapter->dcb_cfg.pfc_mode_enable) {
 		int tc;
 		int tc;
 		int reg_idx = tx_ring->reg_idx;
 		int reg_idx = tx_ring->reg_idx;
 		int dcb_i = adapter->ring_feature[RING_F_DCB].indices;
 		int dcb_i = adapter->ring_feature[RING_F_DCB].indices;