get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/814037/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 814037,
    "url": "http://patchwork.ozlabs.org/api/patches/814037/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/1505444511-27231-1-git-send-email-yanjun.zhu@oracle.com/",
    "project": {
        "id": 7,
        "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api",
        "name": "Linux network development",
        "link_name": "netdev",
        "list_id": "netdev.vger.kernel.org",
        "list_email": "netdev@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1505444511-27231-1-git-send-email-yanjun.zhu@oracle.com>",
    "list_archive_url": null,
    "date": "2017-09-15T03:01:51",
    "name": "[1/1] forcedeth: replace pci_map_single with dma_map_single functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "6143199d3859ad426479be40123cfdde681c53a6",
    "submitter": {
        "id": 70718,
        "url": "http://patchwork.ozlabs.org/api/people/70718/?format=api",
        "name": "Zhu Yanjun",
        "email": "yanjun.zhu@oracle.com"
    },
    "delegate": {
        "id": 34,
        "url": "http://patchwork.ozlabs.org/api/users/34/?format=api",
        "username": "davem",
        "first_name": "David",
        "last_name": "Miller",
        "email": "davem@davemloft.net"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/1505444511-27231-1-git-send-email-yanjun.zhu@oracle.com/mbox/",
    "series": [
        {
            "id": 3199,
            "url": "http://patchwork.ozlabs.org/api/series/3199/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=3199",
            "date": "2017-09-15T03:01:51",
            "name": "[1/1] forcedeth: replace pci_map_single with dma_map_single functions",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/3199/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/814037/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/814037/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming@ozlabs.org",
        "Delivered-To": "patchwork-incoming@ozlabs.org",
        "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xtg9C3jSNz9sCZ\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 15 Sep 2017 12:59:27 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751829AbdIOC7W (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 14 Sep 2017 22:59:22 -0400",
            "from aserp1040.oracle.com ([141.146.126.69]:41194 \"EHLO\n\taserp1040.oracle.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751733AbdIOC7V (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 14 Sep 2017 22:59:21 -0400",
            "from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234])\n\tby aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2)\n\twith ESMTP id v8F2xJGo005215\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Fri, 15 Sep 2017 02:59:19 GMT",
            "from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])\n\tby aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v8F2xIfM006218\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Fri, 15 Sep 2017 02:59:18 GMT",
            "from ubhmp0012.oracle.com (ubhmp0012.oracle.com [156.151.24.65])\n\tby userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v8F2xIBm006399; \n\tFri, 15 Sep 2017 02:59:18 GMT",
            "from office-bj2017.cn.oracle.com (/10.182.69.186)\n\tby default (Oracle Beehive Gateway v4.0)\n\twith ESMTP ; Fri, 15 Sep 2017 02:59:18 +0000"
        ],
        "From": "Zhu Yanjun <yanjun.zhu@oracle.com>",
        "To": "jarod@redhat.com, netdev@vger.kernel.org",
        "Subject": "[PATCH 1/1] forcedeth: replace pci_map_single with dma_map_single\n\tfunctions",
        "Date": "Thu, 14 Sep 2017 23:01:51 -0400",
        "Message-Id": "<1505444511-27231-1-git-send-email-yanjun.zhu@oracle.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "X-Source-IP": "aserv0022.oracle.com [141.146.126.234]",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "pci_map_single functions are obsolete. So replace them with\ndma_map_single functions.\n\nSigned-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>\n---\n drivers/net/ethernet/nvidia/forcedeth.c | 70 +++++++++++++++++----------------\n 1 file changed, 36 insertions(+), 34 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c\nindex e6e0de4..0a7ba3a 100644\n--- a/drivers/net/ethernet/nvidia/forcedeth.c\n+++ b/drivers/net/ethernet/nvidia/forcedeth.c\n@@ -1812,12 +1812,12 @@ static int nv_alloc_rx(struct net_device *dev)\n \t\tstruct sk_buff *skb = netdev_alloc_skb(dev, np->rx_buf_sz + NV_RX_ALLOC_PAD);\n \t\tif (skb) {\n \t\t\tnp->put_rx_ctx->skb = skb;\n-\t\t\tnp->put_rx_ctx->dma = pci_map_single(np->pci_dev,\n+\t\t\tnp->put_rx_ctx->dma = dma_map_single(&np->pci_dev->dev,\n \t\t\t\t\t\t\t     skb->data,\n \t\t\t\t\t\t\t     skb_tailroom(skb),\n-\t\t\t\t\t\t\t     PCI_DMA_FROMDEVICE);\n-\t\t\tif (pci_dma_mapping_error(np->pci_dev,\n-\t\t\t\t\t\t  np->put_rx_ctx->dma)) {\n+\t\t\t\t\t\t\t     DMA_FROM_DEVICE);\n+\t\t\tif (dma_mapping_error(&np->pci_dev->dev,\n+\t\t\t\t\t      np->put_rx_ctx->dma)) {\n \t\t\t\tkfree_skb(skb);\n \t\t\t\tgoto packet_dropped;\n \t\t\t}\n@@ -1853,12 +1853,12 @@ static int nv_alloc_rx_optimized(struct net_device *dev)\n \t\tstruct sk_buff *skb = netdev_alloc_skb(dev, np->rx_buf_sz + NV_RX_ALLOC_PAD);\n \t\tif (skb) {\n \t\t\tnp->put_rx_ctx->skb = skb;\n-\t\t\tnp->put_rx_ctx->dma = pci_map_single(np->pci_dev,\n+\t\t\tnp->put_rx_ctx->dma = dma_map_single(&np->pci_dev->dev,\n \t\t\t\t\t\t\t     skb->data,\n \t\t\t\t\t\t\t     skb_tailroom(skb),\n-\t\t\t\t\t\t\t     PCI_DMA_FROMDEVICE);\n-\t\t\tif (pci_dma_mapping_error(np->pci_dev,\n-\t\t\t\t\t\t  np->put_rx_ctx->dma)) {\n+\t\t\t\t\t\t\t     DMA_FROM_DEVICE);\n+\t\t\tif (dma_mapping_error(&np->pci_dev->dev,\n+\t\t\t\t\t      np->put_rx_ctx->dma)) {\n \t\t\t\tkfree_skb(skb);\n \t\t\t\tgoto packet_dropped;\n \t\t\t}\n@@ -1975,9 +1975,9 @@ static void nv_unmap_txskb(struct fe_priv *np, struct nv_skb_map *tx_skb)\n {\n \tif (tx_skb->dma) {\n \t\tif (tx_skb->dma_single)\n-\t\t\tpci_unmap_single(np->pci_dev, tx_skb->dma,\n+\t\t\tdma_unmap_single(&np->pci_dev->dev, tx_skb->dma,\n \t\t\t\t\t tx_skb->dma_len,\n-\t\t\t\t\t PCI_DMA_TODEVICE);\n+\t\t\t\t\t DMA_TO_DEVICE);\n \t\telse\n \t\t\tpci_unmap_page(np->pci_dev, tx_skb->dma,\n \t\t\t\t       tx_skb->dma_len,\n@@ -2045,10 +2045,10 @@ static void nv_drain_rx(struct net_device *dev)\n \t\t}\n \t\twmb();\n \t\tif (np->rx_skb[i].skb) {\n-\t\t\tpci_unmap_single(np->pci_dev, np->rx_skb[i].dma,\n+\t\t\tdma_unmap_single(&np->pci_dev->dev, np->rx_skb[i].dma,\n \t\t\t\t\t (skb_end_pointer(np->rx_skb[i].skb) -\n-\t\t\t\t\t  np->rx_skb[i].skb->data),\n-\t\t\t\t\t PCI_DMA_FROMDEVICE);\n+\t\t\t\t\t np->rx_skb[i].skb->data),\n+\t\t\t\t\t DMA_FROM_DEVICE);\n \t\t\tdev_kfree_skb(np->rx_skb[i].skb);\n \t\t\tnp->rx_skb[i].skb = NULL;\n \t\t}\n@@ -2221,10 +2221,11 @@ static netdev_tx_t nv_start_xmit(struct sk_buff *skb, struct net_device *dev)\n \t\tprev_tx = put_tx;\n \t\tprev_tx_ctx = np->put_tx_ctx;\n \t\tbcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size;\n-\t\tnp->put_tx_ctx->dma = pci_map_single(np->pci_dev, skb->data + offset, bcnt,\n-\t\t\t\t\t\tPCI_DMA_TODEVICE);\n-\t\tif (pci_dma_mapping_error(np->pci_dev,\n-\t\t\t\t\t  np->put_tx_ctx->dma)) {\n+\t\tnp->put_tx_ctx->dma = dma_map_single(&np->pci_dev->dev,\n+\t\t\t\t\t\t     skb->data + offset, bcnt,\n+\t\t\t\t\t\t     DMA_TO_DEVICE);\n+\t\tif (dma_mapping_error(&np->pci_dev->dev,\n+\t\t\t\t      np->put_tx_ctx->dma)) {\n \t\t\t/* on DMA mapping error - drop the packet */\n \t\t\tdev_kfree_skb_any(skb);\n \t\t\tu64_stats_update_begin(&np->swstats_tx_syncp);\n@@ -2369,10 +2370,11 @@ static netdev_tx_t nv_start_xmit_optimized(struct sk_buff *skb,\n \t\tprev_tx = put_tx;\n \t\tprev_tx_ctx = np->put_tx_ctx;\n \t\tbcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size;\n-\t\tnp->put_tx_ctx->dma = pci_map_single(np->pci_dev, skb->data + offset, bcnt,\n-\t\t\t\t\t\tPCI_DMA_TODEVICE);\n-\t\tif (pci_dma_mapping_error(np->pci_dev,\n-\t\t\t\t\t  np->put_tx_ctx->dma)) {\n+\t\tnp->put_tx_ctx->dma = dma_map_single(&np->pci_dev->dev,\n+\t\t\t\t\t\t     skb->data + offset, bcnt,\n+\t\t\t\t\t\t     DMA_TO_DEVICE);\n+\t\tif (dma_mapping_error(&np->pci_dev->dev,\n+\t\t\t\t      np->put_tx_ctx->dma)) {\n \t\t\t/* on DMA mapping error - drop the packet */\n \t\t\tdev_kfree_skb_any(skb);\n \t\t\tu64_stats_update_begin(&np->swstats_tx_syncp);\n@@ -2805,9 +2807,9 @@ static int nv_rx_process(struct net_device *dev, int limit)\n \t\t * TODO: check if a prefetch of the first cacheline improves\n \t\t * the performance.\n \t\t */\n-\t\tpci_unmap_single(np->pci_dev, np->get_rx_ctx->dma,\n-\t\t\t\tnp->get_rx_ctx->dma_len,\n-\t\t\t\tPCI_DMA_FROMDEVICE);\n+\t\tdma_unmap_single(&np->pci_dev->dev, np->get_rx_ctx->dma,\n+\t\t\t\t np->get_rx_ctx->dma_len,\n+\t\t\t\t DMA_FROM_DEVICE);\n \t\tskb = np->get_rx_ctx->skb;\n \t\tnp->get_rx_ctx->skb = NULL;\n \n@@ -2911,9 +2913,9 @@ static int nv_rx_process_optimized(struct net_device *dev, int limit)\n \t\t * TODO: check if a prefetch of the first cacheline improves\n \t\t * the performance.\n \t\t */\n-\t\tpci_unmap_single(np->pci_dev, np->get_rx_ctx->dma,\n-\t\t\t\tnp->get_rx_ctx->dma_len,\n-\t\t\t\tPCI_DMA_FROMDEVICE);\n+\t\tdma_unmap_single(&np->pci_dev->dev, np->get_rx_ctx->dma,\n+\t\t\t\t np->get_rx_ctx->dma_len,\n+\t\t\t\t DMA_FROM_DEVICE);\n \t\tskb = np->get_rx_ctx->skb;\n \t\tnp->get_rx_ctx->skb = NULL;\n \n@@ -5065,11 +5067,11 @@ static int nv_loopback_test(struct net_device *dev)\n \t\tret = 0;\n \t\tgoto out;\n \t}\n-\ttest_dma_addr = pci_map_single(np->pci_dev, tx_skb->data,\n+\ttest_dma_addr = dma_map_single(&np->pci_dev->dev, tx_skb->data,\n \t\t\t\t       skb_tailroom(tx_skb),\n-\t\t\t\t       PCI_DMA_FROMDEVICE);\n-\tif (pci_dma_mapping_error(np->pci_dev,\n-\t\t\t\t  test_dma_addr)) {\n+\t\t\t\t       DMA_FROM_DEVICE);\n+\tif (dma_mapping_error(&np->pci_dev->dev,\n+\t\t\t      test_dma_addr)) {\n \t\tdev_kfree_skb_any(tx_skb);\n \t\tgoto out;\n \t}\n@@ -5124,9 +5126,9 @@ static int nv_loopback_test(struct net_device *dev)\n \t\t}\n \t}\n \n-\tpci_unmap_single(np->pci_dev, test_dma_addr,\n-\t\t       (skb_end_pointer(tx_skb) - tx_skb->data),\n-\t\t       PCI_DMA_TODEVICE);\n+\tdma_unmap_single(&np->pci_dev->dev, test_dma_addr,\n+\t\t\t (skb_end_pointer(tx_skb) - tx_skb->data),\n+\t\t\t DMA_TO_DEVICE);\n \tdev_kfree_skb_any(tx_skb);\n  out:\n \t/* stop engines */\n",
    "prefixes": [
        "1/1"
    ]
}