netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/1] forcedeth: replace pci_unmap_page with dma_unmap_page
@ 2017-11-19 14:05 Zhu Yanjun
  2017-11-20  2:38 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Zhu Yanjun @ 2017-11-19 14:05 UTC (permalink / raw)
  To: tremyfr, netdev

The function pci_unmap_page is obsolete. So it is replaced with
the function dma_unmap_page.

CC: Srinivas Eeda <srinivas.eeda@oracle.com>
CC: Joe Jin <joe.jin@oracle.com>
CC: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
---
 drivers/net/ethernet/nvidia/forcedeth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index ac8439c..0febe41 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -1986,7 +1986,7 @@ static void nv_unmap_txskb(struct fe_priv *np, struct nv_skb_map *tx_skb)
 					 tx_skb->dma_len,
 					 DMA_TO_DEVICE);
 		else
-			pci_unmap_page(np->pci_dev, tx_skb->dma,
+			dma_unmap_page(&np->pci_dev->dev, tx_skb->dma,
 				       tx_skb->dma_len,
 				       PCI_DMA_TODEVICE);
 		tx_skb->dma = 0;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next 1/1] forcedeth: replace pci_unmap_page with dma_unmap_page
  2017-11-19 14:05 [PATCH net-next 1/1] forcedeth: replace pci_unmap_page with dma_unmap_page Zhu Yanjun
@ 2017-11-20  2:38 ` David Miller
  2017-11-20  3:21   ` [PATCHv2 " Zhu Yanjun
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2017-11-20  2:38 UTC (permalink / raw)
  To: yanjun.zhu; +Cc: tremyfr, netdev

From: Zhu Yanjun <yanjun.zhu@oracle.com>
Date: Sun, 19 Nov 2017 09:05:31 -0500

> @@ -1986,7 +1986,7 @@ static void nv_unmap_txskb(struct fe_priv *np, struct nv_skb_map *tx_skb)
>  					 tx_skb->dma_len,
>  					 DMA_TO_DEVICE);
>  		else
> -			pci_unmap_page(np->pci_dev, tx_skb->dma,
> +			dma_unmap_page(&np->pci_dev->dev, tx_skb->dma,
>  				       tx_skb->dma_len,
>  				       PCI_DMA_TODEVICE);

So you're going to call a dma_*() function using a PCI_DMA_* direction
flag?

Please correct this.

Thank you.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCHv2 net-next 1/1] forcedeth: replace pci_unmap_page with dma_unmap_page
  2017-11-20  2:38 ` David Miller
@ 2017-11-20  3:21   ` Zhu Yanjun
  2017-11-24 20:09     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Zhu Yanjun @ 2017-11-20  3:21 UTC (permalink / raw)
  To: tremyfr, netdev

The function pci_unmap_page is obsolete. So it is replaced with
the function dma_unmap_page.

CC: Srinivas Eeda <srinivas.eeda@oracle.com>
CC: Joe Jin <joe.jin@oracle.com>
CC: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
---
V1->V2: fix direction flag error.
---
 drivers/net/ethernet/nvidia/forcedeth.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index ac8439c..481876b 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -1986,9 +1986,9 @@ static void nv_unmap_txskb(struct fe_priv *np, struct nv_skb_map *tx_skb)
 					 tx_skb->dma_len,
 					 DMA_TO_DEVICE);
 		else
-			pci_unmap_page(np->pci_dev, tx_skb->dma,
+			dma_unmap_page(&np->pci_dev->dev, tx_skb->dma,
 				       tx_skb->dma_len,
-				       PCI_DMA_TODEVICE);
+				       DMA_TO_DEVICE);
 		tx_skb->dma = 0;
 	}
 }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCHv2 net-next 1/1] forcedeth: replace pci_unmap_page with dma_unmap_page
  2017-11-20  3:21   ` [PATCHv2 " Zhu Yanjun
@ 2017-11-24 20:09     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-11-24 20:09 UTC (permalink / raw)
  To: yanjun.zhu; +Cc: tremyfr, netdev

From: Zhu Yanjun <yanjun.zhu@oracle.com>
Date: Sun, 19 Nov 2017 22:21:08 -0500

> The function pci_unmap_page is obsolete. So it is replaced with
> the function dma_unmap_page.
> 
> CC: Srinivas Eeda <srinivas.eeda@oracle.com>
> CC: Joe Jin <joe.jin@oracle.com>
> CC: Junxiao Bi <junxiao.bi@oracle.com>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
> ---
> V1->V2: fix direction flag error.

Applied, thank you.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-24 20:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-19 14:05 [PATCH net-next 1/1] forcedeth: replace pci_unmap_page with dma_unmap_page Zhu Yanjun
2017-11-20  2:38 ` David Miller
2017-11-20  3:21   ` [PATCHv2 " Zhu Yanjun
2017-11-24 20:09     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).