Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32705
b: refs/heads/master
c: f235a2a
h: refs/heads/master
i:
  32703: b0becf9
v: v3
  • Loading branch information
Auke Kok authored and Auke Kok committed Jul 14, 2006
1 parent 12f16ad commit 901a262
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 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: d3d9e484b2ca502c87156b69fa6b8f8fd5fa18a0
refs/heads/master: f235a2abb27b9396d2108dd2987fb8262cb508a3
10 changes: 9 additions & 1 deletion trunk/drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3673,6 +3673,9 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,

length = le16_to_cpu(rx_desc->length);

/* adjust length to remove Ethernet CRC */
length -= 4;

if (unlikely(!(status & E1000_RXD_STAT_EOP))) {
/* All receives must fit into a single buffer */
E1000_DBG("%s: Receive packet consumed multiple"
Expand Down Expand Up @@ -3877,8 +3880,9 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
pci_dma_sync_single_for_device(pdev,
ps_page_dma->ps_page_dma[0],
PAGE_SIZE, PCI_DMA_FROMDEVICE);
/* remove the CRC */
l1 -= 4;
skb_put(skb, l1);
length += l1;
goto copydone;
} /* if */
}
Expand All @@ -3897,6 +3901,10 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
skb->truesize += length;
}

/* strip the ethernet crc, problem is we're using pages now so
* this whole operation can get a little cpu intensive */
pskb_trim(skb, skb->len - 4);

copydone:
e1000_rx_checksum(adapter, staterr,
le16_to_cpu(rx_desc->wb.lower.hi_dword.csum_ip.csum), skb);
Expand Down

0 comments on commit 901a262

Please sign in to comment.