get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 136195,
    "url": "http://patches.dpdk.org/api/patches/136195/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240129092231.3531217-2-chaoyong.he@corigine.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20240129092231.3531217-2-chaoyong.he@corigine.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240129092231.3531217-2-chaoyong.he@corigine.com",
    "date": "2024-01-29T09:22:30",
    "name": "[v2,1/2] bus/pci: fix secondary process PCI uio resource map problem",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "e8e36eafd4ee3a2b591b526bd4806230b75093ca",
    "submitter": {
        "id": 2554,
        "url": "http://patches.dpdk.org/api/people/2554/?format=api",
        "name": "Chaoyong He",
        "email": "chaoyong.he@corigine.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240129092231.3531217-2-chaoyong.he@corigine.com/mbox/",
    "series": [
        {
            "id": 30926,
            "url": "http://patches.dpdk.org/api/series/30926/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30926",
            "date": "2024-01-29T09:22:29",
            "name": "fix secondary process PCI UIO resource problem",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/30926/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/136195/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/136195/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 4784D439FC;\n\tMon, 29 Jan 2024 10:23:01 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4742D40DDC;\n\tMon, 29 Jan 2024 10:22:58 +0100 (CET)",
            "from NAM10-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam10on2109.outbound.protection.outlook.com [40.107.93.109])\n by mails.dpdk.org (Postfix) with ESMTP id 26D3040DCD;\n Mon, 29 Jan 2024 10:22:56 +0100 (CET)",
            "from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5)\n by PH7PR13MB5868.namprd13.prod.outlook.com (2603:10b6:510:15a::6)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.34; Mon, 29 Jan\n 2024 09:22:53 +0000",
            "from SJ0PR13MB5545.namprd13.prod.outlook.com\n ([fe80::8e02:f738:570a:f8aa]) by SJ0PR13MB5545.namprd13.prod.outlook.com\n ([fe80::8e02:f738:570a:f8aa%7]) with mapi id 15.20.7228.029; Mon, 29 Jan 2024\n 09:22:52 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=lYBYkW4IWHm2YquBV3HMZGcA9MrxmakPLGDgqrNBiUqjUU0sXRRWLBlo7JoFn3PA7S4YYwITEYVOOv4jDeETwGMld2UTulgFTp9wNdKPblPhf+n9uoc66keKjm7u+treqo8bd97S1Hm+ZGGM3A5uM5yIFfxaRNjzDYi+dOZ2IHFzpZ46bbFlbaJ1sJEBKQiGZlb+Lvck3meM1okIXzkwwkVoR+oBD6iRUYqwedfI/oH5GQJe11tCJ5SIe6xXy69ercuAnEpqnTUmlPwuFZ8eSojnZ1kclrT97qtpSGsFdG3YnBpQOgPuX9vgsxNiy/v1P91bYsGnIPmGL05fbtxDUw==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=OL3PmuDQ3znPHJldV9NpFcGyxbXR/opqxozaQmq0S3c=;\n b=QqTFvywW7Iz/zjhDxbMjXZ3HIB6JO92VrEVZOcn2RpjpSkXJ9qRyFC1O+2wszaYX1uLBpA+M0ExAZ7qSg+ecvd8XXDNuUWlh+9IPRZhVD+itrjbZF2svXXsmaUmyzNQgMFiH1b3XXZqZlw+6o8NOYyDM9XR1tmCi8Fx7aMAkCzpV4r1UiIZzt/tt26KbbFLfH2UXeCBKaBHn9Ue31B5JX/WYSBQNKgmNObM6cbWY+sYbnGn0/lvJ0fb23xaH7OMME2u+vpaI5FUyqEBDblwfhU57ynfPHbW1p5JDL1Eq01vqZQw9oPXYueAi6lfGgEmGt/MUL+Os4svP0TDOHBdSFQ==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com;\n dkim=pass header.d=corigine.com; arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=OL3PmuDQ3znPHJldV9NpFcGyxbXR/opqxozaQmq0S3c=;\n b=vynryJVinWv2FN/o2q/N9D+/b7HDDOXHMiMc7+zZFbmnTQBw5m+DOeEmb+0Nwn4jl4zD0zNYLxOT+PVrLP0ebYEXw6aIoLZH606rzOucKp3U5CZW4aa6bRJaAu4lCfmW2NvPdBcO+RQr2IFKA8mO9jpXwJvcRn/25/zUN88APsk=",
        "Authentication-Results": "dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=corigine.com;",
        "From": "Chaoyong He <chaoyong.he@corigine.com>",
        "To": "dev@dpdk.org",
        "Cc": "oss-drivers@corigine.com, Zerun Fu <zerun.fu@corigine.com>,\n mukawa@igel.co.jp, stable@dpdk.org, Chaoyong He <chaoyong.he@corigine.com>,\n Long Wu <long.wu@corigine.com>, Peng Zhang <peng.zhang@corigine.com>",
        "Subject": "[PATCH v2 1/2] bus/pci: fix secondary process PCI uio resource map\n problem",
        "Date": "Mon, 29 Jan 2024 17:22:30 +0800",
        "Message-Id": "<20240129092231.3531217-2-chaoyong.he@corigine.com>",
        "X-Mailer": "git-send-email 2.39.1",
        "In-Reply-To": "<20240129092231.3531217-1-chaoyong.he@corigine.com>",
        "References": "<20240124104523.2022242-1-chaoyong.he@corigine.com>\n <20240129092231.3531217-1-chaoyong.he@corigine.com>",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-ClientProxiedBy": "BYAPR21CA0021.namprd21.prod.outlook.com\n (2603:10b6:a03:114::31) To SJ0PR13MB5545.namprd13.prod.outlook.com\n (2603:10b6:a03:424::5)",
        "MIME-Version": "1.0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "SJ0PR13MB5545:EE_|PH7PR13MB5868:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "89fddbd2-b128-4248-76c9-08dc20abde88",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n HUq07eLnq54f+zO1+mkbSSLXXoykFtBrQDpjtkRBfNpe6JIyHAz2rWV5NveG2W0rrjDf0kQLr9hZIEBi0aswy6OV8OWDOfvJo51rcyJaP2mvw5j86WJ5o3yKi2M9IO6ghOat4a4sCbJbusytLYQBcT/kM+cgTFJ1HOTeq2BcW5bND7nu6zn0wQgQ2qeltrURDv9McqXBKotoCDiFTSCCaNt23rx2SM5rnh49cTeEGKVGhr8wBLEWj7mNrDv0ka56ZN6A/5HsPJPIQSHbE6pRxTP35qoBNXxPDvNtbIAhl02OPztECKOPwzOkbJ4zYRtyuOIe/GVH+RplqgX9uhf7fxIwQIY76268m3ibCrtURD6de6oTqkW3aylJpyMqcvVXhd9TEC5FaFBl63LZS6JpAvLMCXDoc/jEs190UK2CUXRo0pl515YGrldCSMyZb0FjTLPU/qL9xcCi6Crh1bqtQ9s62znJe1nZ0tX25JgwGPwZfMUwMZ/SYNd+zHZFMR74Y72t/xR9cC+VaRgzbPu/hYakbypR4+AJjBYzSrJbcuN6kbjhUAQG2avhQeaXyDILnuT37yoqhDnAvxRVAAobjF2MUytdSgbbb+Fs6XxT/IrxSGkOGFFT/drfaLKTXfCS",
        "X-Forefront-Antispam-Report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE;\n SFS:(13230031)(396003)(39830400003)(366004)(346002)(136003)(376002)(230922051799003)(451199024)(64100799003)(186009)(1800799012)(83380400001)(2906002)(5660300002)(38100700002)(6486002)(66556008)(66476007)(316002)(66946007)(41300700001)(54906003)(6916009)(107886003)(26005)(1076003)(2616005)(8936002)(8676002)(6506007)(44832011)(6666004)(6512007)(52116002)(4326008)(478600001)(36756003)(86362001)(38350700005);\n DIR:OUT; SFP:1102;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "\n 6rz2MZ4ribyOcKxs9+sMHpxUtlPmQTBKa9nkVKtZJtpgIJPXlwZ87upySepuNwEvfWbB3jX629fCS9b9DQucEDCE8RByM+QSCaslG99b5Ty12LU/ai66pqjRZzEtjvQ2HWW9M+LgqepjZrMVVU6eFjnAWgWCjW7vRiKn3acg6aIcKBuX8kvXVAosvjgQ1E1LforHCI71mfd3D9V7KTydpl323pgXW1Qu1HUL0b7J6+iDohV+itfmi3jqsBwzhCSss1HqbkrO64zTwqIS94Sf7GmRPmSAPcvV5IMquLXMaAldPNeZgt91LO99BZJaynVeprbwIVG1ffF/OWwdoKilFw0BoiELbRGA7MmJcfthxj4E4TMoB2WRYAEZmC89n485bXYbIYqacsaEyMrauLM8Zpwlk7sTTgTh0GI/hclu6wpraEkJfLDFSyCzB1ObEpyQL2JeMrrk1Y38xzJKiE2lLBI0alSx/LuIDWojgmHfKAZjTeipmj8SMM2/7L2fUBeL/vfWpxJI3on8OQu3sgxYpLWXX7JRO7knus5prFVuOuNFLiydg1Xoz3eIdVpOnvvbz+DNbn+4E3JcNtXRWfbb2hdBVpDhoCf/pzDJQCaqJ8tIpFvDSewe/+ex2g0M8qNfRZ1e2ibHlxdiY3MfxnpDbW4zZUaKvY/p8n85dbZwQuU6qURReTaUB2HD7UvfLfCuhitGbBRFqDmCB1YfEM0s9ZVM/3TXP9VspqtKI+8MiGVmqZAnyJtIJ++yKjUeA+jzeh2r7ApaGl2uIDJZilqdF1ouzVWFowEuf9rNmPH9kzvONLKe49wwRF9bEwXh5MSUKKIIhp7Jexx7kR8YcLQ+NeJ5KXw6ZIkEhgwDcD988FW8jjRD1MDfRj9khXe80exH1NUf5fIyjzDNh9xRS4dMHEZCVztI1l5hPp5BhL61UJ3LPcMeWTJe7H4oJgvp9YGUUbohFAdxE8rKsiAklFcFLxh781NCrlI9WzJndSxsq3hSkoCw/VQxhcla/+FhjfWT/7Uxjj4HKE/4no5+iWjVH1fzfFLsgn9CD5NG0Wsw0WT5ihD21FRjc+xOBUEIwy07d4RN/mpajJFSHnZ9WcCaEB/43UVLzeER0W0Cuzua+wQnH80rHpF1SmY9ahZpaYotth0Qq0cRn1gibaG/2UhQxnGNF+gXEOuWFUsq12ZIPlk9EuwHnQnNDEE/h5pXXrW+cQD+ly5BhjfmQSDqY7R8qrWCU4kY7z1HouScjKJ5OBjIkO7GuB5ErWs5LbmTAMrmyGYPeAd5U0PgmMQcyJD6bvOhqraIl/7jb0RSMKS7xOa+DXw03VCWuJ92gXAWOW8fdLzUK5Dfza9Zr4kPQtiyqxazmZ1YPP0V2LrTk5zCnIliqQLR0e1WQbImYOZs807U9pnPsBArFaxVyszQ1J29J00SnVmECK0fBIzFHaB4UhOvdaZ4r/oo+oc8xSrHlRwQ//uuhm+LifMMjPH8shYfy12MMEhYvZELBBtqU5LcOiUWNdRLcLinFKSasgbkW7lk3swqZX6GVtyaRpbyQCZieJaZ6F5MLOOTrPzQVrd5k/0qG9nxcs3H+1t5CK0mVaKyTaZD1aavShujUTk3fr/pmw==",
        "X-OriginatorOrg": "corigine.com",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 89fddbd2-b128-4248-76c9-08dc20abde88",
        "X-MS-Exchange-CrossTenant-AuthSource": "SJ0PR13MB5545.namprd13.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "29 Jan 2024 09:22:52.7469 (UTC)",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "X-MS-Exchange-CrossTenant-Id": "fe128f2c-073b-4c20-818e-7246a585940c",
        "X-MS-Exchange-CrossTenant-MailboxType": "HOSTED",
        "X-MS-Exchange-CrossTenant-UserPrincipalName": "\n zKDDsluAPdc52GZcLAOZkPbenuQgi1y2vOjVDmq17KOIAz0c7MP2Bap+mgdWEIC/psckX7a5EwznDHM48QNi+VTRkG5e3ed8OMJFPiWJg88=",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "PH7PR13MB5868",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "From: Zerun Fu <zerun.fu@corigine.com>\n\nFor the primary process, the logic loops all BARs and will skip\nthe map of BAR with an invalid physical address (0), also will\nassign 'uio_res->nb_maps' with the real mapped BARs number. But\nfor the secondary process, instead of loops all BARs, the logic\nusing the 'uio_res->nb_map' as index. If the device uses continuous\nBARs there will be no problem, whereas if it uses discrete BARs,\nit will lead to mapping errors.\n\nFix this problem by also loops all BARs and skip the map of BAR\nwith an invalid physical address in secondary process.\n\nFixes: 9b957f378abf (\"pci: merge uio functions for linux and bsd\")\nCc: mukawa@igel.co.jp\nCc: stable@dpdk.org\n\nSigned-off-by: Zerun Fu <zerun.fu@corigine.com>\nReviewed-by: Chaoyong He <chaoyong.he@corigine.com>\nReviewed-by: Long Wu <long.wu@corigine.com>\nReviewed-by: Peng Zhang <peng.zhang@corigine.com>\n---\n drivers/bus/pci/pci_common_uio.c | 94 ++++++++++++++++++++------------\n 1 file changed, 60 insertions(+), 34 deletions(-)",
    "diff": "diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_common_uio.c\nindex 76c661f054..fcd8a49daf 100644\n--- a/drivers/bus/pci/pci_common_uio.c\n+++ b/drivers/bus/pci/pci_common_uio.c\n@@ -23,10 +23,57 @@ static struct rte_tailq_elem rte_uio_tailq = {\n };\n EAL_REGISTER_TAILQ(rte_uio_tailq)\n \n+static int\n+pci_uio_map_secondary_resource_by_index(struct rte_pci_device *dev,\n+\t\tint res_idx, struct mapped_pci_resource *uio_res, int map_idx)\n+{\n+\tint fd, i;\n+\n+\tif (map_idx >= uio_res->nb_maps)\n+\t\treturn -1;\n+\n+\t/*\n+\t * open devname, to mmap it\n+\t */\n+\tfd = open(uio_res->maps[map_idx].path, O_RDWR);\n+\tif (fd < 0) {\n+\t\tRTE_LOG(ERR, EAL, \"Cannot open %s: %s\\n\",\n+\t\t\tuio_res->maps[map_idx].path, strerror(errno));\n+\t\treturn -1;\n+\t}\n+\n+\tvoid *mapaddr = pci_map_resource(uio_res->maps[map_idx].addr,\n+\t\t\tfd, (off_t)uio_res->maps[map_idx].offset,\n+\t\t\t(size_t)uio_res->maps[map_idx].size, 0);\n+\n+\t/* fd is not needed in secondary process, close it */\n+\tclose(fd);\n+\tif (mapaddr != uio_res->maps[map_idx].addr) {\n+\t\tRTE_LOG(ERR, EAL,\n+\t\t\t\"Cannot mmap device resource file %s to address: %p\\n\",\n+\t\t\tuio_res->maps[map_idx].path,\n+\t\t\tuio_res->maps[map_idx].addr);\n+\t\tif (mapaddr != NULL) {\n+\t\t\t/* unmap addrs correctly mapped */\n+\t\t\tfor (i = 0; i < map_idx; i++)\n+\t\t\t\tpci_unmap_resource(\n+\t\t\t\t\tuio_res->maps[i].addr,\n+\t\t\t\t\t(size_t)uio_res->maps[i].size);\n+\t\t\t/* unmap addr wrongly mapped */\n+\t\t\tpci_unmap_resource(mapaddr,\n+\t\t\t\t(size_t)uio_res->maps[map_idx].size);\n+\t\t}\n+\t\treturn -1;\n+\t}\n+\tdev->mem_resource[res_idx].addr = mapaddr;\n+\n+\treturn 0;\n+}\n+\n static int\n pci_uio_map_secondary(struct rte_pci_device *dev)\n {\n-\tint fd, i, j;\n+\tint map_idx = 0, res_idx, ret;\n \tstruct mapped_pci_resource *uio_res;\n \tstruct mapped_pci_res_list *uio_res_list =\n \t\t\tRTE_TAILQ_CAST(rte_uio_tailq.head, mapped_pci_res_list);\n@@ -37,41 +84,20 @@ pci_uio_map_secondary(struct rte_pci_device *dev)\n \t\tif (rte_pci_addr_cmp(&uio_res->pci_addr, &dev->addr))\n \t\t\tcontinue;\n \n-\t\tfor (i = 0; i != uio_res->nb_maps; i++) {\n-\t\t\t/*\n-\t\t\t * open devname, to mmap it\n-\t\t\t */\n-\t\t\tfd = open(uio_res->maps[i].path, O_RDWR);\n-\t\t\tif (fd < 0) {\n-\t\t\t\tRTE_LOG(ERR, EAL, \"Cannot open %s: %s\\n\",\n-\t\t\t\t\tuio_res->maps[i].path, strerror(errno));\n-\t\t\t\treturn -1;\n+\t\t/* Map all BARs */\n+\t\tfor (res_idx = 0; res_idx != PCI_MAX_RESOURCE; res_idx++) {\n+\t\t\t /* skip empty BAR */\n+\t\t\tif (dev->mem_resource[res_idx].phys_addr == 0)\n+\t\t\t\tcontinue;\n+\n+\t\t\tret = pci_uio_map_secondary_resource_by_index(dev, res_idx,\n+\t\t\t\t\tuio_res, map_idx);\n+\t\t\tif (ret < 0) {\n+\t\t\t\tRTE_LOG(ERR, EAL, \"Failed to map resources\\n\");\n+\t\t\t\treturn ret;\n \t\t\t}\n \n-\t\t\tvoid *mapaddr = pci_map_resource(uio_res->maps[i].addr,\n-\t\t\t\t\tfd, (off_t)uio_res->maps[i].offset,\n-\t\t\t\t\t(size_t)uio_res->maps[i].size, 0);\n-\n-\t\t\t/* fd is not needed in secondary process, close it */\n-\t\t\tclose(fd);\n-\t\t\tif (mapaddr != uio_res->maps[i].addr) {\n-\t\t\t\tRTE_LOG(ERR, EAL,\n-\t\t\t\t\t\"Cannot mmap device resource file %s to address: %p\\n\",\n-\t\t\t\t\tuio_res->maps[i].path,\n-\t\t\t\t\tuio_res->maps[i].addr);\n-\t\t\t\tif (mapaddr != NULL) {\n-\t\t\t\t\t/* unmap addrs correctly mapped */\n-\t\t\t\t\tfor (j = 0; j < i; j++)\n-\t\t\t\t\t\tpci_unmap_resource(\n-\t\t\t\t\t\t\tuio_res->maps[j].addr,\n-\t\t\t\t\t\t\t(size_t)uio_res->maps[j].size);\n-\t\t\t\t\t/* unmap addr wrongly mapped */\n-\t\t\t\t\tpci_unmap_resource(mapaddr,\n-\t\t\t\t\t\t(size_t)uio_res->maps[i].size);\n-\t\t\t\t}\n-\t\t\t\treturn -1;\n-\t\t\t}\n-\t\t\tdev->mem_resource[i].addr = mapaddr;\n+\t\t\tmap_idx++;\n \t\t}\n \t\treturn 0;\n \t}\n",
    "prefixes": [
        "v2",
        "1/2"
    ]
}