Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290448
b: refs/heads/master
c: b0d1562
h: refs/heads/master
v: v3
  • Loading branch information
Ben Greear authored and Jeff Kirsher committed Feb 24, 2012
1 parent 2f5b94d commit 02fd5bc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 11a78dcf35fc20bd6ae57fee11ca0447a62d33a8
refs/heads/master: b0d1562c820ae0f9ffe4d21f43676f1466ccaec2
21 changes: 11 additions & 10 deletions trunk/drivers/net/ethernet/intel/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,

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

if (pci_using_dac) {
netdev->features |= NETIF_F_HIGHDMA;
Expand Down Expand Up @@ -4137,10 +4138,9 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter,
((u32)(rx_desc->errors) << 24),
le16_to_cpu(rx_desc->csum), skb);

pskb_trim(skb, skb->len - 4);

/* probably a little skewed due to removing CRC */
total_rx_bytes += skb->len;
total_rx_bytes += (skb->len - 4); /* don't count FCS */
if (likely(!(netdev->features & NETIF_F_RXFCS)))
pskb_trim(skb, skb->len - 4);
total_rx_packets++;

/* eth type trans needs skb->data to point to something */
Expand Down Expand Up @@ -4294,14 +4294,15 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter,
}
}

/* adjust length to remove Ethernet CRC, this must be
* done after the TBI_ACCEPT workaround above */
length -= 4;

/* probably a little skewed due to removing CRC */
total_rx_bytes += length;
total_rx_bytes += (length - 4); /* don't count FCS */
total_rx_packets++;

if (likely(!(netdev->features & NETIF_F_RXFCS)))
/* adjust length to remove Ethernet CRC, this must be
* done after the TBI_ACCEPT workaround above
*/
length -= 4;

e1000_check_copybreak(netdev, buffer_info, length, &skb);

skb_put(skb, length);
Expand Down

0 comments on commit 02fd5bc

Please sign in to comment.