提交 901ccefb 编写于 作者: S Stephen Hemminger 提交者: Jeff Garzik

[PATCH] skge: align receive buffers

The skge driver aligns the header on the initial receive buffers, but
but doesn't on followon receive buffer allocations.
Signed-off-by: NStephen Hemminger <shemminger@osdl.org>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 15240072
...@@ -2155,7 +2155,7 @@ static int skge_up(struct net_device *dev) ...@@ -2155,7 +2155,7 @@ static int skge_up(struct net_device *dev)
printk(KERN_INFO PFX "%s: enabling interface\n", dev->name); printk(KERN_INFO PFX "%s: enabling interface\n", dev->name);
if (dev->mtu > RX_BUF_SIZE) if (dev->mtu > RX_BUF_SIZE)
skge->rx_buf_size = dev->mtu + ETH_HLEN + NET_IP_ALIGN; skge->rx_buf_size = dev->mtu + ETH_HLEN;
else else
skge->rx_buf_size = RX_BUF_SIZE; skge->rx_buf_size = RX_BUF_SIZE;
...@@ -2611,6 +2611,7 @@ static inline struct sk_buff *skge_rx_get(struct skge_port *skge, ...@@ -2611,6 +2611,7 @@ static inline struct sk_buff *skge_rx_get(struct skge_port *skge,
if (!nskb) if (!nskb)
goto resubmit; goto resubmit;
skb_reserve(nskb, NET_IP_ALIGN);
pci_unmap_single(skge->hw->pdev, pci_unmap_single(skge->hw->pdev,
pci_unmap_addr(e, mapaddr), pci_unmap_addr(e, mapaddr),
pci_unmap_len(e, maplen), pci_unmap_len(e, maplen),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册