OpenCloudOS-Kernel/drivers/net/ethernet
Christophe JAILLET 256ca7449f sis: 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 and has been
hand modified to replace GFP_ with a correct flag.
It has been compile tested.

When memory is allocated in 'epic_init_one()' (sis190.c), GFP_KERNEL can be
used because this is a net_device_ops' 'ndo_open' function. This function
is protected by the rtnl_lock() semaphore. So only a mutex is used and no
spin_lock is acquired.

When memory is allocated in 'sis900_probe()' (sis900.c), GFP_KERNEL can be
used because it is a probe function and no spin_lock is acquired.

@@
@@
-    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>
2020-07-20 17:50:07 -07:00
..
3com typhoon: use generic power management 2020-07-01 12:58:33 -07:00
8390 ne2k-pci: Use netif_msg_init to initialize msg_enable bits 2020-07-17 19:04:06 -07:00
adaptec starfire: use generic power management 2020-07-01 12:58:33 -07:00
aeroflex Replace HTTP links with HTTPS ones: GRETH 10/100/1G Ethernet MAC device driver 2020-07-07 15:44:27 -07:00
agere net: ethernet: et131x: Remove redundant register read 2020-07-17 18:48:15 -07:00
alacritech treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
allwinner treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
alteon net: alteon: Avoid some useless memset 2020-07-17 12:57:59 -07:00
altera treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
amazon net: ena: Fix using plain integer as NULL pointer in ena_init_napi_in_range 2020-07-20 16:59:22 -07:00
amd xgbe: convert to new udp_tunnel_nic infra 2020-07-14 17:04:27 -07:00
apm net/apm: Properly mark absence of FW 2020-02-24 11:24:47 -08:00
apple treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
aquantia net: atlantic: add support for FW 4.x 2020-07-17 19:00:54 -07:00
arc net: arc_emac: fix arc_emac_tx()'s return type 2020-06-28 20:52:53 -07:00
atheros net: alx: fix race condition in alx_remove 2020-06-15 13:20:14 -07:00
aurora net: nb8800: fix nb8800_xmit()'s return type 2020-06-28 20:52:53 -07:00
broadcom net: bnxt: don't complain if TC flower can't be supported 2020-07-17 18:26:20 -07:00
brocade net: bna: Remove unused variable 't' 2020-07-17 18:42:28 -07:00
cadence net: macb: Add WoL interrupt support for MACB type of Ethernet controller 2020-07-20 17:01:45 -07:00
calxeda
cavium liquidio_vf: convert to new udp_tunnel_nic infra 2020-07-14 17:04:27 -07:00
chelsio cxgb4: convert to new udp_tunnel_nic infra 2020-07-14 17:04:27 -07:00
cirrus docs: networking: reorganize driver documentation again 2020-06-26 16:08:44 -07:00
cisco enic: convert to new udp_tunnel_nic infra 2020-07-14 17:04:27 -07:00
cortina net: ethernet: Replace HTTP links with HTTPS ones 2020-07-13 17:42:45 -07:00
davicom treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
dec docs: networking: reorganize driver documentation again 2020-06-26 16:08:44 -07:00
dlink net: sundance: Replace HTTP links with HTTPS ones 2020-07-15 17:41:34 -07:00
emulex be2net: convert to new udp_tunnel_nic infra 2020-07-14 17:04:27 -07:00
ezchip treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
faraday treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
freescale net: fs_enet: remove redundant null check 2020-07-20 17:42:17 -07:00
fujitsu treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
google
hisilicon net: hns: use eth_broadcast_addr() to assign broadcast address 2020-07-20 16:55:34 -07:00
huawei hinic: add firmware update support 2020-07-15 18:06:44 -07:00
i825xx treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
ibm ibmvnic: continue to init in CRQ reset returns H_CLOSED 2020-06-20 17:28:41 -07:00
intel fm10k: convert to new udp_tunnel_nic infra 2020-07-14 17:04:27 -07:00
marvell net: mvneta: move rxq->left_size on the stack 2020-07-19 18:28:34 -07:00
mediatek net: ethernet: mtk-star-emac: use devm_of_mdiobus_register() 2020-06-30 15:57:34 -07:00
mellanox net/mlx5e: CT: Map 128 bits labels to 32 bit map ID 2020-07-16 16:37:00 -07:00
micrel ksz884x: switch from 'pci_' to 'dma_' API 2020-07-14 15:10:29 -07:00
microchip lan743x: switch from 'pci_' to 'dma_' API 2020-07-14 13:47:56 -07:00
moxa treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
mscc net: mscc: ocelot: add support for PTP waveform configuration 2020-07-19 19:22:57 -07:00
myricom treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
natsemi natsemi: use generic power management 2020-07-01 12:58:33 -07:00
neterion net: vxge-main: Remove unnecessary cast in kfree() 2020-07-20 16:45:09 -07:00
netronome nfp: convert to new udp_tunnel_nic infra 2020-07-14 17:04:27 -07:00
ni net: ni: Fix use correct return type for ndo_start_xmit() 2020-05-05 11:39:43 -07:00
nvidia treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
nxp net: nxp: Fix use correct return type for ndo_start_xmit() 2020-05-05 11:17:56 -07:00
oki-semi net: pch_gbe: fix pch_gbe_xmit_frame()'s return type 2020-06-28 20:52:53 -07:00
packetengines net: packetengines: switch from 'pci_' to 'dma_' API 2020-07-20 17:48:23 -07:00
pasemi treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
pensando Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-11 00:46:00 -07:00
qlogic qlcnic: convert to new udp_tunnel_nic infra 2020-07-14 17:04:27 -07:00
qualcomm net: rmnet: do not allow to add multiple bridge interfaces 2020-07-04 18:04:55 -07:00
rdc r6040: switch from 'pci_' to 'dma_' API 2020-07-20 17:49:50 -07:00
realtek r8169: add support for RTL8125B 2020-07-14 15:07:16 -07:00
renesas treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
rocker rocker: fix incorrect error handling in dma_rings_init 2020-06-15 13:37:36 -07:00
samsung treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
seeq treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
sfc sfc_ef100: helper function to set default RSS table of given size 2020-07-02 14:47:40 -07:00
sgi treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
silan treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
sis sis: switch from 'pci_' to 'dma_' API 2020-07-20 17:50:07 -07:00
smsc smsc9420: use generic power management 2020-07-07 15:20:49 -07:00
socionext socionext: account for napi_gro_receive never returning GRO_DROP 2020-06-25 16:16:21 -07:00
stmicro net: stmmac: dwmac-meson8b: use clk_parent_data for clock registration 2020-06-26 12:17:29 -07:00
sun net: sungem: switch from 'pci_' to 'dma_' API 2020-07-17 12:56:40 -07:00
synopsys net: dwc-xlgmac: fix xlgmac_xmit()'s return type 2020-06-28 20:52:53 -07:00
tehuti treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
ti net: ethernet: ti: am65-cpsw-nuss: enable am65x sr2.0 support 2020-06-29 17:06:19 -07:00
toshiba treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
tundra treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
via treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
wiznet treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
xilinx net: axienet: fix spelling mistake in comment "Exteneded" -> "extended" 2020-06-15 13:02:03 -07:00
xircom xirc2ps_cs: remove dev null check from do_reset(). 2020-06-23 20:18:16 -07:00
xscale treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
dnet.c net: ethernet: dnet: convert to devm_platform_get_and_ioremap_resource 2020-04-20 12:18:13 -07:00
dnet.h net/dnet: Delete static version from the driver 2020-03-03 17:54:55 -08:00
ec_bhf.c
ethoc.c
fealnx.c net/fealnx: Delete driver version 2020-03-03 17:54:55 -08:00
jme.c net: jme: Replace HTTP links with HTTPS ones 2020-07-13 17:45:04 -07:00
jme.h net: jme: Replace HTTP links with HTTPS ones 2020-07-13 17:45:04 -07:00
korina.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
lantiq_etop.c
lantiq_xrx200.c net: lantiq: Fix use correct return type for ndo_start_xmit() 2020-05-06 14:24:06 -07:00