diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2011-10-06 06:10:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-06 16:17:20 -0400 |
commit | 5d6bcdfe38ce883946aebf751a64695471ce1ab5 (patch) | |
tree | b59bf91fab666e8d8bd7dfb20b70c42d422e6bfa | |
parent | 27737aa3a9f65012b3656b71e0ff230a4811da4d (diff) |
net: use DMA_x_DEVICE and dma_mapping_error with skb_frag_dma_map
When I converted some drivers from pci_map_page to skb_frag_dma_map I
neglected to convert PCI_DMA_xDEVICE into DMA_x_DEVICE and
pci_dma_mapping_error into dma_mapping_error.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
29 files changed, 43 insertions, 44 deletions
diff --git a/drivers/infiniband/hw/amso1100/c2.c b/drivers/infiniband/hw/amso1100/c2.c index 6a8f36e9d9ed..6e85a75289e8 100644 --- a/drivers/infiniband/hw/amso1100/c2.c +++ b/drivers/infiniband/hw/amso1100/c2.c | |||
@@ -803,8 +803,7 @@ static int c2_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
803 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; | 803 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; |
804 | maplen = frag->size; | 804 | maplen = frag->size; |
805 | mapaddr = skb_frag_dma_map(&c2dev->pcidev->dev, frag, | 805 | mapaddr = skb_frag_dma_map(&c2dev->pcidev->dev, frag, |
806 | 0, maplen, | 806 | 0, maplen, DMA_TO_DEVICE); |
807 | PCI_DMA_TODEVICE); | ||
808 | elem = elem->next; | 807 | elem = elem->next; |
809 | elem->skb = NULL; | 808 | elem->skb = NULL; |
810 | elem->mapaddr = mapaddr; | 809 | elem->mapaddr = mapaddr; |
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c index 96cb35a8e317..7cb7f292dfd1 100644 --- a/drivers/infiniband/hw/nes/nes_nic.c +++ b/drivers/infiniband/hw/nes/nes_nic.c | |||
@@ -445,7 +445,7 @@ static int nes_nic_send(struct sk_buff *skb, struct net_device *netdev) | |||
445 | &skb_shinfo(skb)->frags[skb_fragment_index]; | 445 | &skb_shinfo(skb)->frags[skb_fragment_index]; |
446 | bus_address = skb_frag_dma_map(&nesdev->pcidev->dev, | 446 | bus_address = skb_frag_dma_map(&nesdev->pcidev->dev, |
447 | frag, 0, frag->size, | 447 | frag, 0, frag->size, |
448 | PCI_DMA_TODEVICE); | 448 | DMA_TO_DEVICE); |
449 | wqe_fragment_length[wqe_fragment_index] = | 449 | wqe_fragment_length[wqe_fragment_index] = |
450 | cpu_to_le16(skb_shinfo(skb)->frags[skb_fragment_index].size); | 450 | cpu_to_le16(skb_shinfo(skb)->frags[skb_fragment_index].size); |
451 | set_wqe_64bit_value(nic_sqe->wqe_words, NES_NIC_SQ_WQE_FRAG0_LOW_IDX+(2*wqe_fragment_index), | 451 | set_wqe_64bit_value(nic_sqe->wqe_words, NES_NIC_SQ_WQE_FRAG0_LOW_IDX+(2*wqe_fragment_index), |
@@ -566,7 +566,7 @@ tso_sq_no_longer_full: | |||
566 | tso_bus_address[tso_frag_count] = | 566 | tso_bus_address[tso_frag_count] = |
567 | skb_frag_dma_map(&nesdev->pcidev->dev, | 567 | skb_frag_dma_map(&nesdev->pcidev->dev, |
568 | frag, 0, frag->size, | 568 | frag, 0, frag->size, |
569 | PCI_DMA_TODEVICE); | 569 | DMA_TO_DEVICE); |
570 | } | 570 | } |
571 | 571 | ||
572 | tso_frag_index = 0; | 572 | tso_frag_index = 0; |
diff --git a/drivers/net/ethernet/alteon/acenic.c b/drivers/net/ethernet/alteon/acenic.c index 8794cf831bd0..b1a4e8204437 100644 --- a/drivers/net/ethernet/alteon/acenic.c +++ b/drivers/net/ethernet/alteon/acenic.c | |||
@@ -2487,7 +2487,7 @@ restart: | |||
2487 | 2487 | ||
2488 | mapping = skb_frag_dma_map(&ap->pdev->dev, frag, 0, | 2488 | mapping = skb_frag_dma_map(&ap->pdev->dev, frag, 0, |
2489 | frag->size, | 2489 | frag->size, |
2490 | PCI_DMA_TODEVICE); | 2490 | DMA_TO_DEVICE); |
2491 | 2491 | ||
2492 | flagsize = (frag->size << 16); | 2492 | flagsize = (frag->size << 16); |
2493 | if (skb->ip_summed == CHECKSUM_PARTIAL) | 2493 | if (skb->ip_summed == CHECKSUM_PARTIAL) |
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c index 2b9f925fdfc0..12a0b30319db 100644 --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c | |||
@@ -2183,7 +2183,7 @@ static void atl1c_tx_map(struct atl1c_adapter *adapter, | |||
2183 | buffer_info->dma = skb_frag_dma_map(&adapter->pdev->dev, | 2183 | buffer_info->dma = skb_frag_dma_map(&adapter->pdev->dev, |
2184 | frag, 0, | 2184 | frag, 0, |
2185 | buffer_info->length, | 2185 | buffer_info->length, |
2186 | PCI_DMA_TODEVICE); | 2186 | DMA_TO_DEVICE); |
2187 | ATL1C_SET_BUFFER_STATE(buffer_info, ATL1C_BUFFER_BUSY); | 2187 | ATL1C_SET_BUFFER_STATE(buffer_info, ATL1C_BUFFER_BUSY); |
2188 | ATL1C_SET_PCIMAP_TYPE(buffer_info, ATL1C_PCIMAP_PAGE, | 2188 | ATL1C_SET_PCIMAP_TYPE(buffer_info, ATL1C_PCIMAP_PAGE, |
2189 | ATL1C_PCIMAP_TODEVICE); | 2189 | ATL1C_PCIMAP_TODEVICE); |
diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c index 7e27eb354f10..97c45a4b855a 100644 --- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c +++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c | |||
@@ -1769,7 +1769,7 @@ static void atl1e_tx_map(struct atl1e_adapter *adapter, | |||
1769 | frag, | 1769 | frag, |
1770 | (i * MAX_TX_BUF_LEN), | 1770 | (i * MAX_TX_BUF_LEN), |
1771 | tx_buffer->length, | 1771 | tx_buffer->length, |
1772 | PCI_DMA_TODEVICE); | 1772 | DMA_TO_DEVICE); |
1773 | ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_PAGE); | 1773 | ATL1E_SET_PCIMAP_TYPE(tx_buffer, ATL1E_TX_PCIMAP_PAGE); |
1774 | use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma); | 1774 | use_tpd->buffer_addr = cpu_to_le64(tx_buffer->dma); |
1775 | use_tpd->word2 = (use_tpd->word2 & (~TPD_BUFLEN_MASK)) | | 1775 | use_tpd->word2 = (use_tpd->word2 & (~TPD_BUFLEN_MASK)) | |
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c index edf826a50281..43511ab8dd27 100644 --- a/drivers/net/ethernet/atheros/atlx/atl1.c +++ b/drivers/net/ethernet/atheros/atlx/atl1.c | |||
@@ -2285,7 +2285,7 @@ static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb, | |||
2285 | buf_len -= buffer_info->length; | 2285 | buf_len -= buffer_info->length; |
2286 | buffer_info->dma = skb_frag_dma_map(&adapter->pdev->dev, | 2286 | buffer_info->dma = skb_frag_dma_map(&adapter->pdev->dev, |
2287 | frag, i * ATL1_MAX_TX_BUF_LEN, | 2287 | frag, i * ATL1_MAX_TX_BUF_LEN, |
2288 | buffer_info->length, PCI_DMA_TODEVICE); | 2288 | buffer_info->length, DMA_TO_DEVICE); |
2289 | 2289 | ||
2290 | if (++next_to_use == tpd_ring->count) | 2290 | if (++next_to_use == tpd_ring->count) |
2291 | next_to_use = 0; | 2291 | next_to_use = 0; |
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c index 21bdda3766b1..ad24d8c0b8a7 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c | |||
@@ -6539,7 +6539,7 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
6539 | 6539 | ||
6540 | len = frag->size; | 6540 | len = frag->size; |
6541 | mapping = skb_frag_dma_map(&bp->pdev->dev, frag, 0, len, | 6541 | mapping = skb_frag_dma_map(&bp->pdev->dev, frag, 0, len, |
6542 | PCI_DMA_TODEVICE); | 6542 | DMA_TO_DEVICE); |
6543 | if (dma_mapping_error(&bp->pdev->dev, mapping)) | 6543 | if (dma_mapping_error(&bp->pdev->dev, mapping)) |
6544 | goto dma_error; | 6544 | goto dma_error; |
6545 | dma_unmap_addr_set(&txr->tx_buf_ring[ring_prod], mapping, | 6545 | dma_unmap_addr_set(&txr->tx_buf_ring[ring_prod], mapping, |
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 26c6bd44a604..9dbd1af6653c 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c | |||
@@ -6779,12 +6779,12 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
6779 | 6779 | ||
6780 | len = frag->size; | 6780 | len = frag->size; |
6781 | mapping = skb_frag_dma_map(&tp->pdev->dev, frag, 0, | 6781 | mapping = skb_frag_dma_map(&tp->pdev->dev, frag, 0, |
6782 | len, PCI_DMA_TODEVICE); | 6782 | len, DMA_TO_DEVICE); |
6783 | 6783 | ||
6784 | tnapi->tx_buffers[entry].skb = NULL; | 6784 | tnapi->tx_buffers[entry].skb = NULL; |
6785 | dma_unmap_addr_set(&tnapi->tx_buffers[entry], mapping, | 6785 | dma_unmap_addr_set(&tnapi->tx_buffers[entry], mapping, |
6786 | mapping); | 6786 | mapping); |
6787 | if (pci_dma_mapping_error(tp->pdev, mapping)) | 6787 | if (dma_mapping_error(&tp->pdev->dev, mapping)) |
6788 | goto dma_error; | 6788 | goto dma_error; |
6789 | 6789 | ||
6790 | if (tg3_tx_frag_set(tnapi, &entry, &budget, mapping, | 6790 | if (tg3_tx_frag_set(tnapi, &entry, &budget, mapping, |
diff --git a/drivers/net/ethernet/chelsio/cxgb/sge.c b/drivers/net/ethernet/chelsio/cxgb/sge.c index 7cde425f2b84..0a511c4a0472 100644 --- a/drivers/net/ethernet/chelsio/cxgb/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb/sge.c | |||
@@ -1278,7 +1278,7 @@ static inline void write_tx_descs(struct adapter *adapter, struct sk_buff *skb, | |||
1278 | } | 1278 | } |
1279 | 1279 | ||
1280 | mapping = skb_frag_dma_map(&adapter->pdev->dev, frag, 0, | 1280 | mapping = skb_frag_dma_map(&adapter->pdev->dev, frag, 0, |
1281 | frag->size, PCI_DMA_TODEVICE); | 1281 | frag->size, DMA_TO_DEVICE); |
1282 | desc_mapping = mapping; | 1282 | desc_mapping = mapping; |
1283 | desc_len = frag->size; | 1283 | desc_len = frag->size; |
1284 | 1284 | ||
diff --git a/drivers/net/ethernet/chelsio/cxgb3/sge.c b/drivers/net/ethernet/chelsio/cxgb3/sge.c index a0baaa09f025..2f46b37e5d16 100644 --- a/drivers/net/ethernet/chelsio/cxgb3/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb3/sge.c | |||
@@ -980,7 +980,7 @@ static inline unsigned int make_sgl(const struct sk_buff *skb, | |||
980 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; | 980 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; |
981 | 981 | ||
982 | mapping = skb_frag_dma_map(&pdev->dev, frag, 0, frag->size, | 982 | mapping = skb_frag_dma_map(&pdev->dev, frag, 0, frag->size, |
983 | PCI_DMA_TODEVICE); | 983 | DMA_TO_DEVICE); |
984 | sgp->len[j] = cpu_to_be32(frag->size); | 984 | sgp->len[j] = cpu_to_be32(frag->size); |
985 | sgp->addr[j] = cpu_to_be64(mapping); | 985 | sgp->addr[j] = cpu_to_be64(mapping); |
986 | j ^= 1; | 986 | j ^= 1; |
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c index aeab6cd44fcf..1bc908f595de 100644 --- a/drivers/net/ethernet/cisco/enic/enic_main.c +++ b/drivers/net/ethernet/cisco/enic/enic_main.c | |||
@@ -607,7 +607,7 @@ static inline void enic_queue_wq_skb_cont(struct enic *enic, | |||
607 | enic_queue_wq_desc_cont(wq, skb, | 607 | enic_queue_wq_desc_cont(wq, skb, |
608 | skb_frag_dma_map(&enic->pdev->dev, | 608 | skb_frag_dma_map(&enic->pdev->dev, |
609 | frag, 0, frag->size, | 609 | frag, 0, frag->size, |
610 | PCI_DMA_TODEVICE), | 610 | DMA_TO_DEVICE), |
611 | frag->size, | 611 | frag->size, |
612 | (len_left == 0), /* EOP? */ | 612 | (len_left == 0), /* EOP? */ |
613 | loopback); | 613 | loopback); |
@@ -726,7 +726,7 @@ static inline void enic_queue_wq_skb_tso(struct enic *enic, | |||
726 | (unsigned int)WQ_ENET_MAX_DESC_LEN); | 726 | (unsigned int)WQ_ENET_MAX_DESC_LEN); |
727 | dma_addr = skb_frag_dma_map(&enic->pdev->dev, frag, | 727 | dma_addr = skb_frag_dma_map(&enic->pdev->dev, frag, |
728 | offset, len, | 728 | offset, len, |
729 | PCI_DMA_TODEVICE); | 729 | DMA_TO_DEVICE); |
730 | enic_queue_wq_desc_cont(wq, skb, | 730 | enic_queue_wq_desc_cont(wq, skb, |
731 | dma_addr, | 731 | dma_addr, |
732 | len, | 732 | len, |
diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c index a0a647154245..32db4c877ff1 100644 --- a/drivers/net/ethernet/marvell/skge.c +++ b/drivers/net/ethernet/marvell/skge.c | |||
@@ -2777,7 +2777,7 @@ static netdev_tx_t skge_xmit_frame(struct sk_buff *skb, | |||
2777 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; | 2777 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; |
2778 | 2778 | ||
2779 | map = skb_frag_dma_map(&hw->pdev->dev, frag, 0, | 2779 | map = skb_frag_dma_map(&hw->pdev->dev, frag, 0, |
2780 | frag->size, PCI_DMA_TODEVICE); | 2780 | frag->size, DMA_TO_DEVICE); |
2781 | 2781 | ||
2782 | e = e->next; | 2782 | e = e->next; |
2783 | e->skb = skb; | 2783 | e->skb = skb; |
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index 338b10c6f52e..a3ce9b6d36af 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c | |||
@@ -1229,9 +1229,9 @@ static int sky2_rx_map_skb(struct pci_dev *pdev, struct rx_ring_info *re, | |||
1229 | 1229 | ||
1230 | re->frag_addr[i] = skb_frag_dma_map(&pdev->dev, frag, 0, | 1230 | re->frag_addr[i] = skb_frag_dma_map(&pdev->dev, frag, 0, |
1231 | frag->size, | 1231 | frag->size, |
1232 | PCI_DMA_FROMDEVICE); | 1232 | DMA_FROM_DEVICE); |
1233 | 1233 | ||
1234 | if (pci_dma_mapping_error(pdev, re->frag_addr[i])) | 1234 | if (dma_mapping_error(&pdev->dev, re->frag_addr[i])) |
1235 | goto map_page_error; | 1235 | goto map_page_error; |
1236 | } | 1236 | } |
1237 | return 0; | 1237 | return 0; |
@@ -1936,9 +1936,9 @@ static netdev_tx_t sky2_xmit_frame(struct sk_buff *skb, | |||
1936 | const skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; | 1936 | const skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; |
1937 | 1937 | ||
1938 | mapping = skb_frag_dma_map(&hw->pdev->dev, frag, 0, | 1938 | mapping = skb_frag_dma_map(&hw->pdev->dev, frag, 0, |
1939 | frag->size, PCI_DMA_TODEVICE); | 1939 | frag->size, DMA_TO_DEVICE); |
1940 | 1940 | ||
1941 | if (pci_dma_mapping_error(hw->pdev, mapping)) | 1941 | if (dma_mapping_error(&hw->pdev->dev, mapping)) |
1942 | goto mapping_unwind; | 1942 | goto mapping_unwind; |
1943 | 1943 | ||
1944 | upper = upper_32_bits(mapping); | 1944 | upper = upper_32_bits(mapping); |
diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c index 8bf60348844d..26637279cd67 100644 --- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c +++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c | |||
@@ -2928,7 +2928,7 @@ again: | |||
2928 | frag_idx++; | 2928 | frag_idx++; |
2929 | len = frag->size; | 2929 | len = frag->size; |
2930 | bus = skb_frag_dma_map(&mgp->pdev->dev, frag, 0, len, | 2930 | bus = skb_frag_dma_map(&mgp->pdev->dev, frag, 0, len, |
2931 | PCI_DMA_TODEVICE); | 2931 | DMA_TO_DEVICE); |
2932 | dma_unmap_addr_set(&tx->info[idx], bus, bus); | 2932 | dma_unmap_addr_set(&tx->info[idx], bus, bus); |
2933 | dma_unmap_len_set(&tx->info[idx], len, len); | 2933 | dma_unmap_len_set(&tx->info[idx], len, len); |
2934 | } | 2934 | } |
diff --git a/drivers/net/ethernet/natsemi/ns83820.c b/drivers/net/ethernet/natsemi/ns83820.c index e0895e40f10a..73616b911327 100644 --- a/drivers/net/ethernet/natsemi/ns83820.c +++ b/drivers/net/ethernet/natsemi/ns83820.c | |||
@@ -1161,7 +1161,7 @@ again: | |||
1161 | break; | 1161 | break; |
1162 | 1162 | ||
1163 | buf = skb_frag_dma_map(&dev->pci_dev->dev, frag, 0, | 1163 | buf = skb_frag_dma_map(&dev->pci_dev->dev, frag, 0, |
1164 | frag->size, PCI_DMA_TODEVICE); | 1164 | frag->size, DMA_TO_DEVICE); |
1165 | dprintk("frag: buf=%08Lx page=%08lx offset=%08lx\n", | 1165 | dprintk("frag: buf=%08Lx page=%08lx offset=%08lx\n", |
1166 | (long long)buf, (long) page_to_pfn(frag->page), | 1166 | (long long)buf, (long) page_to_pfn(frag->page), |
1167 | frag->page_offset); | 1167 | frag->page_offset); |
diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c index ef5b825a9a9c..4ec7e3f46cc6 100644 --- a/drivers/net/ethernet/neterion/s2io.c +++ b/drivers/net/ethernet/neterion/s2io.c | |||
@@ -4193,7 +4193,7 @@ static netdev_tx_t s2io_xmit(struct sk_buff *skb, struct net_device *dev) | |||
4193 | txdp->Buffer_Pointer = (u64)skb_frag_dma_map(&sp->pdev->dev, | 4193 | txdp->Buffer_Pointer = (u64)skb_frag_dma_map(&sp->pdev->dev, |
4194 | frag, 0, | 4194 | frag, 0, |
4195 | frag->size, | 4195 | frag->size, |
4196 | PCI_DMA_TODEVICE); | 4196 | DMA_TO_DEVICE); |
4197 | txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size); | 4197 | txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size); |
4198 | if (offload_type == SKB_GSO_UDP) | 4198 | if (offload_type == SKB_GSO_UDP) |
4199 | txdp->Control_1 |= TXD_UFO_EN; | 4199 | txdp->Control_1 |= TXD_UFO_EN; |
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c index 4e39b8c04397..84baa59430bb 100644 --- a/drivers/net/ethernet/nvidia/forcedeth.c +++ b/drivers/net/ethernet/nvidia/forcedeth.c | |||
@@ -2150,7 +2150,7 @@ static netdev_tx_t nv_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2150 | &np->pci_dev->dev, | 2150 | &np->pci_dev->dev, |
2151 | frag, offset, | 2151 | frag, offset, |
2152 | bcnt, | 2152 | bcnt, |
2153 | PCI_DMA_TODEVICE); | 2153 | DMA_TO_DEVICE); |
2154 | np->put_tx_ctx->dma_len = bcnt; | 2154 | np->put_tx_ctx->dma_len = bcnt; |
2155 | np->put_tx_ctx->dma_single = 0; | 2155 | np->put_tx_ctx->dma_single = 0; |
2156 | put_tx->buf = cpu_to_le32(np->put_tx_ctx->dma); | 2156 | put_tx->buf = cpu_to_le32(np->put_tx_ctx->dma); |
@@ -2264,7 +2264,7 @@ static netdev_tx_t nv_start_xmit_optimized(struct sk_buff *skb, | |||
2264 | &np->pci_dev->dev, | 2264 | &np->pci_dev->dev, |
2265 | frag, offset, | 2265 | frag, offset, |
2266 | bcnt, | 2266 | bcnt, |
2267 | PCI_DMA_TODEVICE); | 2267 | DMA_TO_DEVICE); |
2268 | np->put_tx_ctx->dma_len = bcnt; | 2268 | np->put_tx_ctx->dma_len = bcnt; |
2269 | np->put_tx_ctx->dma_single = 0; | 2269 | np->put_tx_ctx->dma_single = 0; |
2270 | put_tx->bufhigh = cpu_to_le32(dma_high(np->put_tx_ctx->dma)); | 2270 | put_tx->bufhigh = cpu_to_le32(dma_high(np->put_tx_ctx->dma)); |
diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.c b/drivers/net/ethernet/pasemi/pasemi_mac.c index 532209588323..c6f005684677 100644 --- a/drivers/net/ethernet/pasemi/pasemi_mac.c +++ b/drivers/net/ethernet/pasemi/pasemi_mac.c | |||
@@ -1506,9 +1506,9 @@ static int pasemi_mac_start_tx(struct sk_buff *skb, struct net_device *dev) | |||
1506 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; | 1506 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; |
1507 | 1507 | ||
1508 | map[i + 1] = skb_frag_dma_map(&mac->dma_pdev->dev, frag, 0, | 1508 | map[i + 1] = skb_frag_dma_map(&mac->dma_pdev->dev, frag, 0, |
1509 | frag->size, PCI_DMA_TODEVICE); | 1509 | frag->size, DMA_TO_DEVICE); |
1510 | map_size[i+1] = frag->size; | 1510 | map_size[i+1] = frag->size; |
1511 | if (pci_dma_mapping_error(mac->dma_pdev, map[i+1])) { | 1511 | if (dma_mapping_error(&mac->dma_pdev->dev, map[i + 1])) { |
1512 | nfrags = i; | 1512 | nfrags = i; |
1513 | goto out_err_nolock; | 1513 | goto out_err_nolock; |
1514 | } | 1514 | } |
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c index dc9e21af2dd1..e2ba78be1c2a 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | |||
@@ -1906,8 +1906,8 @@ netxen_map_tx_skb(struct pci_dev *pdev, | |||
1906 | nf = &pbuf->frag_array[i+1]; | 1906 | nf = &pbuf->frag_array[i+1]; |
1907 | 1907 | ||
1908 | map = skb_frag_dma_map(&pdev->dev, frag, 0, frag->size, | 1908 | map = skb_frag_dma_map(&pdev->dev, frag, 0, frag->size, |
1909 | PCI_DMA_TODEVICE); | 1909 | DMA_TO_DEVICE); |
1910 | if (pci_dma_mapping_error(pdev, map)) | 1910 | if (dma_mapping_error(&pdev->dev, map)) |
1911 | goto unwind; | 1911 | goto unwind; |
1912 | 1912 | ||
1913 | nf->dma = map; | 1913 | nf->dma = map; |
diff --git a/drivers/net/ethernet/qlogic/qla3xxx.c b/drivers/net/ethernet/qlogic/qla3xxx.c index 1871d88ee712..46f9b6499f9b 100644 --- a/drivers/net/ethernet/qlogic/qla3xxx.c +++ b/drivers/net/ethernet/qlogic/qla3xxx.c | |||
@@ -2389,9 +2389,9 @@ static int ql_send_map(struct ql3_adapter *qdev, | |||
2389 | } | 2389 | } |
2390 | 2390 | ||
2391 | map = skb_frag_dma_map(&qdev->pdev->dev, frag, 0, frag->size, | 2391 | map = skb_frag_dma_map(&qdev->pdev->dev, frag, 0, frag->size, |
2392 | PCI_DMA_TODEVICE); | 2392 | DMA_TO_DEVICE); |
2393 | 2393 | ||
2394 | err = pci_dma_mapping_error(qdev->pdev, map); | 2394 | err = dma_mapping_error(&qdev->pdev->dev, map); |
2395 | if (err) { | 2395 | if (err) { |
2396 | netdev_err(qdev->ndev, | 2396 | netdev_err(qdev->ndev, |
2397 | "PCI mapping frags failed with error: %d\n", | 2397 | "PCI mapping frags failed with error: %d\n", |
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c index 445956e2d045..eac19e7d2761 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | |||
@@ -2136,8 +2136,8 @@ qlcnic_map_tx_skb(struct pci_dev *pdev, | |||
2136 | nf = &pbuf->frag_array[i+1]; | 2136 | nf = &pbuf->frag_array[i+1]; |
2137 | 2137 | ||
2138 | map = skb_frag_dma_map(&pdev->dev, frag, 0, frag->size, | 2138 | map = skb_frag_dma_map(&pdev->dev, frag, 0, frag->size, |
2139 | PCI_DMA_TODEVICE); | 2139 | DMA_TO_DEVICE); |
2140 | if (pci_dma_mapping_error(pdev, map)) | 2140 | if (dma_mapping_error(&pdev->dev, map)) |
2141 | goto unwind; | 2141 | goto unwind; |
2142 | 2142 | ||
2143 | nf->dma = map; | 2143 | nf->dma = map; |
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c index ce6c6fee3089..f2d9bb78ec7f 100644 --- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c +++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c | |||
@@ -1432,9 +1432,9 @@ static int ql_map_send(struct ql_adapter *qdev, | |||
1432 | } | 1432 | } |
1433 | 1433 | ||
1434 | map = skb_frag_dma_map(&qdev->pdev->dev, frag, 0, frag->size, | 1434 | map = skb_frag_dma_map(&qdev->pdev->dev, frag, 0, frag->size, |
1435 | PCI_DMA_TODEVICE); | 1435 | DMA_TO_DEVICE); |
1436 | 1436 | ||
1437 | err = pci_dma_mapping_error(qdev->pdev, map); | 1437 | err = dma_mapping_error(&qdev->pdev->dev, map); |
1438 | if (err) { | 1438 | if (err) { |
1439 | netif_err(qdev, tx_queued, qdev->ndev, | 1439 | netif_err(qdev, tx_queued, qdev->ndev, |
1440 | "PCI mapping frags failed with error: %d.\n", | 1440 | "PCI mapping frags failed with error: %d.\n", |
diff --git a/drivers/net/ethernet/sfc/tx.c b/drivers/net/ethernet/sfc/tx.c index f2467a1b51bd..3964a62dde8b 100644 --- a/drivers/net/ethernet/sfc/tx.c +++ b/drivers/net/ethernet/sfc/tx.c | |||
@@ -243,7 +243,7 @@ netdev_tx_t efx_enqueue_skb(struct efx_tx_queue *tx_queue, struct sk_buff *skb) | |||
243 | /* Map for DMA */ | 243 | /* Map for DMA */ |
244 | unmap_single = false; | 244 | unmap_single = false; |
245 | dma_addr = skb_frag_dma_map(&pci_dev->dev, fragment, 0, len, | 245 | dma_addr = skb_frag_dma_map(&pci_dev->dev, fragment, 0, len, |
246 | PCI_DMA_TODEVICE); | 246 | DMA_TO_DEVICE); |
247 | } | 247 | } |
248 | 248 | ||
249 | /* Transfer ownership of the skb to the final buffer */ | 249 | /* Transfer ownership of the skb to the final buffer */ |
@@ -926,8 +926,8 @@ static int tso_get_fragment(struct tso_state *st, struct efx_nic *efx, | |||
926 | skb_frag_t *frag) | 926 | skb_frag_t *frag) |
927 | { | 927 | { |
928 | st->unmap_addr = skb_frag_dma_map(&efx->pci_dev->dev, frag, 0, | 928 | st->unmap_addr = skb_frag_dma_map(&efx->pci_dev->dev, frag, 0, |
929 | frag->size, PCI_DMA_TODEVICE); | 929 | frag->size, DMA_TO_DEVICE); |
930 | if (likely(!pci_dma_mapping_error(efx->pci_dev, st->unmap_addr))) { | 930 | if (likely(!dma_mapping_error(&efx->pci_dev->dev, st->unmap_addr))) { |
931 | st->unmap_single = false; | 931 | st->unmap_single = false; |
932 | st->unmap_len = frag->size; | 932 | st->unmap_len = frag->size; |
933 | st->in_len = frag->size; | 933 | st->in_len = frag->size; |
diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c index 12068219059a..d9460d81a137 100644 --- a/drivers/net/ethernet/sun/cassini.c +++ b/drivers/net/ethernet/sun/cassini.c | |||
@@ -2830,7 +2830,7 @@ static inline int cas_xmit_tx_ringN(struct cas *cp, int ring, | |||
2830 | 2830 | ||
2831 | len = fragp->size; | 2831 | len = fragp->size; |
2832 | mapping = skb_frag_dma_map(&cp->pdev->dev, fragp, 0, len, | 2832 | mapping = skb_frag_dma_map(&cp->pdev->dev, fragp, 0, len, |
2833 | PCI_DMA_TODEVICE); | 2833 | DMA_TO_DEVICE); |
2834 | 2834 | ||
2835 | tabort = cas_calc_tabort(cp, fragp->page_offset, len); | 2835 | tabort = cas_calc_tabort(cp, fragp->page_offset, len); |
2836 | if (unlikely(tabort)) { | 2836 | if (unlikely(tabort)) { |
diff --git a/drivers/net/ethernet/sun/sungem.c b/drivers/net/ethernet/sun/sungem.c index 2bfa1715fe23..6b62a73227c2 100644 --- a/drivers/net/ethernet/sun/sungem.c +++ b/drivers/net/ethernet/sun/sungem.c | |||
@@ -1072,7 +1072,7 @@ static netdev_tx_t gem_start_xmit(struct sk_buff *skb, | |||
1072 | 1072 | ||
1073 | len = this_frag->size; | 1073 | len = this_frag->size; |
1074 | mapping = skb_frag_dma_map(&gp->pdev->dev, this_frag, | 1074 | mapping = skb_frag_dma_map(&gp->pdev->dev, this_frag, |
1075 | 0, len, PCI_DMA_TODEVICE); | 1075 | 0, len, DMA_TO_DEVICE); |
1076 | this_ctrl = ctrl; | 1076 | this_ctrl = ctrl; |
1077 | if (frag == skb_shinfo(skb)->nr_frags - 1) | 1077 | if (frag == skb_shinfo(skb)->nr_frags - 1) |
1078 | this_ctrl |= TXDCTRL_EOF; | 1078 | this_ctrl |= TXDCTRL_EOF; |
diff --git a/drivers/net/ethernet/tehuti/tehuti.c b/drivers/net/ethernet/tehuti/tehuti.c index 1151cf994cde..c77e3bf4750a 100644 --- a/drivers/net/ethernet/tehuti/tehuti.c +++ b/drivers/net/ethernet/tehuti/tehuti.c | |||
@@ -1499,7 +1499,7 @@ bdx_tx_map_skb(struct bdx_priv *priv, struct sk_buff *skb, | |||
1499 | db->wptr->len = frag->size; | 1499 | db->wptr->len = frag->size; |
1500 | db->wptr->addr.dma = skb_frag_dma_map(&priv->pdev->dev, frag, | 1500 | db->wptr->addr.dma = skb_frag_dma_map(&priv->pdev->dev, frag, |
1501 | 0, frag->size, | 1501 | 0, frag->size, |
1502 | PCI_DMA_TODEVICE); | 1502 | DMA_TO_DEVICE); |
1503 | 1503 | ||
1504 | pbl++; | 1504 | pbl++; |
1505 | pbl->len = CPU_CHIP_SWAP32(db->wptr->len); | 1505 | pbl->len = CPU_CHIP_SWAP32(db->wptr->len); |
diff --git a/drivers/net/ethernet/via/via-velocity.c b/drivers/net/ethernet/via/via-velocity.c index 1ec32c424e07..b47bce1a2e2a 100644 --- a/drivers/net/ethernet/via/via-velocity.c +++ b/drivers/net/ethernet/via/via-velocity.c | |||
@@ -2559,7 +2559,7 @@ static netdev_tx_t velocity_xmit(struct sk_buff *skb, | |||
2559 | tdinfo->skb_dma[i + 1] = skb_frag_dma_map(&vptr->pdev->dev, | 2559 | tdinfo->skb_dma[i + 1] = skb_frag_dma_map(&vptr->pdev->dev, |
2560 | frag, 0, | 2560 | frag, 0, |
2561 | frag->size, | 2561 | frag->size, |
2562 | PCI_DMA_TODEVICE); | 2562 | DMA_TO_DEVICE); |
2563 | 2563 | ||
2564 | td_ptr->td_buf[i + 1].pa_low = cpu_to_le32(tdinfo->skb_dma[i + 1]); | 2564 | td_ptr->td_buf[i + 1].pa_low = cpu_to_le32(tdinfo->skb_dma[i + 1]); |
2565 | td_ptr->td_buf[i + 1].pa_high = 0; | 2565 | td_ptr->td_buf[i + 1].pa_high = 0; |
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 57e7c66a9057..1694038192e0 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
@@ -750,7 +750,7 @@ vmxnet3_map_pkt(struct sk_buff *skb, struct vmxnet3_tx_ctx *ctx, | |||
750 | tbi->map_type = VMXNET3_MAP_PAGE; | 750 | tbi->map_type = VMXNET3_MAP_PAGE; |
751 | tbi->dma_addr = skb_frag_dma_map(&adapter->pdev->dev, frag, | 751 | tbi->dma_addr = skb_frag_dma_map(&adapter->pdev->dev, frag, |
752 | 0, frag->size, | 752 | 0, frag->size, |
753 | PCI_DMA_TODEVICE); | 753 | DMA_TO_DEVICE); |
754 | 754 | ||
755 | tbi->len = frag->size; | 755 | tbi->len = frag->size; |
756 | 756 | ||
diff --git a/drivers/staging/et131x/et1310_tx.c b/drivers/staging/et131x/et1310_tx.c index 03e7a4ea510d..e4f51e64c7a8 100644 --- a/drivers/staging/et131x/et1310_tx.c +++ b/drivers/staging/et131x/et1310_tx.c | |||
@@ -524,7 +524,7 @@ static int nic_send_packet(struct et131x_adapter *etdev, struct tcb *tcb) | |||
524 | &frags[i - 1], | 524 | &frags[i - 1], |
525 | 0, | 525 | 0, |
526 | frags[i - 1].size, | 526 | frags[i - 1].size, |
527 | PCI_DMA_TODEVICE); | 527 | DMA_TO_DEVICE); |
528 | } | 528 | } |
529 | } | 529 | } |
530 | 530 | ||