diff options
author | Benjamin Poirier <bpoirier@suse.com> | 2019-09-27 13:12:01 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-04 18:17:45 +0300 |
commit | cf1c2987bfd890a9c4ef3f174ed6148ec9b2b622 (patch) | |
tree | d5382f0bec257392f47c9f754d4e839026e40595 /drivers/staging/qlge | |
parent | 16714d98bf631909864f7eacd591ab5f7cf1588c (diff) | |
download | linux-cf1c2987bfd890a9c4ef3f174ed6148ec9b2b622.tar.xz |
staging: qlge: Remove useless dma synchronization calls
This is unneeded for two reasons:
1) the cpu does not write data for the device in the mapping
2) calls like ..._sync_..._for_device(..., ..._FROMDEVICE) are
nonsensical, see commit 3f0fb4e85b38 ("Documentation/DMA-API-HOWTO.txt:
fix misleading example")
Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
Link: https://lore.kernel.org/r/20190927101210.23856-8-bpoirier@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/qlge')
-rw-r--r-- | drivers/staging/qlge/qlge_main.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c index 0a3809c50c10..03403718a273 100644 --- a/drivers/staging/qlge/qlge_main.c +++ b/drivers/staging/qlge/qlge_main.c @@ -1110,9 +1110,6 @@ static void ql_update_lbq(struct ql_adapter *qdev, struct rx_ring *rx_ring) dma_unmap_addr_set(lbq_desc, mapaddr, map); *lbq_desc->addr = cpu_to_le64(map); - pci_dma_sync_single_for_device(qdev->pdev, map, - qdev->lbq_buf_size, - PCI_DMA_FROMDEVICE); clean_idx++; if (clean_idx == rx_ring->lbq_len) clean_idx = 0; @@ -1598,10 +1595,6 @@ static void ql_process_mac_rx_skb(struct ql_adapter *qdev, skb_put_data(new_skb, skb->data, length); - pci_dma_sync_single_for_device(qdev->pdev, - dma_unmap_addr(sbq_desc, mapaddr), - SMALL_BUF_MAP_SIZE, - PCI_DMA_FROMDEVICE); skb = new_skb; /* Frame error, so drop the packet. */ @@ -1757,11 +1750,6 @@ static struct sk_buff *ql_build_rx_skb(struct ql_adapter *qdev, SMALL_BUF_MAP_SIZE, PCI_DMA_FROMDEVICE); skb_put_data(skb, sbq_desc->p.skb->data, length); - pci_dma_sync_single_for_device(qdev->pdev, - dma_unmap_addr(sbq_desc, - mapaddr), - SMALL_BUF_MAP_SIZE, - PCI_DMA_FROMDEVICE); } else { netif_printk(qdev, rx_status, KERN_DEBUG, qdev->ndev, "%d bytes in a single small buffer.\n", |