Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122708
b: refs/heads/master
c: 5ecc361
h: refs/heads/master
v: v3
  • Loading branch information
Jesse Brandeburg authored and David S. Miller committed Dec 15, 2008
1 parent 67ac982 commit 72566b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 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: a7276db6adfded660eec1e1629710b8b82d83455
refs/heads/master: 5ecc361444a0c641a73cce05fb652d0e3c944451
12 changes: 7 additions & 5 deletions trunk/drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,6 @@ static void ixgbe_alloc_rx_buffers(struct ixgbe_adapter *adapter,
union ixgbe_adv_rx_desc *rx_desc;
struct ixgbe_rx_buffer *bi;
unsigned int i;
unsigned int bufsz = rx_ring->rx_buf_len + NET_IP_ALIGN;

i = rx_ring->next_to_use;
bi = &rx_ring->rx_buffer_info[i];
Expand Down Expand Up @@ -508,8 +507,10 @@ static void ixgbe_alloc_rx_buffers(struct ixgbe_adapter *adapter,
}

if (!bi->skb) {
struct sk_buff *skb = netdev_alloc_skb(adapter->netdev,
bufsz);
struct sk_buff *skb;
skb = netdev_alloc_skb(adapter->netdev,
(rx_ring->rx_buf_len +
NET_IP_ALIGN));

if (!skb) {
adapter->alloc_rx_buff_failed++;
Expand All @@ -524,7 +525,8 @@ static void ixgbe_alloc_rx_buffers(struct ixgbe_adapter *adapter,
skb_reserve(skb, NET_IP_ALIGN);

bi->skb = skb;
bi->dma = pci_map_single(pdev, skb->data, bufsz,
bi->dma = pci_map_single(pdev, skb->data,
rx_ring->rx_buf_len,
PCI_DMA_FROMDEVICE);
}
/* Refresh the desc even if buffer_addrs didn't change because
Expand Down Expand Up @@ -615,7 +617,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_adapter *adapter,

if (len && !skb_shinfo(skb)->nr_frags) {
pci_unmap_single(pdev, rx_buffer_info->dma,
rx_ring->rx_buf_len + NET_IP_ALIGN,
rx_ring->rx_buf_len,
PCI_DMA_FROMDEVICE);
skb_put(skb, len);
}
Expand Down

0 comments on commit 72566b9

Please sign in to comment.