diff options
Diffstat (limited to 'drivers/net/r8169.c')
-rw-r--r-- | drivers/net/r8169.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index d8862cd84f3d..1942bf7843aa 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -1415,7 +1415,7 @@ static const struct rtl_cfg_info { | |||
1415 | [RTL_CFG_0] = { | 1415 | [RTL_CFG_0] = { |
1416 | .hw_start = rtl_hw_start_8169, | 1416 | .hw_start = rtl_hw_start_8169, |
1417 | .region = 1, | 1417 | .region = 1, |
1418 | .align = 2, | 1418 | .align = 0, |
1419 | .intr_event = SYSErr | LinkChg | RxOverflow | | 1419 | .intr_event = SYSErr | LinkChg | RxOverflow | |
1420 | RxFIFOOver | TxErr | TxOK | RxOK | RxErr, | 1420 | RxFIFOOver | TxErr | TxOK | RxOK | RxErr, |
1421 | .napi_event = RxFIFOOver | TxErr | TxOK | RxOK | RxOverflow | 1421 | .napi_event = RxFIFOOver | TxErr | TxOK | RxOK | RxOverflow |
@@ -2076,12 +2076,15 @@ static struct sk_buff *rtl8169_alloc_rx_skb(struct pci_dev *pdev, | |||
2076 | { | 2076 | { |
2077 | struct sk_buff *skb; | 2077 | struct sk_buff *skb; |
2078 | dma_addr_t mapping; | 2078 | dma_addr_t mapping; |
2079 | unsigned int pad; | ||
2079 | 2080 | ||
2080 | skb = netdev_alloc_skb(dev, rx_buf_sz + align); | 2081 | pad = align ? align : NET_IP_ALIGN; |
2082 | |||
2083 | skb = netdev_alloc_skb(dev, rx_buf_sz + pad); | ||
2081 | if (!skb) | 2084 | if (!skb) |
2082 | goto err_out; | 2085 | goto err_out; |
2083 | 2086 | ||
2084 | skb_reserve(skb, (align - 1) & (unsigned long)skb->data); | 2087 | skb_reserve(skb, align ? ((pad - 1) & (unsigned long)skb->data) : pad); |
2085 | 2088 | ||
2086 | mapping = pci_map_single(pdev, skb->data, rx_buf_sz, | 2089 | mapping = pci_map_single(pdev, skb->data, rx_buf_sz, |
2087 | PCI_DMA_FROMDEVICE); | 2090 | PCI_DMA_FROMDEVICE); |