Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78979
b: refs/heads/master
c: 5d89494
h: refs/heads/master
i:
  78977: 4d199cd
  78975: f2ca8f3
v: v3
  • Loading branch information
Olof Johansson authored and David S. Miller committed Jan 28, 2008
1 parent ecb977e commit 8642183
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 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: 7e9916e9ddf23cd08107ed1a7fac429eea619313
refs/heads/master: 5d8949448b68b3b355036c8061e3282388826ec5
25 changes: 3 additions & 22 deletions trunk/drivers/net/pasemi_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,13 +503,8 @@ static void pasemi_mac_replenish_rx_ring(const struct net_device *dev,
/* Entry in use? */
WARN_ON(*buff);

/* skb might still be in there for recycle on short receives */
if (info->skb)
skb = info->skb;
else {
skb = dev_alloc_skb(BUF_SIZE);
skb_reserve(skb, LOCAL_SKB_ALIGN);
}
skb = dev_alloc_skb(BUF_SIZE);
skb_reserve(skb, LOCAL_SKB_ALIGN);

if (unlikely(!skb))
break;
Expand Down Expand Up @@ -666,21 +661,7 @@ static int pasemi_mac_clean_rx(struct pasemi_mac_rxring *rx,
goto next;
}

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

new_skb = netdev_alloc_skb(mac->netdev,
len + LOCAL_SKB_ALIGN);
if (new_skb) {
skb_reserve(new_skb, LOCAL_SKB_ALIGN);
memcpy(new_skb->data, skb->data, len);
/* save the skb in buffer_info as good */
skb = new_skb;
}
/* else just continue with the old one */
} else
info->skb = NULL;

info->skb = NULL;
info->dma = 0;

if (likely((macrx & XCT_MACRX_HTY_M) == XCT_MACRX_HTY_IPV4_OK)) {
Expand Down

0 comments on commit 8642183

Please sign in to comment.