Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73463
b: refs/heads/master
c: 32bee77
h: refs/heads/master
i:
  73461: d9cc16b
  73459: f1377cc
  73455: 62dfd65
v: v3
  • Loading branch information
Olof Johansson authored and Jeff Garzik committed Nov 10, 2007
1 parent fc46d36 commit 15211ed
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 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: dbd62af7de9ee63f83c0262e4acc3b3319c09c8b
refs/heads/master: 32bee776533eea839f9499d985c1490b5ac98512
16 changes: 13 additions & 3 deletions trunk/drivers/net/pasemi_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,16 @@ static int pasemi_mac_clean_rx(struct pasemi_mac *mac, int limit)

len = (macrx & XCT_MACRX_LLEN_M) >> XCT_MACRX_LLEN_S;

pci_unmap_single(mac->dma_pdev, dma, len, PCI_DMA_FROMDEVICE);

if (macrx & XCT_MACRX_CRC) {
/* CRC error flagged */
mac->netdev->stats.rx_errors++;
mac->netdev->stats.rx_crc_errors++;
dev_kfree_skb_irq(skb);
goto next;
}

if (len < 256) {
struct sk_buff *new_skb;

Expand All @@ -595,11 +605,10 @@ static int pasemi_mac_clean_rx(struct pasemi_mac *mac, int limit)
} else
info->skb = NULL;

pci_unmap_single(mac->dma_pdev, dma, len, PCI_DMA_FROMDEVICE);

info->dma = 0;

skb_put(skb, len);
/* Don't include CRC */
skb_put(skb, len-4);

if (likely((macrx & XCT_MACRX_HTY_M) == XCT_MACRX_HTY_IPV4_OK)) {
skb->ip_summed = CHECKSUM_UNNECESSARY;
Expand All @@ -614,6 +623,7 @@ static int pasemi_mac_clean_rx(struct pasemi_mac *mac, int limit)
skb->protocol = eth_type_trans(skb, mac->netdev);
netif_receive_skb(skb);

next:
RX_RING(mac, n) = 0;
RX_RING(mac, n+1) = 0;

Expand Down

0 comments on commit 15211ed

Please sign in to comment.