Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/131609/?format=api
https://patches.dpdk.org/api/patches/131609/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230919095440.45445-8-chaoyong.he@corigine.com/", "project": { "id": 1, "url": "https://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": "<20230919095440.45445-8-chaoyong.he@corigine.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230919095440.45445-8-chaoyong.he@corigine.com", "date": "2023-09-19T09:54:21", "name": "[v5,07/26] net/nfp: standard the comment style", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "b5e0085730f3133f08736e6f7608b867e378f91c", "submitter": { "id": 2554, "url": "https://patches.dpdk.org/api/people/2554/?format=api", "name": "Chaoyong He", "email": "chaoyong.he@corigine.com" }, "delegate": { "id": 319, "url": "https://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230919095440.45445-8-chaoyong.he@corigine.com/mbox/", "series": [ { "id": 29547, "url": "https://patches.dpdk.org/api/series/29547/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=29547", "date": "2023-09-19T09:54:14", "name": "refact the nfpcore module", "version": 5, "mbox": "https://patches.dpdk.org/series/29547/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/131609/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/131609/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 47C1642600;\n\tTue, 19 Sep 2023 11:57:21 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 723BA40F35;\n\tTue, 19 Sep 2023 11:56:02 +0200 (CEST)", "from NAM02-SN1-obe.outbound.protection.outlook.com\n (mail-sn1nam02on2113.outbound.protection.outlook.com [40.107.96.113])\n by mails.dpdk.org (Postfix) with ESMTP id 2AEF740E03\n for <dev@dpdk.org>; Tue, 19 Sep 2023 11:55:57 +0200 (CEST)", "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.6792.26; Tue, 19 Sep\n 2023 09:55:33 +0000", "from SJ0PR13MB5545.namprd13.prod.outlook.com\n ([fe80::7a1c:2887:348a:84bd]) by SJ0PR13MB5545.namprd13.prod.outlook.com\n ([fe80::7a1c:2887:348a:84bd%6]) with mapi id 15.20.6792.026; Tue, 19 Sep 2023\n 09:55:32 +0000" ], "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=WUMwnbvVjd48JUvaIF7tsAVPANiReEzEopW2QDKQnVnQFVu2oRV7hmXLNYdB/zWRymWx4lWOwRDiBxav3Zsd9va/z9jssOkVTE8NdvRo++g8F0FoFvVRn6sDRammzioh0ZOuZDtqVfAoTzdI2X8fa24/kHN3V+jDvUPOo4vXqqr5PFHvUgeYFG+XxQmQWB1UDLmNau7phNs/y5Le3qtXZygTUux/ixF5xN8c6xViItdSW6Okbi8wJNBj1cYPBGtnHyV1Q1b6GPKnGql3v/UHYNNlPJ4vbxMMXeeT2X70WC0qC+JzEIoO9TW88Gtwi1Praxp7MITLmOyRmY1FF4R/2Q==", "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=hkLS9vPxfb7ine0ScRA0BD573yal/dL/TnFOPQPfVPg=;\n b=L7N1BJW2k8rQdcdCtt51i8QA3t15f4URGUpFpJ0XXcuYnnYmdMbfs5PthqCtjS11PmORrNr1TnbfjUaKRcQT2swdemGwifss/rZpI04fh9Tcr0Z9BlUZmbSfKVl2K6Y0pd92EcyYg6TA38Tk61BhmhN2ag97c8/SPghFZDIB0hsCW0NGvpWXaCLe1xEu1d7tyaY6FqquGh5SWbbhtZ2DDdXhZD0xiUu4mO6WFm5DaBHsZlhFZXRygBR1c80b3qHumrzfr8LD8FO0lIwiiPOHxirPBbLB/kLKs2VwDt7BSm1gIBsArfHF8uT4HszTZQh31TdUgqCnFg9v68KNXEranw==", "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=hkLS9vPxfb7ine0ScRA0BD573yal/dL/TnFOPQPfVPg=;\n b=JQZL508oDlPc7H8lRlvO93tW6MS6gtBE6d9SL4r4UYJYhh0fE58ompy5gRm4OPJTbDdNIFp3PhD9fg+libyHv1obO6usMZTq9FQWgYLgG3IVKZm8BZNt1Wobwm314lyyKFr7QTEEU/s58C4UOOdFKvsnz3UrJL5hUvttOXEb0U8=", "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,\n\tChaoyong He <chaoyong.he@corigine.com>", "Subject": "[PATCH v5 07/26] net/nfp: standard the comment style", "Date": "Tue, 19 Sep 2023 17:54:21 +0800", "Message-Id": "<20230919095440.45445-8-chaoyong.he@corigine.com>", "X-Mailer": "git-send-email 2.39.1", "In-Reply-To": "<20230919095440.45445-1-chaoyong.he@corigine.com>", "References": "<20230918024612.1600536-1-chaoyong.he@corigine.com>\n <20230919095440.45445-1-chaoyong.he@corigine.com>", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-ClientProxiedBy": "BY5PR04CA0014.namprd04.prod.outlook.com\n (2603:10b6:a03:1d0::24) 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": "203b18e7-2c98-466b-d8f0-08dbb8f69019", "X-MS-Exchange-SenderADCheck": "1", "X-MS-Exchange-AntiSpam-Relay": "0", "X-Microsoft-Antispam": "BCL:0;", "X-Microsoft-Antispam-Message-Info": "\n PqMbpldtQA0HcugUqzhyKW45xowzwQJ6cMcoklMfMaerX72m0GmHY4/FHC0CmWS/DIl520b8/Cyktz7oWRm5OWwG6PlRW4l6xxwIxnYr4NL+HDlCvFQQU7FLEDULABxAKhCIOJq2xzQGISyByH1woBWMMbwjLY3ThYsYALq9AstkpMKpLGuy9UQNl0fIWaTmfaa/gkrUrG+WctEwB4Ulzx9jj6QlNrCpNNjmkObzP7DgHcqZdn/v2pkwRI7j6EK34Dnn3cxWKz2yQst/H8SnGTd7yUAv2lb6CJWycr6gCB6GuB/MPgJmAKGp/wapGlDacnnC+DmZ1gVQMh9ve1XIUOwjAbVwq3hOt+5AdmNcqSCe94At+qOXLnm9px718occv8XQc0XZHqBpiZRAs3GKXy7fOVupC1aR8EIIeXRaTlErhRsIowhH+bA+xYQnZukAmwmYAYevevmv8thSdZDf0N5/q/Ql+avR+TFVBINJ9yaRhSX/lRsjVts9TG1mHeD+RbAFkrDE5YrX6iwFqXUq/L71LcvA/P6Q7Us4u/APQkAk71COc2tDr0xy3KIFtxM8pnJc5eNPknNslManCyxDhIK6v7vIB7VyCZ1eMgwZbSUHqm+2PrpHSpv5mi6bBewqeVFtULh6P0xPXUhYMh14FA+m6km7wstJwYtBkozkIe0=", "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)(136003)(39830400003)(366004)(346002)(376002)(396003)(1800799009)(186009)(451199024)(26005)(8936002)(2616005)(1076003)(8676002)(4326008)(107886003)(83380400001)(2906002)(30864003)(36756003)(44832011)(86362001)(52116002)(6506007)(6486002)(478600001)(5660300002)(6666004)(6916009)(316002)(6512007)(38100700002)(66946007)(66476007)(41300700001)(66556008)(38350700002)(559001)(579004);\n DIR:OUT; SFP:1102;", "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1", "X-MS-Exchange-AntiSpam-MessageData-0": "\n D2+eWhzlM/bVRnyo7/SncVR6iCVFc8QT7LwnyI5XbT5qFHpQaiNV2MG/BRhNqeEG6mJRUSudbYoBTp9TdUbmfSG3/1hGq0mIUJA0WBRMDhI4srJysitKagFVDf6iytwqR1OtJB6EpEVTcgk9Sx4ANVXrMieFzBFzqXFaT3dVP7rwhkt514YY2YghQ66ycE5TwgtadbgxhS2nNbPgkxa+h5p1BXIKVXDu+QT2JzopHbrMvPvi6Tbx2V9/mk2jhWnaqwhvX8bcCG4srJy77hRJgENqOmP7ucvOivkYkr3XSAlTt5NfVNs2cs9wX4JIqN9eGsF7VlO8Cdownk+B8XuZJY++GGaccph/Ust/ZwJvLG2V62eKr0FINXD5TgtE5XcNM/IO+IWSeVK3c8Hu6nQHqxHSQuk1YTRZwH1T6kvxKJK5HB7SGv6vYrjiy6LX4ErIx781pV/DT3Daiq745FByMYsHw1H05Jv5kKQy+uNI6PQVmwrNSeUJxiXkmVhXcXypmYnh0udPv/pWlGmzcTStwyskW7lb4lXXmYyaueRAKuc5Uie0gZkttpRkX5vfvQ8+MRy9xotwTHeaHzyJvvPBGJ3cf92g3Ho8mTLUCHUtPV2PBcWh29lum0aHHkwO9oUVr3iyLFHczdekku81AVx0XEBfoah6K+cLsTb2V9u+Tg2FqIjw+jqm9Ql9eTxGxlsB3UK/090HpYb+rSTzVUABLUVWAgn2cBIJO9kRVt1xHCVRerlPxyJQHEa3xKv9EmIlCjGlQpOBaknoe9cgaUIHuJ15tgEoissalXVMJWGHaYRk0SD7F6bIAonmyrrRMpljmJRYiqZv3KEn+rq1yhNP5rCl61T5e2//syZfLgst/S+JKw8qvHYIhb4mCnmUndow2ZTp1f3+FstP5y+UYdwnm9X0t104xS9+TUdY+LjZFu44e5vVqqmZKBSPKfqQVoLwkD2jqkr1/MHyJl1FeGehXf9yQsrAggfNVBmnMwkru3/j8V90J3C7B4+4YzM6tqB8CsZ/4MPqObNwuMi4OcmmyuOhCl/XkZ5HTMA58o3lGxPchboHjdIXHirb3FiRMWhZhQv5hwuZ/zPVaIAwT1oGv/lJ7n25TeLxBvdgY+pTLgEbx2Pv06MwT44rgOakJn963br4OOm5fOGxYrU+7/alKS5aiZ0Hubb0c5FG40pu6rF29KlxplHL9CvnWyQM79RDUVkXRjpjEiN3G2EzG99mS/JT9Co09IDlbJ3FyzLFFKqDg9wfF7/7aUHSWhjkz4uMuu+zM+cJu3hbB+8VZzFj3ETziUs3MDNiQamb2gYV+pAM68E6Hru1kC5OxKiZvPv69sWHH3ytcpJXgqyRk7jctmf3N2WRmgg9aBBFCQtKnEV7ZlIbmInr7t9FTrOsA3UHtBTeR67w8Meyabwfn7WOeQamukak+mCISIHGfpI66tIcFq6Sxyic8P/96CqPlV7CP39ABZNvQBEsGGEsfqDW1i8mTwGfK1PWbOtxChb7LGGGfgk1dbZGKm1j0CVT8c/2l0wO4tmDB8OClVlOSQylRpp6fD+YEWGMHz2mBztei5Qw+DqWKV+CV3KSNZhtt6JF2Ds2tAOP9xGf7e/Th2P92A==", "X-OriginatorOrg": "corigine.com", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 203b18e7-2c98-466b-d8f0-08dbb8f69019", "X-MS-Exchange-CrossTenant-AuthSource": "SJ0PR13MB5545.namprd13.prod.outlook.com", "X-MS-Exchange-CrossTenant-AuthAs": "Internal", "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "19 Sep 2023 09:55:32.9032 (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 lmynfjrAxUvpLYT+4Dn+uwkn1K+qC21d6qL7iTI12UFoT1yz720y9GXevAH5ursLXwTCWY141L+bW+nHDSGdPZUAb2D8oSVwk4LMFVUHC00=", "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": "Follow the DPDK coding style, use the kdoc comment style.\nAlso move the comment of the functions to the implement file and\nadd some comment to help understand logic.\n\nSigned-off-by: Chaoyong He <chaoyong.he@corigine.com>\n---\n drivers/net/nfp/nfpcore/nfp_cpp.h | 504 ++++-----------------\n drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 39 +-\n drivers/net/nfp/nfpcore/nfp_cppcore.c | 484 ++++++++++++++++----\n drivers/net/nfp/nfpcore/nfp_hwinfo.c | 21 +-\n drivers/net/nfp/nfpcore/nfp_hwinfo.h | 2 +\n drivers/net/nfp/nfpcore/nfp_mip.c | 43 +-\n drivers/net/nfp/nfpcore/nfp_mutex.c | 69 +--\n drivers/net/nfp/nfpcore/nfp_nffw.c | 49 +-\n drivers/net/nfp/nfpcore/nfp_nffw.h | 6 +-\n drivers/net/nfp/nfpcore/nfp_nsp.c | 53 ++-\n drivers/net/nfp/nfpcore/nfp_nsp.h | 108 ++---\n drivers/net/nfp/nfpcore/nfp_nsp_eth.c | 170 ++++---\n drivers/net/nfp/nfpcore/nfp_resource.c | 103 +++--\n drivers/net/nfp/nfpcore/nfp_resource.h | 28 +-\n drivers/net/nfp/nfpcore/nfp_rtsym.c | 59 ++-\n drivers/net/nfp/nfpcore/nfp_rtsym.h | 12 +-\n drivers/net/nfp/nfpcore/nfp_target.c | 2 +-\n 17 files changed, 888 insertions(+), 864 deletions(-)", "diff": "diff --git a/drivers/net/nfp/nfpcore/nfp_cpp.h b/drivers/net/nfp/nfpcore/nfp_cpp.h\nindex 139752f85a..82189e9910 100644\n--- a/drivers/net/nfp/nfpcore/nfp_cpp.h\n+++ b/drivers/net/nfp/nfpcore/nfp_cpp.h\n@@ -10,9 +10,7 @@\n \n struct nfp_cpp_mutex;\n \n-/*\n- * NFP CPP handle\n- */\n+/* NFP CPP handle */\n struct nfp_cpp {\n \tuint32_t model;\n \tuint32_t interface;\n@@ -37,9 +35,7 @@ struct nfp_cpp {\n \tint driver_lock_needed;\n };\n \n-/*\n- * NFP CPP device area handle\n- */\n+/* NFP CPP device area handle */\n struct nfp_cpp_area {\n \tstruct nfp_cpp *cpp;\n \tchar *name;\n@@ -127,35 +123,45 @@ struct nfp_cpp_operations {\n \n #define NFP_CPP_TARGET_ID_MASK 0x1f\n \n-/*\n+/**\n * Pack target, token, and action into a CPP ID.\n *\n * Create a 32-bit CPP identifier representing the access to be made.\n * These identifiers are used as parameters to other NFP CPP functions.\n * Some CPP devices may allow wildcard identifiers to be specified.\n *\n- * @target NFP CPP target id\n- * @action NFP CPP action id\n- * @token NFP CPP token id\n+ * @param target\n+ * NFP CPP target id\n+ * @param action\n+ * NFP CPP action id\n+ * @param token\n+ * NFP CPP token id\n *\n- * @return NFP CPP ID\n+ * @return\n+ * NFP CPP ID\n */\n #define NFP_CPP_ID(target, action, token) \\\n \t\t((((target) & 0x7f) << 24) | (((token) & 0xff) << 16) | \\\n \t\t(((action) & 0xff) << 8))\n \n-/*\n+/**\n * Pack target, token, action, and island into a CPP ID.\n- * @target NFP CPP target id\n- * @action NFP CPP action id\n- * @token NFP CPP token id\n- * @island NFP CPP island id\n *\n * Create a 32-bit CPP identifier representing the access to be made.\n * These identifiers are used as parameters to other NFP CPP functions.\n * Some CPP devices may allow wildcard identifiers to be specified.\n *\n- * @return NFP CPP ID\n+ * @param target\n+ * NFP CPP target id\n+ * @param action\n+ * NFP CPP action id\n+ * @param token\n+ * NFP CPP token id\n+ * @param island\n+ * NFP CPP island id\n+ *\n+ * @return\n+ * NFP CPP ID\n */\n #define NFP_CPP_ISLAND_ID(target, action, token, island) \\\n \t\t((((target) & 0x7f) << 24) | (((token) & 0xff) << 16) | \\\n@@ -163,9 +169,12 @@ struct nfp_cpp_operations {\n \n /**\n * Return the NFP CPP target of a NFP CPP ID\n- * @id NFP CPP ID\n *\n- * @return NFP CPP target\n+ * @param id\n+ * NFP CPP ID\n+ *\n+ * @return\n+ * NFP CPP target\n */\n static inline uint8_t\n NFP_CPP_ID_TARGET_of(uint32_t id)\n@@ -173,11 +182,14 @@ NFP_CPP_ID_TARGET_of(uint32_t id)\n \treturn (id >> 24) & NFP_CPP_TARGET_ID_MASK;\n }\n \n-/*\n+/**\n * Return the NFP CPP token of a NFP CPP ID\n- * @id NFP CPP ID\n *\n- * @return NFP CPP token\n+ * @param id\n+ * NFP CPP ID\n+ *\n+ * @return\n+ * NFP CPP token\n */\n static inline uint8_t\n NFP_CPP_ID_TOKEN_of(uint32_t id)\n@@ -185,11 +197,14 @@ NFP_CPP_ID_TOKEN_of(uint32_t id)\n \treturn (id >> 16) & 0xff;\n }\n \n-/*\n+/**\n * Return the NFP CPP action of a NFP CPP ID\n- * @id NFP CPP ID\n *\n- * @return NFP CPP action\n+ * @param id\n+ * NFP CPP ID\n+ *\n+ * @return\n+ * NFP CPP action\n */\n static inline uint8_t\n NFP_CPP_ID_ACTION_of(uint32_t id)\n@@ -197,11 +212,14 @@ NFP_CPP_ID_ACTION_of(uint32_t id)\n \treturn (id >> 8) & 0xff;\n }\n \n-/*\n+/**\n * Return the NFP CPP island of a NFP CPP ID\n- * @id NFP CPP ID\n *\n- * @return NFP CPP island\n+ * @param id\n+ * NFP CPP ID\n+ *\n+ * @return\n+ * NFP CPP island\n */\n static inline uint8_t\n NFP_CPP_ID_ISLAND_of(uint32_t id)\n@@ -215,109 +233,57 @@ NFP_CPP_ID_ISLAND_of(uint32_t id)\n */\n const struct nfp_cpp_operations *nfp_cpp_transport_operations(void);\n \n-/*\n- * Set the model id\n- *\n- * @param cpp NFP CPP operations structure\n- * @param model Model ID\n- */\n void nfp_cpp_model_set(struct nfp_cpp *cpp, uint32_t model);\n \n-/*\n- * Set the private instance owned data of a nfp_cpp struct\n- *\n- * @param cpp NFP CPP operations structure\n- * @param interface Interface ID\n- */\n void nfp_cpp_interface_set(struct nfp_cpp *cpp, uint32_t interface);\n \n-/*\n- * Set the private instance owned data of a nfp_cpp struct\n- *\n- * @param cpp NFP CPP operations structure\n- * @param serial NFP serial byte array\n- * @param len Length of the serial byte array\n- */\n int nfp_cpp_serial_set(struct nfp_cpp *cpp, const uint8_t *serial,\n \t\tsize_t serial_len);\n \n-/*\n- * Set the private data of the nfp_cpp instance\n- *\n- * @param cpp NFP CPP operations structure\n- * @return Opaque device pointer\n- */\n void nfp_cpp_priv_set(struct nfp_cpp *cpp, void *priv);\n \n-/*\n- * Return the private data of the nfp_cpp instance\n- *\n- * @param cpp NFP CPP operations structure\n- * @return Opaque device pointer\n- */\n void *nfp_cpp_priv(struct nfp_cpp *cpp);\n \n-/*\n- * Get the privately allocated portion of a NFP CPP area handle\n- *\n- * @param cpp_area NFP CPP area handle\n- * @return Pointer to the private area, or NULL on failure\n- */\n void *nfp_cpp_area_priv(struct nfp_cpp_area *cpp_area);\n \n uint32_t __nfp_cpp_model_autodetect(struct nfp_cpp *cpp, uint32_t *model);\n \n-/*\n- * NFP CPP core interface for CPP clients.\n- */\n-\n-/*\n- * Open a NFP CPP handle to a CPP device\n- *\n- * @param[in]\tid\t0-based ID for the CPP interface to use\n- *\n- * @return NFP CPP handle, or NULL on failure.\n- */\n+/* NFP CPP core interface for CPP clients */\n struct nfp_cpp *nfp_cpp_from_device_name(struct rte_pci_device *dev,\n \t\tint driver_lock_needed);\n \n-/*\n- * Free a NFP CPP handle\n- *\n- * @param[in]\tcpp\tNFP CPP handle\n- */\n void nfp_cpp_free(struct nfp_cpp *cpp);\n \n #define NFP_CPP_MODEL_INVALID 0xffffffff\n \n-/*\n- * NFP_CPP_MODEL_CHIP_of - retrieve the chip ID from the model ID\n+/**\n+ * Retrieve the chip ID from the model ID\n *\n * The chip ID is a 16-bit BCD+A-F encoding for the chip type.\n *\n- * @param[in] model NFP CPP model id\n- * @return NFP CPP chip id\n+ * @param model\n+ * NFP CPP model id\n+ *\n+ * @return\n+ * NFP CPP chip id\n */\n #define NFP_CPP_MODEL_CHIP_of(model) (((model) >> 16) & 0xffff)\n \n-/*\n- * NFP_CPP_MODEL_IS_6000 - Check for the NFP6000 family of devices\n+/**\n+ * Check for the NFP6000 family of devices\n *\n * NOTE: The NFP4000 series is considered as a NFP6000 series variant.\n *\n- * @param[in]\tmodel\tNFP CPP model id\n- * @return\t\ttrue if model is in the NFP6000 family, false otherwise.\n+ * @param model\n+ * NFP CPP model id\n+ *\n+ * @return\n+ * true if model is in the NFP6000 family, false otherwise.\n */\n #define NFP_CPP_MODEL_IS_6000(model)\t\t \\\n \t\t((NFP_CPP_MODEL_CHIP_of(model) >= 0x3800) && \\\n \t\t(NFP_CPP_MODEL_CHIP_of(model) < 0x7000))\n \n-/*\n- * nfp_cpp_model - Retrieve the Model ID of the NFP\n- *\n- * @param[in]\tcpp\tNFP CPP handle\n- * @return\t\tNFP CPP Model ID\n- */\n uint32_t nfp_cpp_model(struct nfp_cpp *cpp);\n \n /*\n@@ -330,7 +296,7 @@ uint32_t nfp_cpp_model(struct nfp_cpp *cpp);\n #define NFP_CPP_INTERFACE_TYPE_RPC\t\t0x3\n #define NFP_CPP_INTERFACE_TYPE_ILA\t\t0x4\n \n-/*\n+/**\n * Construct a 16-bit NFP Interface ID\n *\n * Interface IDs consists of 4 bits of interface type, 4 bits of unit\n@@ -340,422 +306,138 @@ uint32_t nfp_cpp_model(struct nfp_cpp *cpp);\n * which use the MU Atomic CompareAndWrite operation - hence the limit to 16\n * bits to be able to use the NFP Interface ID as a lock owner.\n *\n- * @param[in]\ttype\tNFP Interface Type\n- * @param[in]\tunit\tUnit identifier for the interface type\n- * @param[in]\tchannel\tChannel identifier for the interface unit\n- * @return\t\tInterface ID\n+ * @param type\n+ * NFP Interface Type\n+ * @param unit\n+ * Unit identifier for the interface type\n+ * @param channel\n+ * Channel identifier for the interface unit\n+ *\n+ * @return\n+ * Interface ID\n */\n #define NFP_CPP_INTERFACE(type, unit, channel)\t\\\n \t((((type) & 0xf) << 12) | \\\n \t (((unit) & 0xf) << 8) | \\\n \t (((channel) & 0xff) << 0))\n \n-/*\n+/**\n * Get the interface type of a NFP Interface ID\n- * @param[in]\tinterface\tNFP Interface ID\n- * @return\t\t\tNFP Interface ID's type\n+ *\n+ * @param interface\n+ * NFP Interface ID\n+ *\n+ * @return\n+ * NFP Interface ID's type\n */\n #define NFP_CPP_INTERFACE_TYPE_of(interface)\t(((interface) >> 12) & 0xf)\n \n-/*\n+/**\n * Get the interface unit of a NFP Interface ID\n- * @param[in]\tinterface\tNFP Interface ID\n- * @return\t\t\tNFP Interface ID's unit\n+ *\n+ * @param interface\n+ * NFP Interface ID\n+ *\n+ * @return\n+ * NFP Interface ID's unit\n */\n #define NFP_CPP_INTERFACE_UNIT_of(interface)\t(((interface) >> 8) & 0xf)\n \n-/*\n+/**\n * Get the interface channel of a NFP Interface ID\n- * @param[in]\tinterface\tNFP Interface ID\n- * @return\t\t\tNFP Interface ID's channel\n+ *\n+ * @param interface\n+ * NFP Interface ID\n+ *\n+ * @return\n+ * NFP Interface ID's channel\n */\n #define NFP_CPP_INTERFACE_CHANNEL_of(interface)\t(((interface) >> 0) & 0xff)\n \n-/*\n- * Retrieve the Interface ID of the NFP\n- * @param[in]\tcpp\tNFP CPP handle\n- * @return\t\tNFP CPP Interface ID\n- */\n+\n uint16_t nfp_cpp_interface(struct nfp_cpp *cpp);\n \n-/*\n- * Retrieve the NFP Serial Number (unique per NFP)\n- * @param[in]\tcpp\tNFP CPP handle\n- * @param[out]\tserial\tPointer to reference the serial number array\n- *\n- * @return\tsize of the NFP6000 serial number, in bytes\n- */\n int nfp_cpp_serial(struct nfp_cpp *cpp, const uint8_t **serial);\n \n-/*\n- * Allocate a NFP CPP area handle, as an offset into a CPP ID\n- * @param[in]\tcpp\tNFP CPP handle\n- * @param[in]\tcpp_id\tNFP CPP ID\n- * @param[in]\taddress\tOffset into the NFP CPP ID address space\n- * @param[in]\tsize\tSize of the area to reserve\n- *\n- * @return NFP CPP handle, or NULL on failure.\n- */\n struct nfp_cpp_area *nfp_cpp_area_alloc(struct nfp_cpp *cpp, uint32_t cpp_id,\n \t\tuint64_t address, size_t size);\n \n-/*\n- * Allocate a NFP CPP area handle, as an offset into a CPP ID, by a named owner\n- * @param[in]\tcpp\tNFP CPP handle\n- * @param[in]\tcpp_id\tNFP CPP ID\n- * @param[in]\tname\tName of owner of the area\n- * @param[in]\taddress\tOffset into the NFP CPP ID address space\n- * @param[in]\tsize\tSize of the area to reserve\n- *\n- * @return NFP CPP handle, or NULL on failure.\n- */\n struct nfp_cpp_area *nfp_cpp_area_alloc_with_name(struct nfp_cpp *cpp,\n \t\tuint32_t cpp_id, const char *name, uint64_t address,\n \t\tuint32_t size);\n \n-/*\n- * Free an allocated NFP CPP area handle\n- * @param[in]\tarea\tNFP CPP area handle\n- */\n void nfp_cpp_area_free(struct nfp_cpp_area *area);\n \n-/*\n- * Acquire the resources needed to access the NFP CPP area handle\n- *\n- * @param[in]\tarea\tNFP CPP area handle\n- *\n- * @return 0 on success, -1 on failure.\n- */\n int nfp_cpp_area_acquire(struct nfp_cpp_area *area);\n \n-/*\n- * Release the resources needed to access the NFP CPP area handle\n- *\n- * @param[in]\tarea\tNFP CPP area handle\n- */\n void nfp_cpp_area_release(struct nfp_cpp_area *area);\n \n-/*\n- * Allocate, then acquire the resources needed to access the NFP CPP area handle\n- * @param[in]\tcpp\tNFP CPP handle\n- * @param[in]\tcpp_id\tNFP CPP ID\n- * @param[in]\taddress\tOffset into the NFP CPP ID address space\n- * @param[in]\tsize\tSize of the area to reserve\n- *\n- * @return NFP CPP handle, or NULL on failure.\n- */\n struct nfp_cpp_area *nfp_cpp_area_alloc_acquire(struct nfp_cpp *cpp,\n \t\tuint32_t cpp_id, uint64_t address, size_t size);\n \n-/*\n- * Release the resources, then free the NFP CPP area handle\n- * @param[in]\tarea\tNFP CPP area handle\n- */\n void nfp_cpp_area_release_free(struct nfp_cpp_area *area);\n \n uint8_t *nfp_cpp_map_area(struct nfp_cpp *cpp, uint32_t cpp_id,\n \t\tuint64_t addr, uint32_t size, struct nfp_cpp_area **area);\n \n-/*\n- * Read from a NFP CPP area handle into a buffer. The area must be acquired with\n- * 'nfp_cpp_area_acquire()' before calling this operation.\n- *\n- * @param[in]\tarea\tNFP CPP area handle\n- * @param[in]\toffset\tOffset into the area\n- * @param[in]\tbuffer\tLocation of buffer to receive the data\n- * @param[in]\tlength\tLength of the data to read\n- *\n- * @return bytes read on success, negative value on failure.\n- *\n- */\n int nfp_cpp_area_read(struct nfp_cpp_area *area, uint32_t offset,\n \t\tvoid *buffer, size_t length);\n \n-/*\n- * Write to a NFP CPP area handle from a buffer. The area must be acquired with\n- * 'nfp_cpp_area_acquire()' before calling this operation.\n- *\n- * @param[in]\tarea\tNFP CPP area handle\n- * @param[in]\toffset\tOffset into the area\n- * @param[in]\tbuffer\tLocation of buffer that holds the data\n- * @param[in]\tlength\tLength of the data to read\n- *\n- * @return bytes written on success, negative value on failure.\n- */\n int nfp_cpp_area_write(struct nfp_cpp_area *area, uint32_t offset,\n \t\tconst void *buffer, size_t length);\n \n-/*\n- * nfp_cpp_area_iomem() - get IOMEM region for CPP area\n- * @area: CPP area handle\n- *\n- * Returns an iomem pointer for use with readl()/writel() style operations.\n- *\n- * NOTE: Area must have been locked down with an 'acquire'.\n- *\n- * Return: pointer to the area, or NULL\n- */\n void *nfp_cpp_area_iomem(struct nfp_cpp_area *area);\n \n-/*\n- * Get the NFP CPP handle that is the parent of a NFP CPP area handle\n- *\n- * @param\tcpp_area\tNFP CPP area handle\n- * @return\t\t\tNFP CPP handle\n- */\n struct nfp_cpp *nfp_cpp_area_cpp(struct nfp_cpp_area *cpp_area);\n \n-/*\n- * Get the name passed during allocation of the NFP CPP area handle\n- *\n- * @param\tcpp_area\tNFP CPP area handle\n- * @return\t\t\tPointer to the area's name\n- */\n const char *nfp_cpp_area_name(struct nfp_cpp_area *cpp_area);\n \n-/*\n- * Read a block of data from a NFP CPP ID\n- *\n- * @param[in]\tcpp\tNFP CPP handle\n- * @param[in]\tcpp_id\tNFP CPP ID\n- * @param[in]\taddress\tOffset into the NFP CPP ID address space\n- * @param[in]\tkernel_vaddr\tBuffer to copy read data to\n- * @param[in]\tlength\tSize of the area to reserve\n- *\n- * @return bytes read on success, -1 on failure.\n- */\n int nfp_cpp_read(struct nfp_cpp *cpp, uint32_t cpp_id,\n \t\tuint64_t address, void *kernel_vaddr, size_t length);\n \n-/*\n- * Write a block of data to a NFP CPP ID\n- *\n- * @param[in]\tcpp\tNFP CPP handle\n- * @param[in]\tcpp_id\tNFP CPP ID\n- * @param[in]\taddress\tOffset into the NFP CPP ID address space\n- * @param[in]\tkernel_vaddr\tBuffer to copy write data from\n- * @param[in]\tlength\tSize of the area to reserve\n- *\n- * @return bytes written on success, -1 on failure.\n- */\n int nfp_cpp_write(struct nfp_cpp *cpp, uint32_t cpp_id,\n \t\tuint64_t address, const void *kernel_vaddr, size_t length);\n \n-/*\n- * Read a single 32-bit value from a NFP CPP area handle\n- *\n- * @param area\t\tNFP CPP area handle\n- * @param offset\toffset into NFP CPP area handle\n- * @param value\t\toutput value\n- *\n- * The area must be acquired with 'nfp_cpp_area_acquire()' before calling this\n- * operation.\n- *\n- * NOTE: offset must be 32-bit aligned.\n- *\n- * @return 0 on success, or -1 on error.\n- */\n int nfp_cpp_area_readl(struct nfp_cpp_area *area, uint32_t offset,\n \t\tuint32_t *value);\n \n-/*\n- * Write a single 32-bit value to a NFP CPP area handle\n- *\n- * @param area\t\tNFP CPP area handle\n- * @param offset\toffset into NFP CPP area handle\n- * @param value\t\tvalue to write\n- *\n- * The area must be acquired with 'nfp_cpp_area_acquire()' before calling this\n- * operation.\n- *\n- * NOTE: offset must be 32-bit aligned.\n- *\n- * @return 0 on success, or -1 on error.\n- */\n int nfp_cpp_area_writel(struct nfp_cpp_area *area, uint32_t offset,\n \t\tuint32_t value);\n \n-/*\n- * Read a single 64-bit value from a NFP CPP area handle\n- *\n- * @param area\t\tNFP CPP area handle\n- * @param offset\toffset into NFP CPP area handle\n- * @param value\t\toutput value\n- *\n- * The area must be acquired with 'nfp_cpp_area_acquire()' before calling this\n- * operation.\n- *\n- * NOTE: offset must be 64-bit aligned.\n- *\n- * @return 0 on success, or -1 on error.\n- */\n int nfp_cpp_area_readq(struct nfp_cpp_area *area, uint32_t offset,\n \t\tuint64_t *value);\n \n-/*\n- * Write a single 64-bit value to a NFP CPP area handle\n- *\n- * @param area\t\tNFP CPP area handle\n- * @param offset\toffset into NFP CPP area handle\n- * @param value\t\tvalue to write\n- *\n- * The area must be acquired with 'nfp_cpp_area_acquire()' before calling this\n- * operation.\n- *\n- * NOTE: offset must be 64-bit aligned.\n- *\n- * @return 0 on success, or -1 on error.\n- */\n int nfp_cpp_area_writeq(struct nfp_cpp_area *area, uint32_t offset,\n \t\tuint64_t value);\n \n-/*\n- * Write a single 32-bit value on the XPB bus\n- *\n- * @param cpp NFP CPP device handle\n- * @param xpb_tgt\tXPB target and address\n- * @param value value to write\n- *\n- * @return 0 on success, or -1 on failure.\n- */\n int nfp_xpb_writel(struct nfp_cpp *cpp, uint32_t xpb_tgt, uint32_t value);\n \n-/*\n- * Read a single 32-bit value from the XPB bus\n- *\n- * @param cpp NFP CPP device handle\n- * @param xpb_tgt\tXPB target and address\n- * @param value output value\n- *\n- * @return 0 on success, or -1 on failure.\n- */\n int nfp_xpb_readl(struct nfp_cpp *cpp, uint32_t xpb_tgt, uint32_t *value);\n \n-/*\n- * Read a 32-bit word from a NFP CPP ID\n- *\n- * @param cpp NFP CPP handle\n- * @param cpp_id NFP CPP ID\n- * @param address offset into the NFP CPP ID address space\n- * @param value output value\n- *\n- * @return 0 on success, or -1 on failure.\n- */\n int nfp_cpp_readl(struct nfp_cpp *cpp, uint32_t cpp_id,\n \t\tuint64_t address, uint32_t *value);\n \n-/*\n- * Write a 32-bit value to a NFP CPP ID\n- *\n- * @param cpp NFP CPP handle\n- * @param cpp_id NFP CPP ID\n- * @param address offset into the NFP CPP ID address space\n- * @param value value to write\n- *\n- * @return 0 on success, or -1 on failure.\n- *\n- */\n int nfp_cpp_writel(struct nfp_cpp *cpp, uint32_t cpp_id,\n \t\tuint64_t address, uint32_t value);\n \n-/*\n- * Read a 64-bit work from a NFP CPP ID\n- *\n- * @param cpp NFP CPP handle\n- * @param cpp_id NFP CPP ID\n- * @param address offset into the NFP CPP ID address space\n- * @param value output value\n- *\n- * @return 0 on success, or -1 on failure.\n- */\n int nfp_cpp_readq(struct nfp_cpp *cpp, uint32_t cpp_id,\n \t\tuint64_t address, uint64_t *value);\n \n-/*\n- * Write a 64-bit value to a NFP CPP ID\n- *\n- * @param cpp NFP CPP handle\n- * @param cpp_id NFP CPP ID\n- * @param address offset into the NFP CPP ID address space\n- * @param value value to write\n- *\n- * @return 0 on success, or -1 on failure.\n- */\n int nfp_cpp_writeq(struct nfp_cpp *cpp, uint32_t cpp_id,\n \t\tuint64_t address, uint64_t value);\n \n-/*\n- * Initialize a mutex location\n-\n- * The CPP target:address must point to a 64-bit aligned location, and will\n- * initialize 64 bits of data at the location.\n- *\n- * This creates the initial mutex state, as locked by this nfp_cpp_interface().\n- *\n- * This function should only be called when setting up the initial lock state\n- * upon boot-up of the system.\n- *\n- * @param cpp\t\tNFP CPP handle\n- * @param target\tNFP CPP target ID\n- * @param address\tOffset into the address space of the NFP CPP target ID\n- * @param key_id\tUnique 32-bit value for this mutex\n- *\n- * @return 0 on success, negative value on failure.\n- */\n int nfp_cpp_mutex_init(struct nfp_cpp *cpp, int target,\n \t\tuint64_t address, uint32_t key_id);\n \n-/*\n- * Create a mutex handle from an address controlled by a MU Atomic engine\n- *\n- * The CPP target:address must point to a 64-bit aligned location, and reserve\n- * 64 bits of data at the location for use by the handle.\n- *\n- * Only target/address pairs that point to entities that support the MU Atomic\n- * Engine's CmpAndSwap32 command are supported.\n- *\n- * @param cpp\t\tNFP CPP handle\n- * @param target\tNFP CPP target ID\n- * @param address\tOffset into the address space of the NFP CPP target ID\n- * @param key_id\t32-bit unique key (must match the key at this location)\n- *\n- * @return\t\tA non-NULL struct nfp_cpp_mutex * on success, NULL on\n- * failure.\n- */\n struct nfp_cpp_mutex *nfp_cpp_mutex_alloc(struct nfp_cpp *cpp, int target,\n \t\tuint64_t address, uint32_t key_id);\n \n-/*\n- * Free a mutex handle - does not alter the lock state\n- *\n- * @param mutex\t\tNFP CPP Mutex handle\n- */\n void nfp_cpp_mutex_free(struct nfp_cpp_mutex *mutex);\n \n-/*\n- * Lock a mutex handle, using the NFP MU Atomic Engine\n- *\n- * @param mutex\t\tNFP CPP Mutex handle\n- *\n- * @return 0 on success, negative value on failure.\n- */\n int nfp_cpp_mutex_lock(struct nfp_cpp_mutex *mutex);\n \n-/*\n- * Unlock a mutex handle, using the NFP MU Atomic Engine\n- *\n- * @param mutex\t\tNFP CPP Mutex handle\n- *\n- * @return 0 on success, negative value on failure.\n- */\n int nfp_cpp_mutex_unlock(struct nfp_cpp_mutex *mutex);\n \n-/*\n- * Attempt to lock a mutex handle, using the NFP MU Atomic Engine\n- *\n- * @param mutex\t\tNFP CPP Mutex handle\n- * @return\t\t0 if the lock succeeded, negative value on failure.\n- */\n int nfp_cpp_mutex_trylock(struct nfp_cpp_mutex *mutex);\n \n uint32_t nfp_cpp_mu_locality_lsb(struct nfp_cpp *cpp);\ndiff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c\nindex bdf4a658f5..7e94bfb611 100644\n--- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c\n+++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c\n@@ -58,7 +58,7 @@\n * Minimal size of the PCIe cfg memory we depend on being mapped,\n * queue controller and DMA controller don't have to be covered.\n */\n-#define NFP_PCI_MIN_MAP_SIZE\t\t\t\t0x080000\n+#define NFP_PCI_MIN_MAP_SIZE\t\t\t\t0x080000 /* 512K */\n \n #define NFP_PCIE_P2C_FIXED_SIZE(bar) (1 << (bar)->bitsize)\n #define NFP_PCIE_P2C_BULK_SIZE(bar) (1 << (bar)->bitsize)\n@@ -72,40 +72,25 @@\n #define NFP_PCIE_CPP_BAR_PCIETOCPPEXPBAR(bar, slot) \\\n \t(((bar) * 8 + (slot)) * 4)\n \n-/*\n- * Define to enable a bit more verbose debug output.\n- * Set to 1 to enable a bit more verbose debug output.\n- */\n struct nfp_pcie_user;\n struct nfp6000_area_priv;\n \n-/*\n- * struct nfp_bar - describes BAR configuration and usage\n- * @nfp:\tbacklink to owner\n- * @barcfg:\tcached contents of BAR config CSR\n- * @base:\tthe BAR's base CPP offset\n- * @mask: mask for the BAR aperture (read only)\n- * @bitsize:\tbitsize of BAR aperture (read only)\n- * @index:\tindex of the BAR\n- * @lock:\tlock to specify if bar is in use\n- * @refcnt:\tnumber of current users\n- * @iomem:\tmapped IO memory\n- */\n+/* Describes BAR configuration and usage */\n #define NFP_BAR_MIN 1\n #define NFP_BAR_MID 5\n #define NFP_BAR_MAX 7\n \n struct nfp_bar {\n-\tstruct nfp_pcie_user *nfp;\n-\tuint32_t barcfg;\n-\tuint64_t base;\t\t/* CPP address base */\n-\tuint64_t mask;\t\t/* Bit mask of the bar */\n-\tuint32_t bitsize;\t/* Bit size of the bar */\n-\tuint32_t index;\n-\tint lock;\n+\tstruct nfp_pcie_user *nfp; /**< Backlink to owner */\n+\tuint32_t barcfg; /**< BAR config CSR */\n+\tuint64_t base; /**< Base CPP offset */\n+\tuint64_t mask; /**< Mask of the BAR aperture (read only) */\n+\tuint32_t bitsize; /**< Bit size of the BAR aperture (read only) */\n+\tuint32_t index; /**< Index of the BAR */\n+\tint lock; /**< If the BAR has been locked */\n \n \tchar *csr;\n-\tchar *iomem;\n+\tchar *iomem; /**< mapped IO memory */\n };\n \n #define BUSDEV_SZ\t13\n@@ -360,9 +345,7 @@ nfp_disable_bars(struct nfp_pcie_user *nfp)\n \t}\n }\n \n-/*\n- * Generic CPP bus access interface.\n- */\n+/* Generic CPP bus access interface. */\n \n struct nfp6000_area_priv {\n \tstruct nfp_bar *bar;\ndiff --git a/drivers/net/nfp/nfpcore/nfp_cppcore.c b/drivers/net/nfp/nfpcore/nfp_cppcore.c\nindex e2af888a28..0e8372576e 100644\n--- a/drivers/net/nfp/nfpcore/nfp_cppcore.c\n+++ b/drivers/net/nfp/nfpcore/nfp_cppcore.c\n@@ -26,6 +26,15 @@\n #define NFP_PL_DEVICE_MODEL_MASK (NFP_PL_DEVICE_PART_MASK | \\\n \t\t\t\t\t\tNFP_PL_DEVICE_ID_MASK)\n \n+/**\n+ * Set the private data of the nfp_cpp instance\n+ *\n+ * @param cpp\n+ * NFP CPP operations structure\n+ *\n+ * @return\n+ * Opaque device pointer\n+ */\n void\n nfp_cpp_priv_set(struct nfp_cpp *cpp,\n \t\tvoid *priv)\n@@ -33,12 +42,29 @@ nfp_cpp_priv_set(struct nfp_cpp *cpp,\n \tcpp->priv = priv;\n }\n \n+/**\n+ * Return the private data of the nfp_cpp instance\n+ *\n+ * @param cpp\n+ * NFP CPP operations structure\n+ *\n+ * @return\n+ * Opaque device pointer\n+ */\n void *\n nfp_cpp_priv(struct nfp_cpp *cpp)\n {\n \treturn cpp->priv;\n }\n \n+/**\n+ * Set the model id\n+ *\n+ * @param cpp\n+ * NFP CPP operations structure\n+ * @param model\n+ * Model ID\n+ */\n void\n nfp_cpp_model_set(struct nfp_cpp *cpp,\n \t\tuint32_t model)\n@@ -46,6 +72,15 @@ nfp_cpp_model_set(struct nfp_cpp *cpp,\n \tcpp->model = model;\n }\n \n+/**\n+ * Retrieve the Model ID of the NFP\n+ *\n+ * @param cpp\n+ * NFP CPP handle\n+ *\n+ * @return\n+ * NFP CPP Model ID\n+ */\n uint32_t\n nfp_cpp_model(struct nfp_cpp *cpp)\n {\n@@ -63,6 +98,14 @@ nfp_cpp_model(struct nfp_cpp *cpp)\n \treturn model;\n }\n \n+/**\n+ * Set the private instance owned data of a nfp_cpp struct\n+ *\n+ * @param cpp\n+ * NFP CPP operations structure\n+ * @param interface\n+ * Interface ID\n+ */\n void\n nfp_cpp_interface_set(struct nfp_cpp *cpp,\n \t\tuint32_t interface)\n@@ -70,6 +113,17 @@ nfp_cpp_interface_set(struct nfp_cpp *cpp,\n \tcpp->interface = interface;\n }\n \n+/**\n+ * Retrieve the Serial ID of the NFP\n+ *\n+ * @param cpp\n+ * NFP CPP handle\n+ * @param serial\n+ * Pointer to NFP serial number\n+ *\n+ * @return\n+ * Length of NFP serial number\n+ */\n int\n nfp_cpp_serial(struct nfp_cpp *cpp,\n \t\tconst uint8_t **serial)\n@@ -78,6 +132,16 @@ nfp_cpp_serial(struct nfp_cpp *cpp,\n \treturn cpp->serial_len;\n }\n \n+/**\n+ * Set the private instance owned data of a nfp_cpp struct\n+ *\n+ * @param cpp\n+ * NFP CPP operations structure\n+ * @param serial\n+ * NFP serial byte array\n+ * @param serial_len\n+ * Length of the serial byte array\n+ */\n int\n nfp_cpp_serial_set(struct nfp_cpp *cpp,\n \t\tconst uint8_t *serial,\n@@ -96,6 +160,15 @@ nfp_cpp_serial_set(struct nfp_cpp *cpp,\n \treturn 0;\n }\n \n+/**\n+ * Retrieve the Interface ID of the NFP\n+ *\n+ * @param cpp\n+ * NFP CPP handle\n+ *\n+ * @return\n+ * NFP CPP Interface ID\n+ */\n uint16_t\n nfp_cpp_interface(struct nfp_cpp *cpp)\n {\n@@ -105,18 +178,45 @@ nfp_cpp_interface(struct nfp_cpp *cpp)\n \treturn cpp->interface;\n }\n \n+/**\n+ * Get the privately allocated portion of a NFP CPP area handle\n+ *\n+ * @param cpp_area\n+ * NFP CPP area handle\n+ *\n+ * @return\n+ * Pointer to the private area, or NULL on failure\n+ */\n void *\n nfp_cpp_area_priv(struct nfp_cpp_area *cpp_area)\n {\n \treturn &cpp_area[1];\n }\n \n+/**\n+ * Get the NFP CPP handle that is the pci_dev of a NFP CPP area handle\n+ *\n+ * @param cpp_area\n+ * NFP CPP area handle\n+ *\n+ * @return\n+ * NFP CPP handle\n+ */\n struct nfp_cpp *\n nfp_cpp_area_cpp(struct nfp_cpp_area *cpp_area)\n {\n \treturn cpp_area->cpp;\n }\n \n+/**\n+ * Get the name passed during allocation of the NFP CPP area handle\n+ *\n+ * @param cpp_area\n+ * NFP CPP area handle\n+ *\n+ * @return\n+ * Pointer to the area's name\n+ */\n const char *\n nfp_cpp_area_name(struct nfp_cpp_area *cpp_area)\n {\n@@ -153,15 +253,24 @@ nfp_cpp_mu_locality_lsb(struct nfp_cpp *cpp)\n \treturn cpp->mu_locality_lsb;\n }\n \n-/*\n- * nfp_cpp_area_alloc - allocate a new CPP area\n- * @cpp: CPP handle\n- * @dest: CPP id\n- * @address: start address on CPP target\n- * @size: size of area in bytes\n+/**\n+ * Allocate and initialize a CPP area structure.\n+ * The area must later be locked down with an 'acquire' before\n+ * it can be safely accessed.\n *\n- * Allocate and initialize a CPP area structure. The area must later\n- * be locked down with an 'acquire' before it can be safely accessed.\n+ * @param cpp\n+ * CPP device handle\n+ * @param dest\n+ * CPP id\n+ * @param name\n+ * Name of region\n+ * @param address\n+ * Address of region\n+ * @param size\n+ * Size of region\n+ *\n+ * @return\n+ * NFP CPP area handle, or NULL\n *\n * NOTE: @address and @size must be 32-bit aligned values.\n */\n@@ -211,6 +320,25 @@ nfp_cpp_area_alloc_with_name(struct nfp_cpp *cpp,\n \treturn area;\n }\n \n+/**\n+ * Allocate and initialize a CPP area structure.\n+ * The area must later be locked down with an 'acquire' before\n+ * it can be safely accessed.\n+ *\n+ * @param cpp\n+ * CPP device handle\n+ * @param dest\n+ * CPP id\n+ * @param address\n+ * Address of region\n+ * @param size\n+ * Size of region\n+ *\n+ * @return\n+ * NFP CPP area handle, or NULL\n+ *\n+ * NOTE: @address and @size must be 32-bit aligned values.\n+ */\n struct nfp_cpp_area *\n nfp_cpp_area_alloc(struct nfp_cpp *cpp,\n \t\tuint32_t dest,\n@@ -220,17 +348,22 @@ nfp_cpp_area_alloc(struct nfp_cpp *cpp,\n \treturn nfp_cpp_area_alloc_with_name(cpp, dest, NULL, address, size);\n }\n \n-/*\n- * nfp_cpp_area_alloc_acquire - allocate a new CPP area and lock it down\n- *\n- * @cpp: CPP handle\n- * @dest: CPP id\n- * @address: start address on CPP target\n- * @size: size of area\n- *\n+/**\n * Allocate and initialize a CPP area structure, and lock it down so\n * that it can be accessed directly.\n *\n+ * @param cpp\n+ * CPP device handle\n+ * @param destination\n+ * CPP id\n+ * @param address\n+ * Address of region\n+ * @param size\n+ * Size of region\n+ *\n+ * @return\n+ * NFP CPP area handle, or NULL\n+ *\n * NOTE: @address and @size must be 32-bit aligned values.\n *\n * NOTE: The area must also be 'released' when the structure is freed.\n@@ -258,11 +391,11 @@ nfp_cpp_area_alloc_acquire(struct nfp_cpp *cpp,\n \treturn area;\n }\n \n-/*\n- * nfp_cpp_area_free - free up the CPP area\n- * area: CPP area handle\n- *\n+/**\n * Frees up memory resources held by the CPP area.\n+ *\n+ * @param area\n+ * CPP area handle\n */\n void\n nfp_cpp_area_free(struct nfp_cpp_area *area)\n@@ -272,11 +405,11 @@ nfp_cpp_area_free(struct nfp_cpp_area *area)\n \tfree(area);\n }\n \n-/*\n- * nfp_cpp_area_release_free - release CPP area and free it\n- * area: CPP area handle\n+/**\n+ * Releases CPP area and frees up memory resources held by it.\n *\n- * Releases CPP area and frees up memory resources held by the it.\n+ * @param area\n+ * CPP area handle\n */\n void\n nfp_cpp_area_release_free(struct nfp_cpp_area *area)\n@@ -285,12 +418,15 @@ nfp_cpp_area_release_free(struct nfp_cpp_area *area)\n \tnfp_cpp_area_free(area);\n }\n \n-/*\n- * nfp_cpp_area_acquire - lock down a CPP area for access\n- * @area: CPP area handle\n+/**\n+ * Locks down the CPP area for a potential long term activity.\n+ * Area must always be locked down before being accessed.\n *\n- * Locks down the CPP area for a potential long term activity. Area\n- * must always be locked down before being accessed.\n+ * @param area\n+ * CPP area handle\n+ *\n+ * @return\n+ * 0 on success, -1 on failure.\n */\n int\n nfp_cpp_area_acquire(struct nfp_cpp_area *area)\n@@ -307,11 +443,11 @@ nfp_cpp_area_acquire(struct nfp_cpp_area *area)\n \treturn 0;\n }\n \n-/*\n- * nfp_cpp_area_release - release a locked down CPP area\n- * @area: CPP area handle\n- *\n+/**\n * Releases a previously locked down CPP area.\n+ *\n+ * @param area\n+ * CPP area handle\n */\n void\n nfp_cpp_area_release(struct nfp_cpp_area *area)\n@@ -320,16 +456,16 @@ nfp_cpp_area_release(struct nfp_cpp_area *area)\n \t\tarea->cpp->op->area_release(area);\n }\n \n-/*\n- * nfp_cpp_area_iomem() - get IOMEM region for CPP area\n+/**\n+ * Returns an iomem pointer for use with readl()/writel() style operations.\n *\n- * @area: CPP area handle\n+ * @param area\n+ * CPP area handle\n *\n- * Returns an iomem pointer for use with readl()/writel() style operations.\n+ * @return\n+ * Pointer to the area, or NULL\n *\n * NOTE: Area must have been locked down with an 'acquire'.\n- *\n- * Return: pointer to the area, or NULL\n */\n void *\n nfp_cpp_area_iomem(struct nfp_cpp_area *area)\n@@ -342,18 +478,22 @@ nfp_cpp_area_iomem(struct nfp_cpp_area *area)\n \treturn iomem;\n }\n \n-/*\n- * nfp_cpp_area_read - read data from CPP area\n+/**\n+ * Read data from indicated CPP region.\n *\n- * @area: CPP area handle\n- * @offset: offset into CPP area\n- * @kernel_vaddr: kernel address to put data into\n- * @length: number of bytes to read\n+ * @param area\n+ * CPP area handle\n+ * @param offset\n+ * Offset into CPP area\n+ * @param kernel_vaddr\n+ * Address to put data into\n+ * @param length\n+ * Number of bytes to read\n *\n- * Read data from indicated CPP region.\n+ * @return\n+ * Length of io, or -ERRNO\n *\n * NOTE: @offset and @length must be 32-bit aligned values.\n- *\n * NOTE: Area must have been locked down with an 'acquire'.\n */\n int\n@@ -368,18 +508,22 @@ nfp_cpp_area_read(struct nfp_cpp_area *area,\n \treturn area->cpp->op->area_read(area, kernel_vaddr, offset, length);\n }\n \n-/*\n- * nfp_cpp_area_write - write data to CPP area\n+/**\n+ * Write data to indicated CPP region.\n *\n- * @area: CPP area handle\n- * @offset: offset into CPP area\n- * @kernel_vaddr: kernel address to read data from\n- * @length: number of bytes to write\n+ * @param area\n+ * CPP area handle\n+ * @param offset\n+ * Offset into CPP area\n+ * @param kernel_vaddr\n+ * Address to put data into\n+ * @param length\n+ * Number of bytes to read\n *\n- * Write data to indicated CPP region.\n+ * @return\n+ * Length of io, or -ERRNO\n *\n * NOTE: @offset and @length must be 32-bit aligned values.\n- *\n * NOTE: Area must have been locked down with an 'acquire'.\n */\n int\n@@ -436,6 +580,19 @@ nfp_xpb_to_cpp(struct nfp_cpp *cpp,\n \treturn xpb;\n }\n \n+/**\n+ * Read a uint32_t value from an area\n+ *\n+ * @param area\n+ * CPP Area handle\n+ * @param offset\n+ * Offset into area\n+ * @param value\n+ * Pointer to read buffer\n+ *\n+ * @return\n+ * 0 on success, or -ERRNO\n+ */\n int\n nfp_cpp_area_readl(struct nfp_cpp_area *area,\n \t\tuint32_t offset,\n@@ -450,6 +607,19 @@ nfp_cpp_area_readl(struct nfp_cpp_area *area,\n \treturn (sz == sizeof(*value)) ? 0 : -1;\n }\n \n+/**\n+ * Write a uint32_t vale to an area\n+ *\n+ * @param area\n+ * CPP Area handle\n+ * @param offset\n+ * Offset into area\n+ * @param value\n+ * Value to write\n+ *\n+ * @return\n+ * 0 on success, or -ERRNO\n+ */\n int\n nfp_cpp_area_writel(struct nfp_cpp_area *area,\n \t\tuint32_t offset,\n@@ -462,6 +632,19 @@ nfp_cpp_area_writel(struct nfp_cpp_area *area,\n \treturn (sz == sizeof(value)) ? 0 : -1;\n }\n \n+/**\n+ * Read a uint64_t value from an area\n+ *\n+ * @param area\n+ * CPP Area handle\n+ * @param offset\n+ * Offset into area\n+ * @param value\n+ * Pointer to read buffer\n+ *\n+ * @return\n+ * 0 on success, or -ERRNO\n+ */\n int\n nfp_cpp_area_readq(struct nfp_cpp_area *area,\n \t\tuint32_t offset,\n@@ -476,6 +659,19 @@ nfp_cpp_area_readq(struct nfp_cpp_area *area,\n \treturn (sz == sizeof(*value)) ? 0 : -1;\n }\n \n+/**\n+ * Write a uint64_t vale to an area\n+ *\n+ * @param area\n+ * CPP Area handle\n+ * @param offset\n+ * Offset into area\n+ * @param value\n+ * Value to write\n+ *\n+ * @return\n+ * 0 on success, or -ERRNO\n+ */\n int\n nfp_cpp_area_writeq(struct nfp_cpp_area *area,\n \t\tuint32_t offset,\n@@ -489,6 +685,21 @@ nfp_cpp_area_writeq(struct nfp_cpp_area *area,\n \treturn (sz == sizeof(value)) ? 0 : -1;\n }\n \n+/**\n+ * Read a uint32_t value from a CPP location\n+ *\n+ * @param cpp\n+ * CPP device handle\n+ * @param cpp_id\n+ * CPP ID for operation\n+ * @param address\n+ * Address for operation\n+ * @param value\n+ * Pointer to read buffer\n+ *\n+ * @return\n+ * 0 on success, or -ERRNO\n+ */\n int\n nfp_cpp_readl(struct nfp_cpp *cpp,\n \t\tuint32_t cpp_id,\n@@ -504,6 +715,21 @@ nfp_cpp_readl(struct nfp_cpp *cpp,\n \treturn (sz == sizeof(*value)) ? 0 : -1;\n }\n \n+/**\n+ * Write a uint32_t value to a CPP location\n+ *\n+ * @param cpp\n+ * CPP device handle\n+ * @param cpp_id\n+ * CPP ID for operation\n+ * @param address\n+ * Address for operation\n+ * @param value\n+ * Value to write\n+ *\n+ * @return\n+ * 0 on success, or -ERRNO\n+ */\n int\n nfp_cpp_writel(struct nfp_cpp *cpp,\n \t\tuint32_t cpp_id,\n@@ -518,6 +744,21 @@ nfp_cpp_writel(struct nfp_cpp *cpp,\n \treturn (sz == sizeof(value)) ? 0 : -1;\n }\n \n+/**\n+ * Read a uint64_t value from a CPP location\n+ *\n+ * @param cpp\n+ * CPP device handle\n+ * @param cpp_id\n+ * CPP ID for operation\n+ * @param address\n+ * Address for operation\n+ * @param value\n+ * Pointer to read buffer\n+ *\n+ * @return\n+ * 0 on success, or -ERRNO\n+ */\n int\n nfp_cpp_readq(struct nfp_cpp *cpp,\n \t\tuint32_t cpp_id,\n@@ -533,6 +774,21 @@ nfp_cpp_readq(struct nfp_cpp *cpp,\n \treturn (sz == sizeof(*value)) ? 0 : -1;\n }\n \n+/**\n+ * Write a uint64_t value to a CPP location\n+ *\n+ * @param cpp\n+ * CPP device handle\n+ * @param cpp_id\n+ * CPP ID for operation\n+ * @param address\n+ * Address for operation\n+ * @param value\n+ * Value to write\n+ *\n+ * @return\n+ * 0 on success, or -ERRNO\n+ */\n int\n nfp_cpp_writeq(struct nfp_cpp *cpp,\n \t\tuint32_t cpp_id,\n@@ -547,6 +803,19 @@ nfp_cpp_writeq(struct nfp_cpp *cpp,\n \treturn (sz == sizeof(value)) ? 0 : -1;\n }\n \n+/**\n+ * Write a uint32_t word to a XPB location\n+ *\n+ * @param cpp\n+ * CPP device handle\n+ * @param xpb_addr\n+ * XPB target and address\n+ * @param value\n+ * Value to write\n+ *\n+ * @return\n+ * 0 on success, or -ERRNO\n+ */\n int\n nfp_xpb_writel(struct nfp_cpp *cpp,\n \t\tuint32_t xpb_addr,\n@@ -559,6 +828,19 @@ nfp_xpb_writel(struct nfp_cpp *cpp,\n \treturn nfp_cpp_writel(cpp, cpp_dest, xpb_addr, value);\n }\n \n+/**\n+ * Read a uint32_t value from a XPB location\n+ *\n+ * @param cpp\n+ * CPP device handle\n+ * @param xpb_addr\n+ * XPB target and address\n+ * @param value\n+ * Pointer to read buffer\n+ *\n+ * @return\n+ * 0 on success, or -ERRNO\n+ */\n int\n nfp_xpb_readl(struct nfp_cpp *cpp,\n \t\tuint32_t xpb_addr,\n@@ -625,9 +907,11 @@ nfp_cpp_alloc(struct rte_pci_device *dev,\n \treturn cpp;\n }\n \n-/*\n- * nfp_cpp_free - free the CPP handle\n- * @cpp: CPP handle\n+/**\n+ * Free the CPP handle\n+ *\n+ * @param cpp\n+ * CPP handle\n */\n void\n nfp_cpp_free(struct nfp_cpp *cpp)\n@@ -641,6 +925,19 @@ nfp_cpp_free(struct nfp_cpp *cpp)\n \tfree(cpp);\n }\n \n+/**\n+ * Create a NFP CPP handle from device\n+ *\n+ * @param dev\n+ * PCI device\n+ * @param driver_lock_needed\n+ * Driver lock flag\n+ *\n+ * @return\n+ * NFP CPP handle on success, NULL on failure\n+ *\n+ * NOTE: On failure, cpp_ops->free will be called!\n+ */\n struct nfp_cpp *\n nfp_cpp_from_device_name(struct rte_pci_device *dev,\n \t\tint driver_lock_needed)\n@@ -648,13 +945,22 @@ nfp_cpp_from_device_name(struct rte_pci_device *dev,\n \treturn nfp_cpp_alloc(dev, driver_lock_needed);\n }\n \n-/*\n- * nfp_cpp_read - read from CPP target\n- * @cpp: CPP handle\n- * @destination: CPP id\n- * @address: offset into CPP target\n- * @kernel_vaddr: kernel buffer for result\n- * @length: number of bytes to read\n+/**\n+ * Read from CPP target\n+ *\n+ * @param cpp\n+ * CPP handle\n+ * @param destination\n+ * CPP id\n+ * @param address\n+ * Offset into CPP target\n+ * @param kernel_vaddr\n+ * Buffer for result\n+ * @param length\n+ * Number of bytes to read\n+ *\n+ * @return\n+ * Length of io, or -ERRNO\n */\n int\n nfp_cpp_read(struct nfp_cpp *cpp,\n@@ -678,13 +984,22 @@ nfp_cpp_read(struct nfp_cpp *cpp,\n \treturn err;\n }\n \n-/*\n- * nfp_cpp_write - write to CPP target\n- * @cpp: CPP handle\n- * @destination: CPP id\n- * @address: offset into CPP target\n- * @kernel_vaddr: kernel buffer to read from\n- * @length: number of bytes to write\n+/**\n+ * Write to CPP target\n+ *\n+ * @param cpp\n+ * CPP handle\n+ * @param destination\n+ * CPP id\n+ * @param address\n+ * Offset into CPP target\n+ * @param kernel_vaddr\n+ * Buffer to read from\n+ * @param length\n+ * Number of bytes to write\n+ *\n+ * @return\n+ * Length of io, or -ERRNO\n */\n int\n nfp_cpp_write(struct nfp_cpp *cpp,\n@@ -731,18 +1046,23 @@ __nfp_cpp_model_autodetect(struct nfp_cpp *cpp,\n \treturn 0;\n }\n \n-/*\n- * nfp_cpp_map_area() - Helper function to map an area\n- * @cpp: NFP CPP handler\n- * @cpp_id: CPP ID\n- * @addr: CPP address\n- * @size: Size of the area\n- * @area: Area handle (output)\n+/**\n+ * Map an area of IOMEM access.\n+ * To undo the effect of this function call @nfp_cpp_area_release_free(*area).\n *\n- * Map an area of IOMEM access. To undo the effect of this function call\n- * @nfp_cpp_area_release_free(*area).\n+ * @param cpp\n+ * NFP CPP handler\n+ * @param cpp_id\n+ * CPP id\n+ * @param addr\n+ * CPP address\n+ * @param size\n+ * Size of the area\n+ * @param area\n+ * Area handle (output)\n *\n- * Return: Pointer to memory mapped area or NULL\n+ * @return\n+ * Pointer to memory mapped area or NULL\n */\n uint8_t *\n nfp_cpp_map_area(struct nfp_cpp *cpp,\ndiff --git a/drivers/net/nfp/nfpcore/nfp_hwinfo.c b/drivers/net/nfp/nfpcore/nfp_hwinfo.c\nindex b658b5e900..f5579ab60f 100644\n--- a/drivers/net/nfp/nfpcore/nfp_hwinfo.c\n+++ b/drivers/net/nfp/nfpcore/nfp_hwinfo.c\n@@ -3,7 +3,8 @@\n * All rights reserved.\n */\n \n-/* Parse the hwinfo table that the ARM firmware builds in the ARM scratch SRAM\n+/*\n+ * Parse the hwinfo table that the ARM firmware builds in the ARM scratch SRAM\n * after chip reset.\n *\n * Examples of the fields:\n@@ -146,7 +147,7 @@ nfp_hwinfo_fetch(struct nfp_cpp *cpp,\n \tstruct nfp_hwinfo *db;\n \n \twait.tv_sec = 0;\n-\twait.tv_nsec = 10000000;\n+\twait.tv_nsec = 10000000; /* 10ms */\n \n \tfor (;;) {\n \t\tdb = nfp_hwinfo_try_fetch(cpp, hwdb_size);\n@@ -154,7 +155,7 @@ nfp_hwinfo_fetch(struct nfp_cpp *cpp,\n \t\t\treturn db;\n \n \t\tnanosleep(&wait, NULL);\n-\t\tif (count++ > 200) {\n+\t\tif (count++ > 200) { /* 10ms * 200 = 2s */\n \t\t\tPMD_DRV_LOG(ERR, \"NFP access error\");\n \t\t\treturn NULL;\n \t\t}\n@@ -180,12 +181,16 @@ nfp_hwinfo_read(struct nfp_cpp *cpp)\n \treturn db;\n }\n \n-/*\n- * nfp_hwinfo_lookup() - Find a value in the HWInfo table by name\n- * @hwinfo:\tNFP HWinfo table\n- * @lookup:\tHWInfo name to search for\n+/**\n+ * Find a value in the HWInfo table by name\n+ *\n+ * @param hwinfo\n+ * NFP HWInfo table\n+ * @param lookup\n+ * HWInfo name to search for\n *\n- * Return: Value of the HWInfo name, or NULL\n+ * @return\n+ * Value of the HWInfo name, or NULL\n */\n const char *\n nfp_hwinfo_lookup(struct nfp_hwinfo *hwinfo,\ndiff --git a/drivers/net/nfp/nfpcore/nfp_hwinfo.h b/drivers/net/nfp/nfpcore/nfp_hwinfo.h\nindex a3da7512db..424db8035d 100644\n--- a/drivers/net/nfp/nfpcore/nfp_hwinfo.h\n+++ b/drivers/net/nfp/nfpcore/nfp_hwinfo.h\n@@ -59,6 +59,8 @@\n * Packed UTF8Z strings, ie 'key1\\000value1\\000key2\\000value2\\000'\n *\n * Unsorted.\n+ *\n+ * Note: Only the HwInfo v2 Table be supported now.\n */\n \n #define NFP_HWINFO_VERSION_1 ('H' << 24 | 'I' << 16 | 1 << 8 | 0 << 1 | 0)\ndiff --git a/drivers/net/nfp/nfpcore/nfp_mip.c b/drivers/net/nfp/nfpcore/nfp_mip.c\nindex 086e82db70..0892c99e96 100644\n--- a/drivers/net/nfp/nfpcore/nfp_mip.c\n+++ b/drivers/net/nfp/nfpcore/nfp_mip.c\n@@ -87,15 +87,16 @@ nfp_mip_read_resource(struct nfp_cpp *cpp,\n \treturn err;\n }\n \n-/*\n- * nfp_mip_open() - Get device MIP structure\n- * @cpp:\tNFP CPP Handle\n- *\n- * Copy MIP structure from NFP device and return it. The returned\n+/**\n+ * Copy MIP structure from NFP device and return it. The returned\n * structure is handled internally by the library and should be\n- * freed by calling nfp_mip_close().\n+ * freed by calling @nfp_mip_close().\n+ *\n+ * @param cpp\n+ * NFP CPP Handle\n *\n- * Return: pointer to mip, NULL on failure.\n+ * @return\n+ * Pointer to MIP, NULL on failure.\n */\n struct nfp_mip *\n nfp_mip_open(struct nfp_cpp *cpp)\n@@ -131,11 +132,15 @@ nfp_mip_name(const struct nfp_mip *mip)\n \treturn mip->name;\n }\n \n-/*\n- * nfp_mip_symtab() - Get the address and size of the MIP symbol table\n- * @mip:\tMIP handle\n- * @addr:\tLocation for NFP DDR address of MIP symbol table\n- * @size:\tLocation for size of MIP symbol table\n+/**\n+ * Get the address and size of the MIP symbol table.\n+ *\n+ * @param mip\n+ * MIP handle\n+ * @param addr\n+ * Location for NFP DDR address of MIP symbol table\n+ * @param size\n+ * Location for size of MIP symbol table\n */\n void\n nfp_mip_symtab(const struct nfp_mip *mip,\n@@ -146,11 +151,15 @@ nfp_mip_symtab(const struct nfp_mip *mip,\n \t*size = rte_le_to_cpu_32(mip->symtab_size);\n }\n \n-/*\n- * nfp_mip_strtab() - Get the address and size of the MIP symbol name table\n- * @mip:\tMIP handle\n- * @addr:\tLocation for NFP DDR address of MIP symbol name table\n- * @size:\tLocation for size of MIP symbol name table\n+/**\n+ * Get the address and size of the MIP symbol name table.\n+ *\n+ * @param mip\n+ * MIP handle\n+ * @param addr\n+ * Location for NFP DDR address of MIP symbol name table\n+ * @param size\n+ * Location for size of MIP symbol name table\n */\n void\n nfp_mip_strtab(const struct nfp_mip *mip,\ndiff --git a/drivers/net/nfp/nfpcore/nfp_mutex.c b/drivers/net/nfp/nfpcore/nfp_mutex.c\nindex 82919d8270..404d4fa938 100644\n--- a/drivers/net/nfp/nfpcore/nfp_mutex.c\n+++ b/drivers/net/nfp/nfpcore/nfp_mutex.c\n@@ -53,7 +53,7 @@ _nfp_cpp_mutex_validate(uint32_t model,\n \treturn 0;\n }\n \n-/*\n+/**\n * Initialize a mutex location\n *\n * The CPP target:address must point to a 64-bit aligned location, and\n@@ -65,13 +65,17 @@ _nfp_cpp_mutex_validate(uint32_t model,\n * This function should only be called when setting up\n * the initial lock state upon boot-up of the system.\n *\n- * @param mutex NFP CPP Mutex handle\n- * @param target NFP CPP target ID (ie NFP_CPP_TARGET_CLS or\n- *\t\t NFP_CPP_TARGET_MU)\n- * @param address Offset into the address space of the NFP CPP target ID\n- * @param key Unique 32-bit value for this mutex\n+ * @param cpp\n+ * NFP CPP handle\n+ * @param target\n+ * NFP CPP target ID (ie NFP_CPP_TARGET_CLS or NFP_CPP_TARGET_MU)\n+ * @param address\n+ * Offset into the address space of the NFP CPP target ID\n+ * @param key\n+ * Unique 32-bit value for this mutex\n *\n- * @return 0 on success, or negative value on failure.\n+ * @return\n+ * 0 on success, or negative value on failure\n */\n int\n nfp_cpp_mutex_init(struct nfp_cpp *cpp,\n@@ -99,7 +103,7 @@ nfp_cpp_mutex_init(struct nfp_cpp *cpp,\n \treturn 0;\n }\n \n-/*\n+/**\n * Create a mutex handle from an address controlled by a MU Atomic engine\n *\n * The CPP target:address must point to a 64-bit aligned location, and\n@@ -108,13 +112,17 @@ nfp_cpp_mutex_init(struct nfp_cpp *cpp,\n * Only target/address pairs that point to entities that support the\n * MU Atomic Engine are supported.\n *\n- * @param cpp NFP CPP handle\n- * @param target NFP CPP target ID (ie NFP_CPP_TARGET_CLS or\n- *\t\t NFP_CPP_TARGET_MU)\n- * @param address Offset into the address space of the NFP CPP target ID\n- * @param key 32-bit unique key (must match the key at this location)\n+ * @param cpp\n+ * NFP CPP handle\n+ * @param target\n+ * NFP CPP target ID (ie NFP_CPP_TARGET_CLS or NFP_CPP_TARGET_MU)\n+ * @param address\n+ * Offset into the address space of the NFP CPP target ID\n+ * @param key\n+ * 32-bit unique key (must match the key at this location)\n *\n- * @return A non-NULL struct nfp_cpp_mutex * on success, NULL on failure.\n+ * @return\n+ * A non-NULL struct nfp_cpp_mutex * on success, NULL on failure.\n */\n struct nfp_cpp_mutex *\n nfp_cpp_mutex_alloc(struct nfp_cpp *cpp,\n@@ -178,10 +186,11 @@ nfp_cpp_mutex_alloc(struct nfp_cpp *cpp,\n \treturn mutex;\n }\n \n-/*\n+/**\n * Free a mutex handle - does not alter the lock state\n *\n- * @param mutex NFP CPP Mutex handle\n+ * @param mutex\n+ * NFP CPP Mutex handle\n */\n void\n nfp_cpp_mutex_free(struct nfp_cpp_mutex *mutex)\n@@ -203,12 +212,14 @@ nfp_cpp_mutex_free(struct nfp_cpp_mutex *mutex)\n \tfree(mutex);\n }\n \n-/*\n+/**\n * Lock a mutex handle, using the NFP MU Atomic Engine\n *\n- * @param mutex NFP CPP Mutex handle\n+ * @param mutex\n+ * NFP CPP Mutex handle\n *\n- * @return 0 on success, or negative value on failure.\n+ * @return\n+ * 0 on success, or negative value on failure.\n */\n int\n nfp_cpp_mutex_lock(struct nfp_cpp_mutex *mutex)\n@@ -229,12 +240,14 @@ nfp_cpp_mutex_lock(struct nfp_cpp_mutex *mutex)\n \treturn 0;\n }\n \n-/*\n+/**\n * Unlock a mutex handle, using the NFP MU Atomic Engine\n *\n- * @param mutex NFP CPP Mutex handle\n+ * @param mutex\n+ * NFP CPP Mutex handle\n *\n- * @return 0 on success, or negative value on failure.\n+ * @return\n+ * 0 on success, or negative value on failure\n */\n int\n nfp_cpp_mutex_unlock(struct nfp_cpp_mutex *mutex)\n@@ -280,16 +293,18 @@ nfp_cpp_mutex_unlock(struct nfp_cpp_mutex *mutex)\n \treturn err;\n }\n \n-/*\n+/**\n * Attempt to lock a mutex handle, using the NFP MU Atomic Engine\n *\n * Valid lock states:\n- *\n * 0x....0000 - Unlocked\n * 0x....000f - Locked\n *\n- * @param mutex NFP CPP Mutex handle\n- * @return 0 if the lock succeeded, negative value on failure.\n+ * @param mutex\n+ * NFP CPP Mutex handle\n+ *\n+ * @return\n+ * 0 if the lock succeeded, negative value on failure.\n */\n int\n nfp_cpp_mutex_trylock(struct nfp_cpp_mutex *mutex)\n@@ -352,7 +367,7 @@ nfp_cpp_mutex_trylock(struct nfp_cpp_mutex *mutex)\n \t\t * If there was another contending for this lock, then\n \t\t * the lock state would be 0x....000f\n \t\t *\n-\t\t * Write our owner ID into the lock\n+\t\t * Write our owner ID into the lock.\n \t\t * While not strictly necessary, this helps with\n \t\t * debug and bookkeeping.\n \t\t */\ndiff --git a/drivers/net/nfp/nfpcore/nfp_nffw.c b/drivers/net/nfp/nfpcore/nfp_nffw.c\nindex b5a354137d..5f004e3b21 100644\n--- a/drivers/net/nfp/nfpcore/nfp_nffw.c\n+++ b/drivers/net/nfp/nfpcore/nfp_nffw.c\n@@ -52,7 +52,7 @@ nffw_fwinfo_mip_mu_da_get(const struct nffw_fwinfo *fi)\n \treturn (fi->loaded__mu_da__mip_off_hi >> 8) & 1;\n }\n \n-/* mip_offset = (loaded__mu_da__mip_off_hi<7:0> << 8) | mip_offset_lo */\n+/* mip_offset = (loaded__mu_da__mip_off_hi<7:0> << 32) | mip_offset_lo */\n static uint64_t\n nffw_fwinfo_mip_offset_get(const struct nffw_fwinfo *fi)\n {\n@@ -112,11 +112,14 @@ nffw_res_fwinfos(struct nfp_nffw_info_data *fwinf,\n \t}\n }\n \n-/*\n- * nfp_nffw_info_open() - Acquire the lock on the NFFW table\n- * @cpp:\tNFP CPP handle\n+/**\n+ * Acquire the lock on the NFFW table\n+ *\n+ * @param cpp\n+ * NFP CPP handle\n *\n- * Return: nffw info pointer, or NULL on failure\n+ * @return\n+ * NFFW info pointer, or NULL on failure\n */\n struct nfp_nffw_info *\n nfp_nffw_info_open(struct nfp_cpp *cpp)\n@@ -168,11 +171,11 @@ nfp_nffw_info_open(struct nfp_cpp *cpp)\n \treturn NULL;\n }\n \n-/*\n- * nfp_nffw_info_close() - Release the lock on the NFFW table\n- * @state:\tNFP FW info state\n+/**\n+ * Release the lock on the NFFW table\n *\n- * Return: void\n+ * @param state\n+ * NFFW info pointer\n */\n void\n nfp_nffw_info_close(struct nfp_nffw_info *state)\n@@ -181,11 +184,14 @@ nfp_nffw_info_close(struct nfp_nffw_info *state)\n \tfree(state);\n }\n \n-/*\n- * nfp_nffw_info_fwid_first() - Return the first firmware ID in the NFFW\n- * @state:\tNFP FW info state\n+/**\n+ * Return the first firmware ID in the NFFW\n *\n- * Return: First NFFW firmware info, NULL on failure\n+ * @param state\n+ * NFFW info pointer\n+ *\n+ * @return:\n+ * First NFFW firmware info, NULL on failure\n */\n static struct nffw_fwinfo *\n nfp_nffw_info_fwid_first(struct nfp_nffw_info *state)\n@@ -205,13 +211,18 @@ nfp_nffw_info_fwid_first(struct nfp_nffw_info *state)\n \treturn NULL;\n }\n \n-/*\n- * nfp_nffw_info_mip_first() - Retrieve the location of the first FW's MIP\n- * @state:\tNFP FW info state\n- * @cpp_id:\tPointer to the CPP ID of the MIP\n- * @off:\tPointer to the CPP Address of the MIP\n+/**\n+ * Retrieve the location of the first FW's MIP\n+ *\n+ * @param state\n+ * NFFW info pointer\n+ * @param cpp_id\n+ * Pointer to the CPP ID of the MIP\n+ * @param off\n+ * Pointer to the CPP Address of the MIP\n *\n- * Return: 0, or -ERRNO\n+ * @return\n+ * 0, or -ERRNO\n */\n int\n nfp_nffw_info_mip_first(struct nfp_nffw_info *state,\ndiff --git a/drivers/net/nfp/nfpcore/nfp_nffw.h b/drivers/net/nfp/nfpcore/nfp_nffw.h\nindex 46ac8a8d07..e032b6cce7 100644\n--- a/drivers/net/nfp/nfpcore/nfp_nffw.h\n+++ b/drivers/net/nfp/nfpcore/nfp_nffw.h\n@@ -8,7 +8,8 @@\n \n #include \"nfp_cpp.h\"\n \n-/* Init-CSR owner IDs for firmware map to firmware IDs which start at 4.\n+/*\n+ * Init-CSR owner IDs for firmware map to firmware IDs which start at 4.\n * Lower IDs are reserved for target and loader IDs.\n */\n #define NFFW_FWID_EXT 3 /* For active MEs that we didn't load. */\n@@ -16,7 +17,7 @@\n \n #define NFFW_FWID_ALL 255\n \n-/**\n+/*\n * NFFW_INFO_VERSION history:\n * 0: This was never actually used (before versioning), but it refers to\n * the previous struct which had FWINFO_CNT = MEINFO_CNT = 120 that later\n@@ -35,6 +36,7 @@\n #define NFFW_MEINFO_CNT_V2 200\n #define NFFW_FWINFO_CNT_V2 200\n \n+/* nfp.nffw meinfo */\n struct nffw_meinfo {\n \tuint32_t ctxmask__fwid__meid;\n };\ndiff --git a/drivers/net/nfp/nfpcore/nfp_nsp.c b/drivers/net/nfp/nfpcore/nfp_nsp.c\nindex ff19446173..a96ccea38b 100644\n--- a/drivers/net/nfp/nfpcore/nfp_nsp.c\n+++ b/drivers/net/nfp/nfpcore/nfp_nsp.c\n@@ -109,9 +109,11 @@ nfp_nsp_check(struct nfp_nsp *state)\n \treturn 0;\n }\n \n-/*\n- * nfp_nsp_open() - Prepare for communication and lock the NSP resource.\n- * @cpp:\tNFP CPP Handle\n+/**\n+ * Prepare for communication and lock the NSP resource.\n+ *\n+ * @param cpp\n+ * NFP CPP Handle\n */\n struct nfp_nsp *\n nfp_nsp_open(struct nfp_cpp *cpp)\n@@ -145,9 +147,11 @@ nfp_nsp_open(struct nfp_cpp *cpp)\n \treturn state;\n }\n \n-/*\n- * nfp_nsp_close() - Clean up and unlock the NSP resource.\n- * @state:\tNFP SP state\n+/**\n+ * Clean up and unlock the NSP resource.\n+ *\n+ * @param state\n+ * NFP SP state\n */\n void\n nfp_nsp_close(struct nfp_nsp *state)\n@@ -181,7 +185,7 @@ nfp_nsp_wait_reg(struct nfp_cpp *cpp,\n \tstruct timespec wait;\n \n \twait.tv_sec = 0;\n-\twait.tv_nsec = 25000000;\n+\twait.tv_nsec = 25000000; /* 25ms */\n \n \tfor (;;) {\n \t\terr = nfp_cpp_readq(cpp, nsp_cpp, addr, reg);\n@@ -194,28 +198,27 @@ nfp_nsp_wait_reg(struct nfp_cpp *cpp,\n \t\t\treturn 0;\n \n \t\tnanosleep(&wait, 0);\n-\t\tif (count++ > 1000)\n+\t\tif (count++ > 1000) /* 25ms * 1000 = 25s */\n \t\t\treturn -ETIMEDOUT;\n \t}\n }\n \n-/*\n- * nfp_nsp_command() - Execute a command on the NFP Service Processor\n- * @state:\tNFP SP state\n- * @code:\tNFP SP Command Code\n- * @option:\tNFP SP Command Argument\n- * @buff_cpp:\tNFP SP Buffer CPP Address info\n- * @buff_addr:\tNFP SP Buffer Host address\n- *\n- * Return: 0 for success with no result\n+/**\n+ * Execute a command on the NFP Service Processor\n *\n- *\t positive value for NSP completion with a result code\n+ * @param state\n+ * NFP SP state\n+ * @param arg\n+ * NFP command argument structure\n *\n- *\t-EAGAIN if the NSP is not yet present\n- *\t-ENODEV if the NSP is not a supported model\n- *\t-EBUSY if the NSP is stuck\n- *\t-EINTR if interrupted while waiting for completion\n- *\t-ETIMEDOUT if the NSP took longer than 30 seconds to complete\n+ * @return\n+ * - 0 for success with no result\n+ * - Positive value for NSP completion with a result code\n+ * - -EAGAIN if the NSP is not yet present\n+ * - -ENODEV if the NSP is not a supported model\n+ * - -EBUSY if the NSP is stuck\n+ * - -EINTR if interrupted while waiting for completion\n+ * - -ETIMEDOUT if the NSP took longer than @timeout_sec seconds to complete\n */\n static int\n nfp_nsp_command(struct nfp_nsp *state,\n@@ -383,7 +386,7 @@ nfp_nsp_wait(struct nfp_nsp *state)\n \tstruct timespec wait;\n \n \twait.tv_sec = 0;\n-\twait.tv_nsec = 25000000;\n+\twait.tv_nsec = 25000000; /* 25ms */\n \n \tfor (;;) {\n \t\terr = nfp_nsp_command(state, SPCODE_NOOP, 0, 0, 0);\n@@ -392,7 +395,7 @@ nfp_nsp_wait(struct nfp_nsp *state)\n \n \t\tnanosleep(&wait, 0);\n \n-\t\tif (count++ > 1000) {\n+\t\tif (count++ > 1000) { /* 25ms * 1000 = 25s */\n \t\t\terr = -ETIMEDOUT;\n \t\t\tbreak;\n \t\t}\ndiff --git a/drivers/net/nfp/nfpcore/nfp_nsp.h b/drivers/net/nfp/nfpcore/nfp_nsp.h\nindex edb56e26ca..0fcb21e99c 100644\n--- a/drivers/net/nfp/nfpcore/nfp_nsp.h\n+++ b/drivers/net/nfp/nfpcore/nfp_nsp.h\n@@ -158,72 +158,45 @@ enum nfp_eth_fec {\n #define NFP_FEC_REED_SOLOMON\tRTE_BIT32(NFP_FEC_REED_SOLOMON_BIT)\n #define NFP_FEC_DISABLED\tRTE_BIT32(NFP_FEC_DISABLED_BIT)\n \n-/**\n- * struct nfp_eth_table - ETH table information\n- * @count:\tnumber of table entries\n- * @max_index:\tmax of @index fields of all @ports\n- * @ports:\ttable of ports\n- *\n- * @eth_index:\tport index according to legacy ethX numbering\n- * @index:\tchip-wide first channel index\n- * @nbi:\tNBI index\n- * @base:\tfirst channel index (within NBI)\n- * @lanes:\tnumber of channels\n- * @speed:\tinterface speed (in Mbps)\n- * @interface:\tinterface (module) plugged in\n- * @media:\tmedia type of the @interface\n- * @fec:\tforward error correction mode\n- * @aneg:\tauto negotiation mode\n- * @mac_addr:\tinterface MAC address\n- * @label_port:\tport id\n- * @label_subport: id of interface within port (for split ports)\n- * @enabled:\tis enabled?\n- * @tx_enabled:\tis TX enabled?\n- * @rx_enabled:\tis RX enabled?\n- * @override_changed: is media reconfig pending?\n- *\n- * @port_type:\tone of %PORT_* defines for ethtool\n- * @port_lanes:\ttotal number of lanes on the port (sum of lanes of all subports)\n- * @is_split:\tis interface part of a split port\n- * @fec_modes_supported:\tbitmap of FEC modes supported\n- */\n+/* ETH table information */\n struct nfp_eth_table {\n-\tuint32_t count;\n-\tuint32_t max_index;\n+\tuint32_t count; /**< Number of table entries */\n+\tuint32_t max_index; /**< Max of @index fields of all @ports */\n \tstruct nfp_eth_table_port {\n+\t\t/** Port index according to legacy ethX numbering */\n \t\tuint32_t eth_index;\n-\t\tuint32_t index;\n-\t\tuint32_t nbi;\n-\t\tuint32_t base;\n-\t\tuint32_t lanes;\n-\t\tuint32_t speed;\n+\t\tuint32_t index; /**< Chip-wide first channel index */\n+\t\tuint32_t nbi; /**< NBI index */\n+\t\tuint32_t base; /**< First channel index (within NBI) */\n+\t\tuint32_t lanes; /**< Number of channels */\n+\t\tuint32_t speed; /**< Interface speed (in Mbps) */\n \n-\t\tuint32_t interface;\n-\t\tenum nfp_eth_media media;\n+\t\tuint32_t interface; /**< Interface (module) plugged in */\n+\t\tenum nfp_eth_media media; /**< Media type of the @interface */\n \n-\t\tenum nfp_eth_fec fec;\n-\t\tenum nfp_eth_aneg aneg;\n+\t\tenum nfp_eth_fec fec; /**< Forward Error Correction mode */\n+\t\tenum nfp_eth_aneg aneg; /**< Auto negotiation mode */\n \n-\t\tstruct rte_ether_addr mac_addr;\n+\t\tstruct rte_ether_addr mac_addr; /**< Interface MAC address */\n \n-\t\tuint8_t label_port;\n+\t\tuint8_t label_port; /**< Port id */\n+\t\t/** Id of interface within port (for split ports) */\n \t\tuint8_t label_subport;\n \n-\t\tint enabled;\n-\t\tint tx_enabled;\n-\t\tint rx_enabled;\n-\n-\t\tint override_changed;\n+\t\tint enabled; /**< Enable port */\n+\t\tint tx_enabled; /**< Enable TX */\n+\t\tint rx_enabled; /**< Enable RX */\n \n-\t\t/* Computed fields */\n-\t\tuint8_t port_type;\n+\t\tint override_changed; /**< Media reconfig pending */\n \n+\t\tuint8_t port_type; /**< One of %PORT_* */\n+\t\t/** Sum of lanes of all subports of this port */\n \t\tuint32_t port_lanes;\n \n-\t\tint is_split;\n+\t\tint is_split; /**< Split port */\n \n-\t\tuint32_t fec_modes_supported;\n-\t} ports[];\n+\t\tuint32_t fec_modes_supported; /**< Bitmap of FEC modes supported */\n+\t} ports[]; /**< Table of ports */\n };\n \n struct nfp_eth_table *nfp_eth_read_ports(struct nfp_cpp *cpp);\n@@ -263,28 +236,17 @@ int __nfp_eth_set_aneg(struct nfp_nsp *nsp, enum nfp_eth_aneg mode);\n int __nfp_eth_set_speed(struct nfp_nsp *nsp, uint32_t speed);\n int __nfp_eth_set_split(struct nfp_nsp *nsp, uint32_t lanes);\n \n-/**\n- * struct nfp_nsp_identify - NSP static information\n- * @version: opaque version string\n- * @flags: version flags\n- * @br_primary: branch id of primary bootloader\n- * @br_secondary: branch id of secondary bootloader\n- * @br_nsp: branch id of NSP\n- * @primary: version of primary bootloader\n- * @secondary: version id of secondary bootloader\n- * @nsp: version id of NSP\n- * @sensor_mask: mask of present sensors available on NIC\n- */\n+/* NSP static information */\n struct nfp_nsp_identify {\n-\tchar version[40];\n-\tuint8_t flags;\n-\tuint8_t br_primary;\n-\tuint8_t br_secondary;\n-\tuint8_t br_nsp;\n-\tuint16_t primary;\n-\tuint16_t secondary;\n-\tuint16_t nsp;\n-\tuint64_t sensor_mask;\n+\tchar version[40]; /**< Opaque version string */\n+\tuint8_t flags; /**< Version flags */\n+\tuint8_t br_primary; /**< Branch id of primary bootloader */\n+\tuint8_t br_secondary; /**< Branch id of secondary bootloader */\n+\tuint8_t br_nsp; /**< Branch id of NSP */\n+\tuint16_t primary; /**< Version of primary bootloader */\n+\tuint16_t secondary; /**< Version id of secondary bootloader */\n+\tuint16_t nsp; /**< Version id of NSP */\n+\tuint64_t sensor_mask; /**< Mask of present sensors available on NIC */\n };\n \n struct nfp_nsp_identify *__nfp_nsp_identify(struct nfp_nsp *nsp);\ndiff --git a/drivers/net/nfp/nfpcore/nfp_nsp_eth.c b/drivers/net/nfp/nfpcore/nfp_nsp_eth.c\nindex 74daa92aed..cb090d2a47 100644\n--- a/drivers/net/nfp/nfpcore/nfp_nsp_eth.c\n+++ b/drivers/net/nfp/nfpcore/nfp_nsp_eth.c\n@@ -264,7 +264,8 @@ __nfp_eth_read_ports(struct nfp_nsp *nsp)\n \t\tgoto err;\n \t}\n \n-\t/* The NFP3800 NIC support 8 ports, but only 2 ports are valid,\n+\t/*\n+\t * The NFP3800 NIC support 8 ports, but only 2 ports are valid,\n \t * the rest 6 ports mac are all 0, ensure we don't use these port\n \t */\n \tfor (i = 0; i < NSP_ETH_MAX_COUNT; i++) {\n@@ -274,7 +275,8 @@ __nfp_eth_read_ports(struct nfp_nsp *nsp)\n \t\t\tcnt++;\n \t}\n \n-\t/* Some versions of flash will give us 0 instead of port count. For\n+\t/*\n+\t * Some versions of flash will give us 0 instead of port count. For\n \t * those that give a port count, verify it against the value calculated\n \t * above.\n \t */\n@@ -312,14 +314,16 @@ __nfp_eth_read_ports(struct nfp_nsp *nsp)\n \treturn NULL;\n }\n \n-/*\n- * nfp_eth_read_ports() - retrieve port information\n- * @cpp:\tNFP CPP handle\n+/**\n+ * Read the port information from the device.\n+ *\n+ * Returned structure should be freed once no longer needed.\n *\n- * Read the port information from the device. Returned structure should\n- * be freed with kfree() once no longer needed.\n+ * @param cpp\n+ * NFP CPP handle\n *\n- * Return: populated ETH table or NULL on error.\n+ * @return\n+ * Populated ETH table or NULL on error.\n */\n struct nfp_eth_table *\n nfp_eth_read_ports(struct nfp_cpp *cpp)\n@@ -387,19 +391,19 @@ nfp_eth_config_cleanup_end(struct nfp_nsp *nsp)\n \tfree(entries);\n }\n \n-/*\n- * nfp_eth_config_commit_end() - perform recorded configuration changes\n- * @nsp:\tNFP NSP handle returned from nfp_eth_config_start()\n- *\n+/**\n * Perform the configuration which was requested with __nfp_eth_set_*()\n- * helpers and recorded in @nsp state. If device was already configured\n- * as requested or no __nfp_eth_set_*() operations were made no NSP command\n+ * helpers and recorded in @nsp state. If device was already configured\n+ * as requested or no __nfp_eth_set_*() operations were made, no NSP command\n * will be performed.\n *\n- * Return:\n- * 0 - configuration successful;\n- * 1 - no changes were needed;\n- * -ERRNO - configuration failed.\n+ * @param nsp\n+ * NFP NSP handle returned from nfp_eth_config_start()\n+ *\n+ * @return\n+ * - (0) Configuration successful\n+ * - (1) No changes were needed\n+ * - (-ERRNO) Configuration failed\n */\n int\n nfp_eth_config_commit_end(struct nfp_nsp *nsp)\n@@ -417,19 +421,21 @@ nfp_eth_config_commit_end(struct nfp_nsp *nsp)\n \treturn ret;\n }\n \n-/*\n- * nfp_eth_set_mod_enable() - set PHY module enable control bit\n- * @cpp:\tNFP CPP handle\n- * @idx:\tNFP chip-wide port index\n- * @enable:\tDesired state\n- *\n+/**\n * Enable or disable PHY module (this usually means setting the TX lanes\n * disable bits).\n *\n- * Return:\n- * 0 - configuration successful;\n- * 1 - no changes were needed;\n- * -ERRNO - configuration failed.\n+ * @param cpp\n+ * NFP CPP handle\n+ * @param idx\n+ * NFP chip-wide port index\n+ * @param enable\n+ * Desired state\n+ *\n+ * @return\n+ * - (0) Configuration successful\n+ * - (1) No changes were needed\n+ * - (-ERRNO) Configuration failed\n */\n int\n nfp_eth_set_mod_enable(struct nfp_cpp *cpp,\n@@ -460,18 +466,20 @@ nfp_eth_set_mod_enable(struct nfp_cpp *cpp,\n \treturn nfp_eth_config_commit_end(nsp);\n }\n \n-/*\n- * nfp_eth_set_configured() - set PHY module configured control bit\n- * @cpp:\tNFP CPP handle\n- * @idx:\tNFP chip-wide port index\n- * @configed:\tDesired state\n- *\n+/**\n * Set the ifup/ifdown state on the PHY.\n *\n- * Return:\n- * 0 - configuration successful;\n- * 1 - no changes were needed;\n- * -ERRNO - configuration failed.\n+ * @param cpp\n+ * NFP CPP handle\n+ * @param idx\n+ * NFP chip-wide port index\n+ * @param configured\n+ * Desired state\n+ *\n+ * @return\n+ * - (0) Configuration successful\n+ * - (1) No changes were needed\n+ * - (-ERRNO) Configuration failed\n */\n int\n nfp_eth_set_configured(struct nfp_cpp *cpp,\n@@ -525,7 +533,7 @@ nfp_eth_set_bit_config(struct nfp_nsp *nsp,\n \n \t/*\n \t * Note: set features were added in ABI 0.14 but the error\n-\t *\t codes were initially not populated correctly.\n+\t * codes were initially not populated correctly.\n \t */\n \tif (nfp_nsp_get_abi_ver_minor(nsp) < 17) {\n \t\tPMD_DRV_LOG(ERR, \"set operations not supported, please update flash\");\n@@ -555,15 +563,17 @@ nfp_eth_set_bit_config(struct nfp_nsp *nsp,\n \t\t\t\tval, ctrl_bit);\t\t\t\\\n \t}))\n \n-/*\n- * __nfp_eth_set_aneg() - set PHY autonegotiation control bit\n- * @nsp:\tNFP NSP handle returned from nfp_eth_config_start()\n- * @mode:\tDesired autonegotiation mode\n- *\n+/**\n * Allow/disallow PHY module to advertise/perform autonegotiation.\n * Will write to hwinfo overrides in the flash (persistent config).\n *\n- * Return: 0 or -ERRNO.\n+ * @param nsp\n+ * NFP NSP handle returned from nfp_eth_config_start()\n+ * @param mode\n+ * Desired autonegotiation mode\n+ *\n+ * @return\n+ * 0 or -ERRNO\n */\n int\n __nfp_eth_set_aneg(struct nfp_nsp *nsp,\n@@ -573,15 +583,17 @@ __nfp_eth_set_aneg(struct nfp_nsp *nsp,\n \t\t\tNSP_ETH_STATE_ANEG, mode, NSP_ETH_CTRL_SET_ANEG);\n }\n \n-/*\n- * __nfp_eth_set_fec() - set PHY forward error correction control bit\n- * @nsp:\tNFP NSP handle returned from nfp_eth_config_start()\n- * @mode:\tDesired fec mode\n- *\n+/**\n * Set the PHY module forward error correction mode.\n * Will write to hwinfo overrides in the flash (persistent config).\n *\n- * Return: 0 or -ERRNO.\n+ * @param nsp\n+ * NFP NSP handle returned from nfp_eth_config_start()\n+ * @param mode\n+ * Desired fec mode\n+ *\n+ * @return\n+ * 0 or -ERRNO\n */\n static int\n __nfp_eth_set_fec(struct nfp_nsp *nsp,\n@@ -591,16 +603,20 @@ __nfp_eth_set_fec(struct nfp_nsp *nsp,\n \t\t\tNSP_ETH_STATE_FEC, mode, NSP_ETH_CTRL_SET_FEC);\n }\n \n-/*\n- * nfp_eth_set_fec() - set PHY forward error correction control mode\n- * @cpp:\tNFP CPP handle\n- * @idx:\tNFP chip-wide port index\n- * @mode:\tDesired fec mode\n+/**\n+ * Set PHY forward error correction control mode\n+ *\n+ * @param cpp\n+ * NFP CPP handle\n+ * @param idx\n+ * NFP chip-wide port index\n+ * @param mode\n+ * Desired fec mode\n *\n- * Return:\n- * 0 - configuration successful;\n- * 1 - no changes were needed;\n- * -ERRNO - configuration failed.\n+ * @return\n+ * - (0) Configuration successful\n+ * - (1) No changes were needed\n+ * - (-ERRNO) Configuration failed\n */\n int\n nfp_eth_set_fec(struct nfp_cpp *cpp,\n@@ -623,17 +639,19 @@ nfp_eth_set_fec(struct nfp_cpp *cpp,\n \treturn nfp_eth_config_commit_end(nsp);\n }\n \n-/*\n- * __nfp_eth_set_speed() - set interface speed/rate\n- * @nsp:\tNFP NSP handle returned from nfp_eth_config_start()\n- * @speed:\tDesired speed (per lane)\n- *\n- * Set lane speed. Provided @speed value should be subport speed divided\n- * by number of lanes this subport is spanning (i.e. 10000 for 40G, 25000 for\n- * 50G, etc.)\n+/**\n+ * Set lane speed.\n+ * Provided @speed value should be subport speed divided by number of\n+ * lanes this subport is spanning (i.e. 10000 for 40G, 25000 for 50G, etc.)\n * Will write to hwinfo overrides in the flash (persistent config).\n *\n- * Return: 0 or -ERRNO.\n+ * @param nsp\n+ * NFP NSP handle returned from nfp_eth_config_start()\n+ * @param speed\n+ * Desired speed (per lane)\n+ *\n+ * @return\n+ * 0 or -ERRNO\n */\n int\n __nfp_eth_set_speed(struct nfp_nsp *nsp,\n@@ -651,15 +669,17 @@ __nfp_eth_set_speed(struct nfp_nsp *nsp,\n \t\t\tNSP_ETH_STATE_RATE, rate, NSP_ETH_CTRL_SET_RATE);\n }\n \n-/*\n- * __nfp_eth_set_split() - set interface lane split\n- * @nsp:\tNFP NSP handle returned from nfp_eth_config_start()\n- * @lanes:\tDesired lanes per port\n- *\n+/**\n * Set number of lanes in the port.\n * Will write to hwinfo overrides in the flash (persistent config).\n *\n- * Return: 0 or -ERRNO.\n+ * @param nsp\n+ * NFP NSP handle returned from nfp_eth_config_start()\n+ * @param lanes\n+ * Desired lanes per port\n+ *\n+ * @return\n+ * 0 or -ERRNO\n */\n int\n __nfp_eth_set_split(struct nfp_nsp *nsp,\ndiff --git a/drivers/net/nfp/nfpcore/nfp_resource.c b/drivers/net/nfp/nfpcore/nfp_resource.c\nindex 363f7d6198..bdebf5c3aa 100644\n--- a/drivers/net/nfp/nfpcore/nfp_resource.c\n+++ b/drivers/net/nfp/nfpcore/nfp_resource.c\n@@ -22,32 +22,23 @@\n \n #define NFP_RESOURCE_ENTRY_NAME_SZ\t8\n \n-/*\n- * struct nfp_resource_entry - Resource table entry\n- * @owner:\t\tNFP CPP Lock, interface owner\n- * @key:\t\tNFP CPP Lock, posix_crc32(name, 8)\n- * @region:\t\tMemory region descriptor\n- * @name:\t\tASCII, zero padded name\n- * @reserved\n- * @cpp_action:\t\tCPP Action\n- * @cpp_token:\t\tCPP Token\n- * @cpp_target:\t\tCPP Target ID\n- * @page_offset:\t256-byte page offset into target's CPP address\n- * @page_size:\t\tsize, in 256-byte pages\n- */\n+/* Resource table entry */\n struct nfp_resource_entry {\n \tstruct nfp_resource_entry_mutex {\n-\t\tuint32_t owner;\n-\t\tuint32_t key;\n+\t\tuint32_t owner; /**< NFP CPP Lock, interface owner */\n+\t\tuint32_t key; /**< NFP CPP Lock, posix_crc32(name, 8) */\n \t} mutex;\n+\t/* Memory region descriptor */\n \tstruct nfp_resource_entry_region {\n+\t\t/** ASCII, zero padded name */\n \t\tuint8_t name[NFP_RESOURCE_ENTRY_NAME_SZ];\n \t\tuint8_t reserved[5];\n-\t\tuint8_t cpp_action;\n-\t\tuint8_t cpp_token;\n-\t\tuint8_t cpp_target;\n+\t\tuint8_t cpp_action; /**< CPP Action */\n+\t\tuint8_t cpp_token; /**< CPP Token */\n+\t\tuint8_t cpp_target; /**< CPP Target ID */\n+\t\t/** 256-byte page offset into target's CPP address */\n \t\tuint32_t page_offset;\n-\t\tuint32_t page_size;\n+\t\tuint32_t page_size; /**< Size, in 256-byte pages */\n \t} region;\n };\n \n@@ -147,14 +138,18 @@ nfp_resource_try_acquire(struct nfp_cpp *cpp,\n \treturn err;\n }\n \n-/*\n- * nfp_resource_acquire() - Acquire a resource handle\n- * @cpp:\tNFP CPP handle\n- * @name:\tName of the resource\n+/**\n+ * Acquire a resource handle\n+ *\n+ * Note: This function locks the acquired resource.\n *\n- * NOTE: This function locks the acquired resource\n+ * @param cpp\n+ * NFP CPP handle\n+ * @param name\n+ * Name of the resource\n *\n- * Return: NFP Resource handle, or NULL\n+ * @return\n+ * NFP Resource handle, or NULL\n */\n struct nfp_resource *\n nfp_resource_acquire(struct nfp_cpp *cpp,\n@@ -183,7 +178,7 @@ nfp_resource_acquire(struct nfp_cpp *cpp,\n \t}\n \n \twait.tv_sec = 0;\n-\twait.tv_nsec = 1000000;\n+\twait.tv_nsec = 1000000; /* 1ms */\n \n \tfor (;;) {\n \t\terr = nfp_resource_try_acquire(cpp, res, dev_mutex);\n@@ -194,7 +189,7 @@ nfp_resource_acquire(struct nfp_cpp *cpp,\n \t\t\tgoto err_free;\n \t\t}\n \n-\t\tif (count++ > 1000) {\n+\t\tif (count++ > 1000) { /* 1ms * 1000 = 1s */\n \t\t\tPMD_DRV_LOG(ERR, \"Error: resource %s timed out\", name);\n \t\t\terr = -EBUSY;\n \t\t\tgoto err_free;\n@@ -213,11 +208,13 @@ nfp_resource_acquire(struct nfp_cpp *cpp,\n \treturn NULL;\n }\n \n-/*\n- * nfp_resource_release() - Release a NFP Resource handle\n- * @res:\tNFP Resource handle\n+/**\n+ * Release a NFP Resource handle\n *\n- * NOTE: This function implicitly unlocks the resource handle\n+ * NOTE: This function implicitly unlocks the resource handle.\n+ *\n+ * @param res\n+ * NFP Resource handle\n */\n void\n nfp_resource_release(struct nfp_resource *res)\n@@ -227,11 +224,14 @@ nfp_resource_release(struct nfp_resource *res)\n \tfree(res);\n }\n \n-/*\n- * nfp_resource_cpp_id() - Return the cpp_id of a resource handle\n- * @res: NFP Resource handle\n+/**\n+ * Return the cpp_id of a resource handle\n+ *\n+ * @param res\n+ * NFP Resource handle\n *\n- * Return: NFP CPP ID\n+ * @return\n+ * NFP CPP ID\n */\n uint32_t\n nfp_resource_cpp_id(const struct nfp_resource *res)\n@@ -239,11 +239,14 @@ nfp_resource_cpp_id(const struct nfp_resource *res)\n \treturn res->cpp_id;\n }\n \n-/*\n- * nfp_resource_name() - Return the name of a resource handle\n- * @res: NFP Resource handle\n+/**\n+ * Return the name of a resource handle\n *\n- * Return: const char pointer to the name of the resource\n+ * @param res\n+ * NFP Resource handle\n+ *\n+ * @return\n+ * Const char pointer to the name of the resource\n */\n const char *\n nfp_resource_name(const struct nfp_resource *res)\n@@ -251,11 +254,14 @@ nfp_resource_name(const struct nfp_resource *res)\n \treturn res->name;\n }\n \n-/*\n- * nfp_resource_address() - Return the address of a resource handle\n- * @res: NFP Resource handle\n+/**\n+ * Return the address of a resource handle\n+ *\n+ * @param res\n+ * NFP Resource handle\n *\n- * Return: Address of the resource\n+ * @return\n+ * Address of the resource\n */\n uint64_t\n nfp_resource_address(const struct nfp_resource *res)\n@@ -263,11 +269,14 @@ nfp_resource_address(const struct nfp_resource *res)\n \treturn res->addr;\n }\n \n-/*\n- * nfp_resource_size() - Return the size in bytes of a resource handle\n- * @res: NFP Resource handle\n+/**\n+ * Return the size in bytes of a resource handle\n+ *\n+ * @param res\n+ * NFP Resource handle\n *\n- * Return: Size of the resource in bytes\n+ * @return\n+ * Size of the resource in bytes\n */\n uint64_t\n nfp_resource_size(const struct nfp_resource *res)\ndiff --git a/drivers/net/nfp/nfpcore/nfp_resource.h b/drivers/net/nfp/nfpcore/nfp_resource.h\nindex 009b7359a4..4236950caf 100644\n--- a/drivers/net/nfp/nfpcore/nfp_resource.h\n+++ b/drivers/net/nfp/nfpcore/nfp_resource.h\n@@ -8,43 +8,27 @@\n \n #include \"nfp_cpp.h\"\n \n+/* Netronone Flow Firmware Table */\n #define NFP_RESOURCE_NFP_NFFW \"nfp.nffw\"\n+\n+/* NFP Hardware Info Database */\n #define NFP_RESOURCE_NFP_HWINFO \"nfp.info\"\n+\n+/* Service Processor */\n #define NFP_RESOURCE_NSP\t\t\"nfp.sp\"\n \n-/**\n- * Opaque handle to a NFP Resource\n- */\n+/* Opaque handle to a NFP Resource */\n struct nfp_resource;\n \n struct nfp_resource *nfp_resource_acquire(struct nfp_cpp *cpp,\n \t\tconst char *name);\n \n-/**\n- * Release a NFP Resource, and free the handle\n- * @param[in] res NFP Resource handle\n- */\n void nfp_resource_release(struct nfp_resource *res);\n \n-/**\n- * Return the CPP ID of a NFP Resource\n- * @param[in] res NFP Resource handle\n- * @return CPP ID of the NFP Resource\n- */\n uint32_t nfp_resource_cpp_id(const struct nfp_resource *res);\n \n-/**\n- * Return the name of a NFP Resource\n- * @param[in] res NFP Resource handle\n- * @return Name of the NFP Resource\n- */\n const char *nfp_resource_name(const struct nfp_resource *res);\n \n-/**\n- * Return the target address of a NFP Resource\n- * @param[in] res NFP Resource handle\n- * @return Address of the NFP Resource\n- */\n uint64_t nfp_resource_address(const struct nfp_resource *res);\n \n uint64_t nfp_resource_size(const struct nfp_resource *res);\ndiff --git a/drivers/net/nfp/nfpcore/nfp_rtsym.c b/drivers/net/nfp/nfpcore/nfp_rtsym.c\nindex d15a920752..0e6c0f9fe1 100644\n--- a/drivers/net/nfp/nfpcore/nfp_rtsym.c\n+++ b/drivers/net/nfp/nfpcore/nfp_rtsym.c\n@@ -162,11 +162,14 @@ __nfp_rtsym_table_read(struct nfp_cpp *cpp,\n \treturn NULL;\n }\n \n-/*\n- * nfp_rtsym_count() - Get the number of RTSYM descriptors\n- * @rtbl:\tNFP RTsym table\n+/**\n+ * Get the number of RTSYM descriptors\n+ *\n+ * @param rtbl\n+ * NFP RTSYM table\n *\n- * Return: Number of RTSYM descriptors\n+ * @return\n+ * Number of RTSYM descriptors\n */\n int\n nfp_rtsym_count(struct nfp_rtsym_table *rtbl)\n@@ -177,12 +180,16 @@ nfp_rtsym_count(struct nfp_rtsym_table *rtbl)\n \treturn rtbl->num;\n }\n \n-/*\n- * nfp_rtsym_get() - Get the Nth RTSYM descriptor\n- * @rtbl:\tNFP RTsym table\n- * @idx:\tIndex (0-based) of the RTSYM descriptor\n+/**\n+ * Get the Nth RTSYM descriptor\n+ *\n+ * @param rtbl\n+ * NFP RTSYM table\n+ * @param idx\n+ * Index (0-based) of the RTSYM descriptor\n *\n- * Return: const pointer to a struct nfp_rtsym descriptor, or NULL\n+ * @return\n+ * Const pointer to a struct nfp_rtsym descriptor, or NULL\n */\n const struct nfp_rtsym *\n nfp_rtsym_get(struct nfp_rtsym_table *rtbl,\n@@ -197,12 +204,16 @@ nfp_rtsym_get(struct nfp_rtsym_table *rtbl,\n \treturn &rtbl->symtab[idx];\n }\n \n-/*\n- * nfp_rtsym_lookup() - Return the RTSYM descriptor for a symbol name\n- * @rtbl:\tNFP RTsym table\n- * @name:\tSymbol name\n+/**\n+ * Return the RTSYM descriptor for a symbol name\n+ *\n+ * @param rtbl\n+ * NFP RTSYM table\n+ * @param name\n+ * Symbol name\n *\n- * Return: const pointer to a struct nfp_rtsym descriptor, or NULL\n+ * @return\n+ * Const pointer to a struct nfp_rtsym descriptor, or NULL\n */\n const struct nfp_rtsym *\n nfp_rtsym_lookup(struct nfp_rtsym_table *rtbl,\n@@ -227,7 +238,8 @@ nfp_rtsym_size(const struct nfp_rtsym *sym)\n \tcase NFP_RTSYM_TYPE_NONE:\n \t\tPMD_DRV_LOG(ERR, \"The type of rtsym '%s' is NONE\", sym->name);\n \t\treturn 0;\n-\tcase NFP_RTSYM_TYPE_OBJECT: /* Fall through */\n+\tcase NFP_RTSYM_TYPE_OBJECT:\n+\t\t/* FALLTHROUGH */\n \tcase NFP_RTSYM_TYPE_FUNCTION:\n \t\treturn sym->size;\n \tcase NFP_RTSYM_TYPE_ABS:\n@@ -327,17 +339,22 @@ nfp_rtsym_readq(struct nfp_cpp *cpp,\n \treturn nfp_cpp_readq(cpp, cpp_id, addr, value);\n }\n \n-/*\n- * nfp_rtsym_read_le() - Read a simple unsigned scalar value from symbol\n- * @rtbl:\tNFP RTsym table\n- * @name:\tSymbol name\n- * @error:\tPointer to error code (optional)\n+/**\n+ * Read a simple unsigned scalar value from symbol\n *\n * Lookup a symbol, map, read it and return it's value. Value of the symbol\n * will be interpreted as a simple little-endian unsigned value. Symbol can\n * be 4 or 8 bytes in size.\n *\n- * Return: value read, on error sets the error and returns ~0ULL.\n+ * @param rtbl\n+ * NFP RTSYM table\n+ * @param name\n+ * Symbol name\n+ * @param error\n+ * Pointer to error code (optional)\n+ *\n+ * @return\n+ * Value read, on error sets the error and returns ~0ULL.\n */\n uint64_t\n nfp_rtsym_read_le(struct nfp_rtsym_table *rtbl,\ndiff --git a/drivers/net/nfp/nfpcore/nfp_rtsym.h b/drivers/net/nfp/nfpcore/nfp_rtsym.h\nindex e7295258b3..ff1facbd17 100644\n--- a/drivers/net/nfp/nfpcore/nfp_rtsym.h\n+++ b/drivers/net/nfp/nfpcore/nfp_rtsym.h\n@@ -31,12 +31,12 @@\n * of \"sram\" symbols for backward compatibility, which are viewed as global.\n */\n struct nfp_rtsym {\n-\tconst char *name;\n-\tuint64_t addr;\n-\tuint64_t size;\n-\tint type;\n-\tint target;\n-\tint domain;\n+\tconst char *name; /**< Symbol name */\n+\tuint64_t addr; /**< Address in the domain/target's address space */\n+\tuint64_t size; /**< Size (in bytes) of the symbol */\n+\tint type; /**< NFP_RTSYM_TYPE_* of the symbol */\n+\tint target; /**< CPP target identifier, or NFP_RTSYM_TARGET_* */\n+\tint domain; /**< CPP target domain */\n };\n \n struct nfp_rtsym_table;\ndiff --git a/drivers/net/nfp/nfpcore/nfp_target.c b/drivers/net/nfp/nfpcore/nfp_target.c\nindex 611848e233..540b242a43 100644\n--- a/drivers/net/nfp/nfpcore/nfp_target.c\n+++ b/drivers/net/nfp/nfpcore/nfp_target.c\n@@ -767,7 +767,7 @@ nfp_encode_basic(uint64_t *addr,\n \t\t/*\n \t\t * Make sure we compare against isldN values by clearing the\n \t\t * LSB. This is what the silicon does.\n-\t\t **/\n+\t\t */\n \t\tisld[0] &= ~1;\n \t\tisld[1] &= ~1;\n \n", "prefixes": [ "v5", "07/26" ] }{ "id": 131609, "url": "