Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177165
b: refs/heads/master
c: 503914c
h: refs/heads/master
i:
  177163: 1489a11
v: v3
  • Loading branch information
Magnus Damm authored and David S. Miller committed Dec 16, 2009
1 parent ba202cf commit d14d055
Show file tree
Hide file tree
Showing 2 changed files with 7 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: ca553980432898da5d4125573a9e2aee6ed5d355
refs/heads/master: 503914cf4a4b5dbe3f844e0a92f412ae99fde70e
7 changes: 6 additions & 1 deletion trunk/drivers/net/sh_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
.mpr = 1,
.tpauser = 1,
.hw_swap = 1,
.rpadir = 1,
.rpadir_value = 0x00020000, /* NET_IP_ALIGN assumed to be 2 */
};

#elif defined(CONFIG_CPU_SUBTYPE_SH7763)
Expand Down Expand Up @@ -175,7 +177,6 @@ static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
.tpauser = 1,
.bculr = 1,
.hw_swap = 1,
.rpadir = 1,
.no_trimd = 1,
.no_ade = 1,
};
Expand Down Expand Up @@ -501,6 +502,8 @@ static int sh_eth_ring_init(struct net_device *ndev)
*/
mdp->rx_buf_sz = (ndev->mtu <= 1492 ? PKT_BUF_SZ :
(((ndev->mtu + 26 + 7) & ~7) + 2 + 16));
if (mdp->cd->rpadir)
mdp->rx_buf_sz += NET_IP_ALIGN;

/* Allocate RX and TX skb rings */
mdp->rx_skbuff = kmalloc(sizeof(*mdp->rx_skbuff) * RX_RING_SIZE,
Expand Down Expand Up @@ -715,6 +718,8 @@ static int sh_eth_rx(struct net_device *ndev)
pkt_len + 2);
skb = mdp->rx_skbuff[entry];
mdp->rx_skbuff[entry] = NULL;
if (mdp->cd->rpadir)
skb_reserve(skb, NET_IP_ALIGN);
skb_put(skb, pkt_len);
skb->protocol = eth_type_trans(skb, ndev);
netif_rx(skb);
Expand Down

0 comments on commit d14d055

Please sign in to comment.