diff options
-rw-r--r-- | drivers/net/r8169.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 20deeeaab5d9..981b195811bb 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -3948,7 +3948,7 @@ static void rtl8169_free_rx_databuff(struct rtl8169_private *tp, | |||
3948 | struct pci_dev *pdev = tp->pci_dev; | 3948 | struct pci_dev *pdev = tp->pci_dev; |
3949 | 3949 | ||
3950 | dma_unmap_single(&pdev->dev, le64_to_cpu(desc->addr), rx_buf_sz, | 3950 | dma_unmap_single(&pdev->dev, le64_to_cpu(desc->addr), rx_buf_sz, |
3951 | PCI_DMA_FROMDEVICE); | 3951 | DMA_FROM_DEVICE); |
3952 | kfree(*data_buff); | 3952 | kfree(*data_buff); |
3953 | *data_buff = NULL; | 3953 | *data_buff = NULL; |
3954 | rtl8169_make_unusable_by_asic(desc); | 3954 | rtl8169_make_unusable_by_asic(desc); |
@@ -3994,7 +3994,7 @@ static struct sk_buff *rtl8169_alloc_rx_data(struct rtl8169_private *tp, | |||
3994 | } | 3994 | } |
3995 | 3995 | ||
3996 | mapping = dma_map_single(&tp->pci_dev->dev, rtl8169_align(data), rx_buf_sz, | 3996 | mapping = dma_map_single(&tp->pci_dev->dev, rtl8169_align(data), rx_buf_sz, |
3997 | PCI_DMA_FROMDEVICE); | 3997 | DMA_FROM_DEVICE); |
3998 | if (unlikely(dma_mapping_error(&tp->pci_dev->dev, mapping))) | 3998 | if (unlikely(dma_mapping_error(&tp->pci_dev->dev, mapping))) |
3999 | goto err_out; | 3999 | goto err_out; |
4000 | 4000 | ||
@@ -4072,7 +4072,7 @@ static void rtl8169_unmap_tx_skb(struct pci_dev *pdev, struct ring_info *tx_skb, | |||
4072 | unsigned int len = tx_skb->len; | 4072 | unsigned int len = tx_skb->len; |
4073 | 4073 | ||
4074 | dma_unmap_single(&pdev->dev, le64_to_cpu(desc->addr), len, | 4074 | dma_unmap_single(&pdev->dev, le64_to_cpu(desc->addr), len, |
4075 | PCI_DMA_TODEVICE); | 4075 | DMA_TO_DEVICE); |
4076 | desc->opts1 = 0x00; | 4076 | desc->opts1 = 0x00; |
4077 | desc->opts2 = 0x00; | 4077 | desc->opts2 = 0x00; |
4078 | desc->addr = 0x00; | 4078 | desc->addr = 0x00; |
@@ -4223,7 +4223,7 @@ static int rtl8169_xmit_frags(struct rtl8169_private *tp, struct sk_buff *skb, | |||
4223 | len = frag->size; | 4223 | len = frag->size; |
4224 | addr = ((void *) page_address(frag->page)) + frag->page_offset; | 4224 | addr = ((void *) page_address(frag->page)) + frag->page_offset; |
4225 | mapping = dma_map_single(&tp->pci_dev->dev, addr, len, | 4225 | mapping = dma_map_single(&tp->pci_dev->dev, addr, len, |
4226 | PCI_DMA_TODEVICE); | 4226 | DMA_TO_DEVICE); |
4227 | if (unlikely(dma_mapping_error(&tp->pci_dev->dev, mapping))) | 4227 | if (unlikely(dma_mapping_error(&tp->pci_dev->dev, mapping))) |
4228 | goto err_out; | 4228 | goto err_out; |
4229 | 4229 | ||
@@ -4290,7 +4290,7 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb, | |||
4290 | 4290 | ||
4291 | len = skb_headlen(skb); | 4291 | len = skb_headlen(skb); |
4292 | mapping = dma_map_single(&tp->pci_dev->dev, skb->data, len, | 4292 | mapping = dma_map_single(&tp->pci_dev->dev, skb->data, len, |
4293 | PCI_DMA_TODEVICE); | 4293 | DMA_TO_DEVICE); |
4294 | if (unlikely(dma_mapping_error(&tp->pci_dev->dev, mapping))) | 4294 | if (unlikely(dma_mapping_error(&tp->pci_dev->dev, mapping))) |
4295 | goto err_dma_0; | 4295 | goto err_dma_0; |
4296 | 4296 | ||
@@ -4469,13 +4469,13 @@ static struct sk_buff *rtl8169_try_rx_copy(void *data, | |||
4469 | 4469 | ||
4470 | data = rtl8169_align(data); | 4470 | data = rtl8169_align(data); |
4471 | dma_sync_single_for_cpu(&tp->pci_dev->dev, addr, pkt_size, | 4471 | dma_sync_single_for_cpu(&tp->pci_dev->dev, addr, pkt_size, |
4472 | PCI_DMA_FROMDEVICE); | 4472 | DMA_FROM_DEVICE); |
4473 | prefetch(data); | 4473 | prefetch(data); |
4474 | skb = netdev_alloc_skb_ip_align(tp->dev, pkt_size); | 4474 | skb = netdev_alloc_skb_ip_align(tp->dev, pkt_size); |
4475 | if (skb) | 4475 | if (skb) |
4476 | memcpy(skb->data, data, pkt_size); | 4476 | memcpy(skb->data, data, pkt_size); |
4477 | dma_sync_single_for_device(&tp->pci_dev->dev, addr, pkt_size, | 4477 | dma_sync_single_for_device(&tp->pci_dev->dev, addr, pkt_size, |
4478 | PCI_DMA_FROMDEVICE); | 4478 | DMA_FROM_DEVICE); |
4479 | return skb; | 4479 | return skb; |
4480 | } | 4480 | } |
4481 | 4481 | ||