]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
ixgbe: Fix MDD events generated when FCoE+SRIOV are enabled
authorNeerav Parikh <neerav.parikh@intel.com>
Wed, 9 Dec 2015 06:13:58 +0000 (22:13 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 8 Jan 2016 12:15:00 +0000 (04:15 -0800)
When FCoE is enabled with SR-IOV on the X550 NIC the hardware
generates MDD events.

This patch fixes these by setting the expected values in the
Tx context descriptors for FCoE/FIP frames and adding a flush
after writing the RDLEN register.

Signed-off-by: Neerav Parikh <neerav.parikh@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h

index df1647fa892aa585194a00fa2b7b4e36ac5164bb..2a653ec954f53450be9a97ccac536f90c70bc802 100644 (file)
@@ -517,6 +517,7 @@ int ixgbe_fso(struct ixgbe_ring *tx_ring,
        u32 vlan_macip_lens;
        u32 fcoe_sof_eof = 0;
        u32 mss_l4len_idx;
+       u32 type_tucmd = IXGBE_ADVTXT_TUCMD_FCOE;
        u8 sof, eof;
 
        if (skb_is_gso(skb) && (skb_shinfo(skb)->gso_type != SKB_GSO_FCOE)) {
@@ -593,6 +594,8 @@ int ixgbe_fso(struct ixgbe_ring *tx_ring,
                                               skb_shinfo(skb)->gso_size);
                first->bytecount += (first->gso_segs - 1) * *hdr_len;
                first->tx_flags |= IXGBE_TX_FLAGS_TSO;
+               /* Hardware expects L4T to be RSV for FCoE TSO */
+               type_tucmd |= IXGBE_ADVTXD_TUCMD_L4T_RSV;
        }
 
        /* set flag indicating FCOE to ixgbe_tx_map call */
@@ -610,7 +613,7 @@ int ixgbe_fso(struct ixgbe_ring *tx_ring,
 
        /* write context desc */
        ixgbe_tx_ctxtdesc(tx_ring, vlan_macip_lens, fcoe_sof_eof,
-                         IXGBE_ADVTXT_TUCMD_FCOE, mss_l4len_idx);
+                         type_tucmd, mss_l4len_idx);
 
        return 0;
 }
index a12f93dd860290d02306d10d245450cbe5a78922..328d7a828e0b5327168bd99b8c111bd0769cf034 100644 (file)
@@ -3619,6 +3619,9 @@ void ixgbe_configure_rx_ring(struct ixgbe_adapter *adapter,
        IXGBE_WRITE_REG(hw, IXGBE_RDBAH(reg_idx), (rdba >> 32));
        IXGBE_WRITE_REG(hw, IXGBE_RDLEN(reg_idx),
                        ring->count * sizeof(union ixgbe_adv_rx_desc));
+       /* Force flushing of IXGBE_RDLEN to prevent MDD */
+       IXGBE_WRITE_FLUSH(hw);
+
        IXGBE_WRITE_REG(hw, IXGBE_RDH(reg_idx), 0);
        IXGBE_WRITE_REG(hw, IXGBE_RDT(reg_idx), 0);
        ring->tail = adapter->io_addr + IXGBE_RDT(reg_idx);
index 5f53cc6c609a0dca332c6040c6976c872df67031..bf7367a0871679137ed3dba60633af9462873ed9 100644 (file)
@@ -2780,6 +2780,7 @@ struct ixgbe_adv_tx_context_desc {
 #define IXGBE_ADVTXD_TUCMD_L4T_UDP   0x00000000  /* L4 Packet TYPE of UDP */
 #define IXGBE_ADVTXD_TUCMD_L4T_TCP   0x00000800  /* L4 Packet TYPE of TCP */
 #define IXGBE_ADVTXD_TUCMD_L4T_SCTP  0x00001000  /* L4 Packet TYPE of SCTP */
+#define IXGBE_ADVTXD_TUCMD_L4T_RSV     0x00001800 /* RSV L4 Packet TYPE */
 #define IXGBE_ADVTXD_TUCMD_MKRREQ    0x00002000 /*Req requires Markers and CRC*/
 #define IXGBE_ADVTXD_POPTS_IPSEC      0x00000400 /* IPSec offload request */
 #define IXGBE_ADVTXD_TUCMD_IPSEC_TYPE_ESP 0x00002000 /* IPSec Type ESP */