Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290447
b: refs/heads/master
c: 11a78dc
h: refs/heads/master
i:
  290445: ee8a354
  290443: 4e9477c
  290439: 0932904
  290431: 2027a58
v: v3
  • Loading branch information
Ben Greear authored and Jeff Kirsher committed Feb 24, 2012
1 parent d868486 commit 2f5b94d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cf955e6c96cb9af2dce7093a8e3a5e808555c8a4
refs/heads/master: 11a78dcf35fc20bd6ae57fee11ca0447a62d33a8
13 changes: 13 additions & 0 deletions trunk/drivers/net/ethernet/intel/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1067,6 +1067,8 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
(hw->mac_type != e1000_82547))
netdev->hw_features |= NETIF_F_TSO;

netdev->priv_flags |= IFF_SUPP_NOFCS;

netdev->features |= netdev->hw_features;
netdev->hw_features |= NETIF_F_RXCSUM;

Expand Down Expand Up @@ -2692,6 +2694,7 @@ static void e1000_set_itr(struct e1000_adapter *adapter)
#define E1000_TX_FLAGS_VLAN 0x00000002
#define E1000_TX_FLAGS_TSO 0x00000004
#define E1000_TX_FLAGS_IPV4 0x00000008
#define E1000_TX_FLAGS_NO_FCS 0x00000010
#define E1000_TX_FLAGS_VLAN_MASK 0xffff0000
#define E1000_TX_FLAGS_VLAN_SHIFT 16

Expand Down Expand Up @@ -2993,6 +2996,9 @@ static void e1000_tx_queue(struct e1000_adapter *adapter,
txd_upper |= (tx_flags & E1000_TX_FLAGS_VLAN_MASK);
}

if (unlikely(tx_flags & E1000_TX_FLAGS_NO_FCS))
txd_lower &= ~(E1000_TXD_CMD_IFCS);

i = tx_ring->next_to_use;

while (count--) {
Expand All @@ -3007,6 +3013,10 @@ static void e1000_tx_queue(struct e1000_adapter *adapter,

tx_desc->lower.data |= cpu_to_le32(adapter->txd_cmd);

/* txd_cmd re-enables FCS, so we'll re-disable it here as desired. */
if (unlikely(tx_flags & E1000_TX_FLAGS_NO_FCS))
tx_desc->lower.data &= ~(cpu_to_le32(E1000_TXD_CMD_IFCS));

/* Force memory writes to complete before letting h/w
* know there are new descriptors to fetch. (Only
* applicable for weak-ordered memory model archs,
Expand Down Expand Up @@ -3222,6 +3232,9 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
if (likely(skb->protocol == htons(ETH_P_IP)))
tx_flags |= E1000_TX_FLAGS_IPV4;

if (unlikely(skb->no_fcs))
tx_flags |= E1000_TX_FLAGS_NO_FCS;

count = e1000_tx_map(adapter, tx_ring, skb, first, max_per_txd,
nr_frags, mss);

Expand Down

0 comments on commit 2f5b94d

Please sign in to comment.