]> nv-tegra.nvidia Code Review - linux-3.10.git/blobdiff - drivers/net/ixgb/ixgb_main.c
[PATCH] ixgb: Do not set the RS bit on context descriptors
[linux-3.10.git] / drivers / net / ixgb / ixgb_main.c
index 7d26623d859278bd1ad6369648de9ed41a112493..364a9e78b0ccc894e7c0c41393086d3f0de0ced6 100644 (file)
@@ -1209,10 +1209,10 @@ ixgb_tso(struct ixgb_adapter *adapter, struct sk_buff *skb)
                                                | IXGB_CONTEXT_DESC_CMD_TSE
                                                | IXGB_CONTEXT_DESC_CMD_IP
                                                | IXGB_CONTEXT_DESC_CMD_TCP
-                                               | IXGB_CONTEXT_DESC_CMD_RS
                                                | IXGB_CONTEXT_DESC_CMD_IDE
                                                | (skb->len - (hdr_len)));
 
+
                if(++i == adapter->tx_ring.count) i = 0;
                adapter->tx_ring.next_to_use = i;
 
@@ -1247,8 +1247,7 @@ ixgb_tx_csum(struct ixgb_adapter *adapter, struct sk_buff *skb)
                context_desc->mss = 0;
                context_desc->cmd_type_len =
                        cpu_to_le32(IXGB_CONTEXT_DESC_TYPE
-                                       | IXGB_TX_DESC_CMD_RS 
-                                       | IXGB_TX_DESC_CMD_IDE);
+                                   | IXGB_TX_DESC_CMD_IDE);
 
                if(++i == adapter->tx_ring.count) i = 0;
                adapter->tx_ring.next_to_use = i;
@@ -1526,14 +1525,33 @@ ixgb_change_mtu(struct net_device *netdev, int new_mtu)
 void
 ixgb_update_stats(struct ixgb_adapter *adapter)
 {
+       struct net_device *netdev = adapter->netdev;
+
+       if((netdev->flags & IFF_PROMISC) || (netdev->flags & IFF_ALLMULTI) ||
+          (netdev->mc_count > IXGB_MAX_NUM_MULTICAST_ADDRESSES)) {
+               u64 multi = IXGB_READ_REG(&adapter->hw, MPRCL);
+               u32 bcast_l = IXGB_READ_REG(&adapter->hw, BPRCL);
+               u32 bcast_h = IXGB_READ_REG(&adapter->hw, BPRCH);
+               u64 bcast = ((u64)bcast_h << 32) | bcast_l; 
+
+               multi |= ((u64)IXGB_READ_REG(&adapter->hw, MPRCH) << 32);
+               /* fix up multicast stats by removing broadcasts */
+               multi -= bcast;
+               
+               adapter->stats.mprcl += (multi & 0xFFFFFFFF);
+               adapter->stats.mprch += (multi >> 32);
+               adapter->stats.bprcl += bcast_l; 
+               adapter->stats.bprch += bcast_h;
+       } else {
+               adapter->stats.mprcl += IXGB_READ_REG(&adapter->hw, MPRCL);
+               adapter->stats.mprch += IXGB_READ_REG(&adapter->hw, MPRCH);
+               adapter->stats.bprcl += IXGB_READ_REG(&adapter->hw, BPRCL);
+               adapter->stats.bprch += IXGB_READ_REG(&adapter->hw, BPRCH);
+       }
        adapter->stats.tprl += IXGB_READ_REG(&adapter->hw, TPRL);
        adapter->stats.tprh += IXGB_READ_REG(&adapter->hw, TPRH);
        adapter->stats.gprcl += IXGB_READ_REG(&adapter->hw, GPRCL);
        adapter->stats.gprch += IXGB_READ_REG(&adapter->hw, GPRCH);
-       adapter->stats.bprcl += IXGB_READ_REG(&adapter->hw, BPRCL);
-       adapter->stats.bprch += IXGB_READ_REG(&adapter->hw, BPRCH);
-       adapter->stats.mprcl += IXGB_READ_REG(&adapter->hw, MPRCL);
-       adapter->stats.mprch += IXGB_READ_REG(&adapter->hw, MPRCH);
        adapter->stats.uprcl += IXGB_READ_REG(&adapter->hw, UPRCL);
        adapter->stats.uprch += IXGB_READ_REG(&adapter->hw, UPRCH);
        adapter->stats.vprcl += IXGB_READ_REG(&adapter->hw, VPRCL);