diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2006-11-17 17:15:17 -0500 |
---|---|---|
committer | Francois Romieu <romieu@electric-eye.fr.zoreil.com> | 2006-12-03 19:04:36 -0500 |
commit | cc9f022d97d08e4e36d38661857991fe91447d68 (patch) | |
tree | 9e61a230e49f870db5a6fc1d604b3aab5de08d1a /drivers/net | |
parent | 12d86f682e8acad8555718dc7b0082590f2365d0 (diff) |
r8169: more alignment for the 0x8168
Two thirds of packets are lost because of misalignment. Users of
Asus laptop did apparently not notice it.
Reported on Gigabyte GA-945GM-S2.
Fix for http://bugzilla.kernel.org/show_bug.cgi?id=7517
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/r8169.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 0b57050252eb..2379d83768d6 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -2018,7 +2018,7 @@ static int rtl8169_alloc_rx_skb(struct pci_dev *pdev, struct sk_buff **sk_buff, | |||
2018 | if (!skb) | 2018 | if (!skb) |
2019 | goto err_out; | 2019 | goto err_out; |
2020 | 2020 | ||
2021 | skb_reserve(skb, align); | 2021 | skb_reserve(skb, (align - 1) & (u32)skb->data); |
2022 | *sk_buff = skb; | 2022 | *sk_buff = skb; |
2023 | 2023 | ||
2024 | mapping = pci_map_single(pdev, skb->data, rx_buf_sz, | 2024 | mapping = pci_map_single(pdev, skb->data, rx_buf_sz, |
@@ -2486,7 +2486,7 @@ static inline int rtl8169_try_rx_copy(struct sk_buff **sk_buff, int pkt_size, | |||
2486 | 2486 | ||
2487 | skb = dev_alloc_skb(pkt_size + align); | 2487 | skb = dev_alloc_skb(pkt_size + align); |
2488 | if (skb) { | 2488 | if (skb) { |
2489 | skb_reserve(skb, align); | 2489 | skb_reserve(skb, (align - 1) & (u32)skb->data); |
2490 | eth_copy_and_sum(skb, sk_buff[0]->data, pkt_size, 0); | 2490 | eth_copy_and_sum(skb, sk_buff[0]->data, pkt_size, 0); |
2491 | *sk_buff = skb; | 2491 | *sk_buff = skb; |
2492 | rtl8169_mark_to_asic(desc, rx_buf_sz); | 2492 | rtl8169_mark_to_asic(desc, rx_buf_sz); |