linux/drivers/net/ethernet/broadcom
Christophe JAILLET df70303dd1 net: broadcom: switch from 'pci_' to 'dma_' API
The wrappers in include/linux/pci-dma-compat.h should go away.

The patch has been generated with the coccinelle script below.

It has been compile tested.

@@
@@
-    PCI_DMA_BIDIRECTIONAL
+    DMA_BIDIRECTIONAL

@@
@@
-    PCI_DMA_TODEVICE
+    DMA_TO_DEVICE

@@
@@
-    PCI_DMA_FROMDEVICE
+    DMA_FROM_DEVICE

@@
@@
-    PCI_DMA_NONE
+    DMA_NONE

@@
expression e1, e2, e3;
@@
-    pci_alloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

@@
expression e1, e2, e3;
@@
-    pci_zalloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

@@
expression e1, e2, e3, e4;
@@
-    pci_free_consistent(e1, e2, e3, e4)
+    dma_free_coherent(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_map_single(e1, e2, e3, e4)
+    dma_map_single(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_single(e1, e2, e3, e4)
+    dma_unmap_single(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4, e5;
@@
-    pci_map_page(e1, e2, e3, e4, e5)
+    dma_map_page(&e1->dev, e2, e3, e4, e5)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_page(e1, e2, e3, e4)
+    dma_unmap_page(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_map_sg(e1, e2, e3, e4)
+    dma_map_sg(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_sg(e1, e2, e3, e4)
+    dma_unmap_sg(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
+    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_device(e1, e2, e3, e4)
+    dma_sync_single_for_device(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
+    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
+    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)

@@
expression e1, e2;
@@
-    pci_dma_mapping_error(e1, e2)
+    dma_mapping_error(&e1->dev, e2)

@@
expression e1, e2;
@@
-    pci_set_dma_mask(e1, e2)
+    dma_set_mask(&e1->dev, e2)

@@
expression e1, e2;
@@
-    pci_set_consistent_dma_mask(e1, e2)
+    dma_set_coherent_mask(&e1->dev, e2)

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-23 11:56:56 +01:00
..
bnx2x Revert "bnx2x: Read VPD with pci_vpd_alloc()" 2021-08-23 11:08:20 +01:00
bnxt net: broadcom: switch from 'pci_' to 'dma_' API 2021-08-23 11:56:56 +01:00
genet bcmgenet: remove call to netdev_boot_setup_check 2021-08-03 13:05:25 +01:00
b44.c dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
b44.h
bcm63xx_enet.c bcm63xx_enet: delete a redundant assignment 2021-07-29 22:18:42 +01:00
bcm63xx_enet.h bcm63xx_enet: convert to build_skb 2021-01-07 12:39:53 -08:00
bcm4908_enet.c net: broadcom: bcm4908_enet: reset DMA rings sw indexes properly 2021-06-22 10:34:13 -07:00
bcm4908_enet.h net: broadcom: rename BCM4908 driver & update DT binding 2021-02-11 15:04:17 -08:00
bcmsysport.c of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
bcmsysport.h net: broadcom: share header defining UniMAC registers 2021-01-08 19:17:28 -08:00
bgmac-bcma-mdio.c
bgmac-bcma.c of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
bgmac-platform.c net: ethernet: bgmac: Use devm_platform_ioremap_resource_byname 2021-06-07 14:07:22 -07:00
bgmac.c dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
bgmac.h net: broadcom: share header defining UniMAC registers 2021-01-08 19:17:28 -08:00
bnx2_fw.h
bnx2.c net: broadcom: switch from 'pci_' to 'dma_' API 2021-08-23 11:56:56 +01:00
bnx2.h
cnic_defs.h
cnic_if.h
cnic.c cnic: convert tasklets to use new tasklet_setup() API 2020-09-14 13:02:37 -07:00
cnic.h
Kconfig ethernet: fix PTP_1588_CLOCK dependencies 2021-08-13 17:49:05 -07:00
Makefile net: broadcom: rename BCM4908 driver & update DT binding 2021-02-11 15:04:17 -08:00
sb1250-mac.c dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
tg3.c net: broadcom: switch from 'pci_' to 'dma_' API 2021-08-23 11:56:56 +01:00
tg3.h tg3: improve PCI VPD access 2021-01-25 15:24:19 -08:00
unimac.h net: broadcom: share header defining UniMAC registers 2021-01-08 19:17:28 -08:00