diff options
Diffstat (limited to 'drivers/net/sfc')
-rw-r--r-- | drivers/net/sfc/rx.c | 4 | ||||
-rw-r--r-- | drivers/net/sfc/tx.c | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/sfc/rx.c b/drivers/net/sfc/rx.c index 601b001437c0..0d27dd39bc09 100644 --- a/drivers/net/sfc/rx.c +++ b/drivers/net/sfc/rx.c | |||
@@ -233,7 +233,7 @@ static inline int efx_init_rx_buffer_skb(struct efx_rx_queue *rx_queue, | |||
233 | rx_buf->data, rx_buf->len, | 233 | rx_buf->data, rx_buf->len, |
234 | PCI_DMA_FROMDEVICE); | 234 | PCI_DMA_FROMDEVICE); |
235 | 235 | ||
236 | if (unlikely(pci_dma_mapping_error(rx_buf->dma_addr))) { | 236 | if (unlikely(pci_dma_mapping_error(efx->pci_dev, rx_buf->dma_addr))) { |
237 | dev_kfree_skb_any(rx_buf->skb); | 237 | dev_kfree_skb_any(rx_buf->skb); |
238 | rx_buf->skb = NULL; | 238 | rx_buf->skb = NULL; |
239 | return -EIO; | 239 | return -EIO; |
@@ -275,7 +275,7 @@ static inline int efx_init_rx_buffer_page(struct efx_rx_queue *rx_queue, | |||
275 | 0, efx_rx_buf_size(efx), | 275 | 0, efx_rx_buf_size(efx), |
276 | PCI_DMA_FROMDEVICE); | 276 | PCI_DMA_FROMDEVICE); |
277 | 277 | ||
278 | if (unlikely(pci_dma_mapping_error(dma_addr))) { | 278 | if (unlikely(pci_dma_mapping_error(efx->pci_dev, dma_addr))) { |
279 | __free_pages(rx_buf->page, efx->rx_buffer_order); | 279 | __free_pages(rx_buf->page, efx->rx_buffer_order); |
280 | rx_buf->page = NULL; | 280 | rx_buf->page = NULL; |
281 | return -EIO; | 281 | return -EIO; |
diff --git a/drivers/net/sfc/tx.c b/drivers/net/sfc/tx.c index 5cdd082ab8f6..5e8374ab28ee 100644 --- a/drivers/net/sfc/tx.c +++ b/drivers/net/sfc/tx.c | |||
@@ -172,7 +172,7 @@ static inline int efx_enqueue_skb(struct efx_tx_queue *tx_queue, | |||
172 | 172 | ||
173 | /* Process all fragments */ | 173 | /* Process all fragments */ |
174 | while (1) { | 174 | while (1) { |
175 | if (unlikely(pci_dma_mapping_error(dma_addr))) | 175 | if (unlikely(pci_dma_mapping_error(pci_dev, dma_addr))) |
176 | goto pci_err; | 176 | goto pci_err; |
177 | 177 | ||
178 | /* Store fields for marking in the per-fragment final | 178 | /* Store fields for marking in the per-fragment final |
@@ -661,7 +661,8 @@ efx_tsoh_heap_alloc(struct efx_tx_queue *tx_queue, size_t header_len) | |||
661 | tsoh->dma_addr = pci_map_single(tx_queue->efx->pci_dev, | 661 | tsoh->dma_addr = pci_map_single(tx_queue->efx->pci_dev, |
662 | TSOH_BUFFER(tsoh), header_len, | 662 | TSOH_BUFFER(tsoh), header_len, |
663 | PCI_DMA_TODEVICE); | 663 | PCI_DMA_TODEVICE); |
664 | if (unlikely(pci_dma_mapping_error(tsoh->dma_addr))) { | 664 | if (unlikely(pci_dma_mapping_error(tx_queue->efx->pci_dev, |
665 | tsoh->dma_addr))) { | ||
665 | kfree(tsoh); | 666 | kfree(tsoh); |
666 | return NULL; | 667 | return NULL; |
667 | } | 668 | } |
@@ -863,7 +864,7 @@ static inline int tso_get_fragment(struct tso_state *st, struct efx_nic *efx, | |||
863 | 864 | ||
864 | st->ifc.unmap_addr = pci_map_page(efx->pci_dev, page, page_off, | 865 | st->ifc.unmap_addr = pci_map_page(efx->pci_dev, page, page_off, |
865 | len, PCI_DMA_TODEVICE); | 866 | len, PCI_DMA_TODEVICE); |
866 | if (likely(!pci_dma_mapping_error(st->ifc.unmap_addr))) { | 867 | if (likely(!pci_dma_mapping_error(efx->pci_dev, st->ifc.unmap_addr))) { |
867 | st->ifc.unmap_len = len; | 868 | st->ifc.unmap_len = len; |
868 | st->ifc.len = len; | 869 | st->ifc.len = len; |
869 | st->ifc.dma_addr = st->ifc.unmap_addr; | 870 | st->ifc.dma_addr = st->ifc.unmap_addr; |