Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184015
b: refs/heads/master
c: 205859a
h: refs/heads/master
i:
  184013: 9d183d1
  184011: b179b70
  184007: 8545ee6
  183999: 2968f94
v: v3
  • Loading branch information
Ajit Khaparde authored and David S. Miller committed Feb 12, 2010
1 parent 57f865d commit 9bf085b
Show file tree
Hide file tree
Showing 2 changed files with 6 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: 34a89b8c75abe2873a95524552cc266fdd3b6a85
refs/heads/master: 205859a2ff922d0587a819b08007398cbd0a6a30
8 changes: 5 additions & 3 deletions trunk/drivers/net/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,9 +636,11 @@ get_rx_page_info(struct be_adapter *adapter, u16 frag_idx)
rx_page_info = &adapter->rx_obj.page_info_tbl[frag_idx];
BUG_ON(!rx_page_info->page);

if (rx_page_info->last_page_user)
if (rx_page_info->last_page_user) {
pci_unmap_page(adapter->pdev, pci_unmap_addr(rx_page_info, bus),
adapter->big_page_size, PCI_DMA_FROMDEVICE);
rx_page_info->last_page_user = false;
}

atomic_dec(&rxq->used);
return rx_page_info;
Expand Down Expand Up @@ -706,7 +708,7 @@ static void skb_fill_rx_data(struct be_adapter *adapter,
skb->data_len = curr_frag_len - hdr_len;
skb->tail += hdr_len;
}
memset(page_info, 0, sizeof(*page_info));
page_info->page = NULL;

if (pktsize <= rx_frag_size) {
BUG_ON(num_rcvd != 1);
Expand Down Expand Up @@ -739,7 +741,7 @@ static void skb_fill_rx_data(struct be_adapter *adapter,
skb->len += curr_frag_len;
skb->data_len += curr_frag_len;

memset(page_info, 0, sizeof(*page_info));
page_info->page = NULL;
}
BUG_ON(j > MAX_SKB_FRAGS);

Expand Down

0 comments on commit 9bf085b

Please sign in to comment.