Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ixgbe: fix traffic hangs on Tx with ioatdma loaded

When ioatdma was loaded we we were unable to transmit traffic. We weren't
using the correct registers in ixgbe_update_tx_dca for 82599 systems.
Likewise in ixgbe_configure_tx() we weren't disabling the arbiter before
modifying MTQC.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Don Skidmore and committed by
David S. Miller
ee5f784a 26f23d82

+23 -4
+23 -4
drivers/net/ixgbe/ixgbe_main.c
··· 44 44 45 45 #include "ixgbe.h" 46 46 #include "ixgbe_common.h" 47 + #include "ixgbe_dcb_82599.h" 47 48 48 49 char ixgbe_driver_name[] = "ixgbe"; 49 50 static const char ixgbe_driver_string[] = ··· 463 462 u32 txctrl; 464 463 int cpu = get_cpu(); 465 464 int q = tx_ring - adapter->tx_ring; 465 + struct ixgbe_hw *hw = &adapter->hw; 466 466 467 467 if (tx_ring->cpu != cpu) { 468 - txctrl = IXGBE_READ_REG(&adapter->hw, IXGBE_DCA_TXCTRL(q)); 469 468 if (adapter->hw.mac.type == ixgbe_mac_82598EB) { 469 + txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(q)); 470 470 txctrl &= ~IXGBE_DCA_TXCTRL_CPUID_MASK; 471 471 txctrl |= dca3_get_tag(&adapter->pdev->dev, cpu); 472 + txctrl |= IXGBE_DCA_TXCTRL_DESC_DCA_EN; 473 + IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(q), txctrl); 472 474 } else if (adapter->hw.mac.type == ixgbe_mac_82599EB) { 475 + txctrl = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(q)); 473 476 txctrl &= ~IXGBE_DCA_TXCTRL_CPUID_MASK_82599; 474 477 txctrl |= (dca3_get_tag(&adapter->pdev->dev, cpu) << 475 - IXGBE_DCA_TXCTRL_CPUID_SHIFT_82599); 478 + IXGBE_DCA_TXCTRL_CPUID_SHIFT_82599); 479 + txctrl |= IXGBE_DCA_TXCTRL_DESC_DCA_EN; 480 + IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(q), txctrl); 476 481 } 477 - txctrl |= IXGBE_DCA_TXCTRL_DESC_DCA_EN; 478 - IXGBE_WRITE_REG(&adapter->hw, IXGBE_DCA_TXCTRL(q), txctrl); 479 482 tx_ring->cpu = cpu; 480 483 } 481 484 put_cpu(); ··· 1968 1963 break; 1969 1964 } 1970 1965 } 1966 + 1971 1967 if (hw->mac.type == ixgbe_mac_82599EB) { 1968 + u32 rttdcs; 1969 + 1970 + /* disable the arbiter while setting MTQC */ 1971 + rttdcs = IXGBE_READ_REG(hw, IXGBE_RTTDCS); 1972 + rttdcs |= IXGBE_RTTDCS_ARBDIS; 1973 + IXGBE_WRITE_REG(hw, IXGBE_RTTDCS, rttdcs); 1974 + 1972 1975 /* We enable 8 traffic classes, DCB only */ 1973 1976 if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) 1974 1977 IXGBE_WRITE_REG(hw, IXGBE_MTQC, (IXGBE_MTQC_RT_ENA | 1975 1978 IXGBE_MTQC_8TC_8TQ)); 1979 + else 1980 + IXGBE_WRITE_REG(hw, IXGBE_MTQC, IXGBE_MTQC_64Q_1PB); 1981 + 1982 + /* re-eable the arbiter */ 1983 + rttdcs &= ~IXGBE_RTTDCS_ARBDIS; 1984 + IXGBE_WRITE_REG(hw, IXGBE_RTTDCS, rttdcs); 1976 1985 } 1977 1986 } 1978 1987