Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1049832/?format=api
{ "id": 1049832, "url": "http://patchwork.ozlabs.org/api/patches/1049832/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190228232432.31659-2-anirudh.venkataramanan@intel.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20190228232432.31659-2-anirudh.venkataramanan@intel.com>", "list_archive_url": null, "date": "2019-02-28T23:24:22", "name": "[S16,01/11] ice: Add code for DCB initialization part 1/4", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "966b6166549ec64bb8142467340c74578ea5fb20", "submitter": { "id": 73601, "url": "http://patchwork.ozlabs.org/api/people/73601/?format=api", "name": "Anirudh Venkataramanan", "email": "anirudh.venkataramanan@intel.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190228232432.31659-2-anirudh.venkataramanan@intel.com/mbox/", "series": [ { "id": 94826, "url": "http://patchwork.ozlabs.org/api/series/94826/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=94826", "date": "2019-02-28T23:24:25", "name": "Add support for Data Center Bridging (DCB)", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/94826/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1049832/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1049832/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.137; helo=fraxinus.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com" ], "Received": [ "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 449TCs5kw0z9sCJ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 1 Mar 2019 10:24:41 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 3264B85F09;\n\tThu, 28 Feb 2019 23:24:39 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id nw9kDAnYnwCc; Thu, 28 Feb 2019 23:24:36 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 839EA85A88;\n\tThu, 28 Feb 2019 23:24:36 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 9912D1BF410\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 28 Feb 2019 23:24:35 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 96AE1879C5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 28 Feb 2019 23:24:35 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id P3heBbLhkfz6 for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 28 Feb 2019 23:24:34 +0000 (UTC)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 613CA877E2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 28 Feb 2019 23:24:34 +0000 (UTC)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t28 Feb 2019 15:24:33 -0800", "from shasta.jf.intel.com ([10.166.241.11])\n\tby FMSMGA003.fm.intel.com with ESMTP; 28 Feb 2019 15:24:33 -0800" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.58,425,1544515200\"; d=\"scan'208\";a=\"137127717\"", "From": "Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Thu, 28 Feb 2019 15:24:22 -0800", "Message-Id": "<20190228232432.31659-2-anirudh.venkataramanan@intel.com>", "X-Mailer": "git-send-email 2.14.5", "In-Reply-To": "<20190228232432.31659-1-anirudh.venkataramanan@intel.com>", "References": "<20190228232432.31659-1-anirudh.venkataramanan@intel.com>", "Subject": "[Intel-wired-lan] [PATCH S16 01/11] ice: Add code for DCB\n\tinitialization part 1/4", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "This patch introduces a skeleton for ice_init_pf_dcb, the top level\nfunction for DCB initialization. Subsequent patches will add to this\nDCB init flow.\n\nIn this patch, ice_init_pf_dcb checks if DCB is a supported capability.\nIf so, an admin queue call to start the LLDP and DCBx in firmware is\nissued. If not, an error is reported. Note that we don't fail the driver\ninit if DCB init fails.\n\nReviewed-by: Bruce Allan <bruce.w.allan@intel.com>\nSigned-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>\n---\n drivers/net/ethernet/intel/ice/Makefile | 1 +\n drivers/net/ethernet/intel/ice/ice.h | 3 +\n drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 26 ++++++++\n drivers/net/ethernet/intel/ice/ice_dcb.c | 85 +++++++++++++++++++++++++\n drivers/net/ethernet/intel/ice/ice_dcb.h | 37 +++++++++++\n drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 42 ++++++++++++\n drivers/net/ethernet/intel/ice/ice_dcb_lib.h | 19 ++++++\n drivers/net/ethernet/intel/ice/ice_hw_autogen.h | 3 +\n drivers/net/ethernet/intel/ice/ice_main.c | 10 +++\n drivers/net/ethernet/intel/ice/ice_type.h | 4 ++\n 10 files changed, 230 insertions(+)\n create mode 100644 drivers/net/ethernet/intel/ice/ice_dcb.c\n create mode 100644 drivers/net/ethernet/intel/ice/ice_dcb.h\n create mode 100644 drivers/net/ethernet/intel/ice/ice_dcb_lib.c\n create mode 100644 drivers/net/ethernet/intel/ice/ice_dcb_lib.h", "diff": "diff --git a/drivers/net/ethernet/intel/ice/Makefile b/drivers/net/ethernet/intel/ice/Makefile\nindex e5d6f684437e..2d140ba83781 100644\n--- a/drivers/net/ethernet/intel/ice/Makefile\n+++ b/drivers/net/ethernet/intel/ice/Makefile\n@@ -17,3 +17,4 @@ ice-y := ice_main.o\t\\\n \t ice_txrx.o\t\\\n \t ice_ethtool.o\n ice-$(CONFIG_PCI_IOV) += ice_virtchnl_pf.o ice_sriov.o\n+ice-$(CONFIG_DCB) += ice_dcb.o ice_dcb_lib.o\ndiff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h\nindex c04debc1a0ea..d76333c808a3 100644\n--- a/drivers/net/ethernet/intel/ice/ice.h\n+++ b/drivers/net/ethernet/intel/ice/ice.h\n@@ -34,6 +34,7 @@\n #include \"ice_devids.h\"\n #include \"ice_type.h\"\n #include \"ice_txrx.h\"\n+#include \"ice_dcb.h\"\n #include \"ice_switch.h\"\n #include \"ice_common.h\"\n #include \"ice_sched.h\"\n@@ -321,6 +322,8 @@ enum ice_pf_flags {\n \tICE_FLAG_RSS_ENA,\n \tICE_FLAG_SRIOV_ENA,\n \tICE_FLAG_SRIOV_CAPABLE,\n+\tICE_FLAG_DCB_CAPABLE,\n+\tICE_FLAG_DCB_ENA,\n \tICE_FLAG_LINK_DOWN_ON_CLOSE_ENA,\n \tICE_PF_FLAGS_NBITS\t\t/* must be last */\n };\ndiff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h\nindex 757848f85072..4809e5ac55f4 100644\n--- a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h\n+++ b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h\n@@ -1132,6 +1132,27 @@ struct ice_aqc_pf_vf_msg {\n \t__le32 addr_low;\n };\n \n+/* Start LLDP (direct 0x0A06) */\n+struct ice_aqc_lldp_start {\n+\tu8 command;\n+#define ICE_AQ_LLDP_AGENT_START\t\tBIT(0)\n+#define ICE_AQ_LLDP_AGENT_PERSIST_ENA\tBIT(1)\n+\tu8 reserved[15];\n+};\n+\n+/* Stop/Start LLDP Agent (direct 0x0A09)\n+ * Used for stopping/starting specific LLDP agent. e.g. DCBx.\n+ * The same structure is used for the response, with the command field\n+ * being used as the status field.\n+ */\n+struct ice_aqc_lldp_stop_start_specific_agent {\n+\tu8 command;\n+#define ICE_AQC_START_STOP_AGENT_M\t\tBIT(0)\n+#define ICE_AQC_START_STOP_AGENT_STOP_DCBX\t0\n+#define ICE_AQC_START_STOP_AGENT_START_DCBX\tICE_AQC_START_STOP_AGENT_M\n+\tu8 reserved[15];\n+};\n+\n /* Get/Set RSS key (indirect 0x0B04/0x0B02) */\n struct ice_aqc_get_set_rss_key {\n #define ICE_AQC_GSET_RSS_KEY_VSI_VALID\tBIT(15)\n@@ -1390,6 +1411,8 @@ struct ice_aq_desc {\n \t\tstruct ice_aqc_query_txsched_res query_sched_res;\n \t\tstruct ice_aqc_nvm nvm;\n \t\tstruct ice_aqc_pf_vf_msg virt;\n+\t\tstruct ice_aqc_lldp_start lldp_start;\n+\t\tstruct ice_aqc_lldp_stop_start_specific_agent lldp_agent_ctrl;\n \t\tstruct ice_aqc_get_set_rss_lut get_set_rss_lut;\n \t\tstruct ice_aqc_get_set_rss_key get_set_rss_key;\n \t\tstruct ice_aqc_add_txqs add_txqs;\n@@ -1491,6 +1514,9 @@ enum ice_adminq_opc {\n \t/* PF/VF mailbox commands */\n \tice_mbx_opc_send_msg_to_pf\t\t\t= 0x0801,\n \tice_mbx_opc_send_msg_to_vf\t\t\t= 0x0802,\n+\t/* LLDP commands */\n+\tice_aqc_opc_lldp_start\t\t\t\t= 0x0A06,\n+\tice_aqc_opc_lldp_stop_start_specific_agent\t= 0x0A09,\n \n \t/* RSS commands */\n \tice_aqc_opc_set_rss_key\t\t\t\t= 0x0B02,\ndiff --git a/drivers/net/ethernet/intel/ice/ice_dcb.c b/drivers/net/ethernet/intel/ice/ice_dcb.c\nnew file mode 100644\nindex 000000000000..19ab7433e330\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/ice/ice_dcb.c\n@@ -0,0 +1,85 @@\n+// SPDX-License-Identifier: GPL-2.0\n+/* Copyright (c) 2018, Intel Corporation. */\n+\n+#include \"ice_common.h\"\n+#include \"ice_sched.h\"\n+#include \"ice_dcb.h\"\n+\n+/**\n+ * ice_aq_start_lldp\n+ * @hw: pointer to the HW struct\n+ * @cd: pointer to command details structure or NULL\n+ *\n+ * Start the embedded LLDP Agent on all ports. (0x0A06)\n+ */\n+enum ice_status ice_aq_start_lldp(struct ice_hw *hw, struct ice_sq_cd *cd)\n+{\n+\tstruct ice_aqc_lldp_start *cmd;\n+\tstruct ice_aq_desc desc;\n+\n+\tcmd = &desc.params.lldp_start;\n+\n+\tice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_lldp_start);\n+\n+\tcmd->command = ICE_AQ_LLDP_AGENT_START;\n+\n+\treturn ice_aq_send_cmd(hw, &desc, NULL, 0, cd);\n+}\n+\n+/**\n+ * ice_get_dcbx_status\n+ * @hw: pointer to the HW struct\n+ *\n+ * Get the DCBX status from the Firmware\n+ */\n+u8 ice_get_dcbx_status(struct ice_hw *hw)\n+{\n+\tu32 reg;\n+\n+\treg = rd32(hw, PRTDCB_GENS);\n+\treturn (u8)((reg & PRTDCB_GENS_DCBX_STATUS_M) >>\n+\t\t PRTDCB_GENS_DCBX_STATUS_S);\n+}\n+\n+/**\n+ * ice_aq_start_stop_dcbx - Start/Stop DCBx service in FW\n+ * @hw: pointer to the HW struct\n+ * @start_dcbx_agent: True if DCBx Agent needs to be started\n+ *\t\t False if DCBx Agent needs to be stopped\n+ * @dcbx_agent_status: FW indicates back the DCBx agent status\n+ *\t\t True if DCBx Agent is active\n+ *\t\t False if DCBx Agent is stopped\n+ * @cd: pointer to command details structure or NULL\n+ *\n+ * Start/Stop the embedded dcbx Agent. In case that this wrapper function\n+ * returns ICE_SUCCESS, caller will need to check if FW returns back the same\n+ * value as stated in dcbx_agent_status, and react accordingly. (0x0A09)\n+ */\n+enum ice_status\n+ice_aq_start_stop_dcbx(struct ice_hw *hw, bool start_dcbx_agent,\n+\t\t bool *dcbx_agent_status, struct ice_sq_cd *cd)\n+{\n+\tstruct ice_aqc_lldp_stop_start_specific_agent *cmd;\n+\tenum ice_status status;\n+\tstruct ice_aq_desc desc;\n+\tu16 opcode;\n+\n+\tcmd = &desc.params.lldp_agent_ctrl;\n+\n+\topcode = ice_aqc_opc_lldp_stop_start_specific_agent;\n+\n+\tice_fill_dflt_direct_cmd_desc(&desc, opcode);\n+\n+\tif (start_dcbx_agent)\n+\t\tcmd->command = ICE_AQC_START_STOP_AGENT_START_DCBX;\n+\n+\tstatus = ice_aq_send_cmd(hw, &desc, NULL, 0, cd);\n+\n+\t*dcbx_agent_status = false;\n+\n+\tif (!status &&\n+\t cmd->command == ICE_AQC_START_STOP_AGENT_START_DCBX)\n+\t\t*dcbx_agent_status = true;\n+\n+\treturn status;\n+}\ndiff --git a/drivers/net/ethernet/intel/ice/ice_dcb.h b/drivers/net/ethernet/intel/ice/ice_dcb.h\nnew file mode 100644\nindex 000000000000..05ed9fd2fe38\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/ice/ice_dcb.h\n@@ -0,0 +1,37 @@\n+/* SPDX-License-Identifier: GPL-2.0 */\n+/* Copyright (c) 2018, Intel Corporation. */\n+\n+#ifndef _ICE_DCB_H_\n+#define _ICE_DCB_H_\n+\n+#include \"ice_type.h\"\n+\n+#define ICE_DCBX_STATUS_IN_PROGRESS\t1\n+#define ICE_DCBX_STATUS_DONE\t\t2\n+\n+u8 ice_get_dcbx_status(struct ice_hw *hw);\n+#ifdef CONFIG_DCB\n+enum ice_status ice_aq_start_lldp(struct ice_hw *hw, struct ice_sq_cd *cd);\n+enum ice_status\n+ice_aq_start_stop_dcbx(struct ice_hw *hw, bool start_dcbx_agent,\n+\t\t bool *dcbx_agent_status, struct ice_sq_cd *cd);\n+#else /* CONFIG_DCB */\n+static inline enum ice_status\n+ice_aq_start_lldp(struct ice_hw __always_unused *hw,\n+\t\t struct ice_sq_cd __always_unused *cd)\n+{\n+\treturn 0;\n+}\n+\n+static inline enum ice_status\n+ice_aq_start_stop_dcbx(struct ice_hw __always_unused *hw,\n+\t\t bool __always_unused start_dcbx_agent,\n+\t\t bool *dcbx_agent_status,\n+\t\t struct ice_sq_cd __always_unused *cd)\n+{\n+\t*dcbx_agent_status = false;\n+\n+\treturn 0;\n+}\n+#endif /* CONFIG_DCB */\n+#endif /* _ICE_DCB_H_ */\ndiff --git a/drivers/net/ethernet/intel/ice/ice_dcb_lib.c b/drivers/net/ethernet/intel/ice/ice_dcb_lib.c\nnew file mode 100644\nindex 000000000000..424a745d9783\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/ice/ice_dcb_lib.c\n@@ -0,0 +1,42 @@\n+// SPDX-License-Identifier: GPL-2.0\n+/* Copyright (c) 2018, Intel Corporation. */\n+\n+#include \"ice_dcb_lib.h\"\n+\n+/**\n+ * ice_init_pf_dcb - initialize DCB for a PF\n+ * @pf: pf to initiialize DCB for\n+ */\n+int ice_init_pf_dcb(struct ice_pf *pf)\n+{\n+\tstruct device *dev = &pf->pdev->dev;\n+\tstruct ice_port_info *port_info;\n+\tstruct ice_hw *hw = &pf->hw;\n+\n+\tport_info = hw->port_info;\n+\n+\t/* check if device is DCB capable */\n+\tif (!hw->func_caps.common_cap.dcb) {\n+\t\tdev_dbg(dev, \"DCB not supported\\n\");\n+\t\treturn -EOPNOTSUPP;\n+\t}\n+\n+\t/* Best effort to put DCBx and LLDP into a good state */\n+\tport_info->dcbx_status = ice_get_dcbx_status(hw);\n+\tif (port_info->dcbx_status != ICE_DCBX_STATUS_DONE &&\n+\t port_info->dcbx_status != ICE_DCBX_STATUS_IN_PROGRESS) {\n+\t\tbool dcbx_status;\n+\n+\t\t/* Attempt to start LLDP engine. Ignore errors\n+\t\t * as this will error if it is already started\n+\t\t */\n+\t\tice_aq_start_lldp(hw, NULL);\n+\n+\t\t/* Attempt to start DCBX. Ignore errors as this\n+\t\t * will error if it is already started\n+\t\t */\n+\t\tice_aq_start_stop_dcbx(hw, true, &dcbx_status, NULL);\n+\t}\n+\n+\treturn 0;\n+}\ndiff --git a/drivers/net/ethernet/intel/ice/ice_dcb_lib.h b/drivers/net/ethernet/intel/ice/ice_dcb_lib.h\nnew file mode 100644\nindex 000000000000..592811b7c61a\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/ice/ice_dcb_lib.h\n@@ -0,0 +1,19 @@\n+/* SPDX-License-Identifier: GPL-2.0 */\n+/* Copyright (c) 2018, Intel Corporation. */\n+\n+#ifndef _ICE_DCB_LIB_H_\n+#define _ICE_DCB_LIB_H_\n+\n+#include \"ice.h\"\n+#include \"ice_lib.h\"\n+\n+#ifdef CONFIG_DCB\n+int ice_init_pf_dcb(struct ice_pf *pf);\n+#else\n+static inline int ice_init_pf_dcb(struct ice_pf *pf)\n+{\n+\tdev_dbg(&pf->pdev->dev, \"DCB not supported\\n\");\n+\treturn -EOPNOTSUPP;\n+}\n+#endif /* CONFIG_DCB */\n+#endif /* _ICE_DCB_LIB_H_ */\ndiff --git a/drivers/net/ethernet/intel/ice/ice_hw_autogen.h b/drivers/net/ethernet/intel/ice/ice_hw_autogen.h\nindex af6f32358363..dfc180d2b282 100644\n--- a/drivers/net/ethernet/intel/ice/ice_hw_autogen.h\n+++ b/drivers/net/ethernet/intel/ice/ice_hw_autogen.h\n@@ -49,6 +49,9 @@\n #define PF_MBX_ATQLEN_ATQLEN_M\t\t\tICE_M(0x3FF, 0)\n #define PF_MBX_ATQLEN_ATQENABLE_M\t\tBIT(31)\n #define PF_MBX_ATQT\t\t\t\t0x0022E300\n+#define PRTDCB_GENS\t\t\t\t0x00083020\n+#define PRTDCB_GENS_DCBX_STATUS_S\t\t0\n+#define PRTDCB_GENS_DCBX_STATUS_M\t\tICE_M(0x7, 0)\n #define GLFLXP_RXDID_FLAGS(_i, _j)\t\t(0x0045D000 + ((_i) * 4 + (_j) * 256))\n #define GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_S\t0\n #define GLFLXP_RXDID_FLAGS_FLEXIFLAG_4N_M\tICE_M(0x3F, 0)\ndiff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\nindex d7dafd355e57..72fc6e702ab5 100644\n--- a/drivers/net/ethernet/intel/ice/ice_main.c\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -7,6 +7,7 @@\n \n #include \"ice.h\"\n #include \"ice_lib.h\"\n+#include \"ice_dcb_lib.h\"\n \n #define DRV_VERSION\t\"0.7.3-k\"\n #define DRV_SUMMARY\t\"Intel(R) Ethernet Connection E800 Series Linux Driver\"\n@@ -2285,6 +2286,15 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent)\n \n \tice_init_pf(pf);\n \n+\terr = ice_init_pf_dcb(pf);\n+\tif (err) {\n+\t\tclear_bit(ICE_FLAG_DCB_CAPABLE, pf->flags);\n+\t\tclear_bit(ICE_FLAG_DCB_ENA, pf->flags);\n+\n+\t\t/* do not fail overall init if DCB init fails */\n+\t\terr = 0;\n+\t}\n+\n \tice_determine_q_usage(pf);\n \n \tpf->num_alloc_vsi = hw->func_caps.guar_num_vsi;\ndiff --git a/drivers/net/ethernet/intel/ice/ice_type.h b/drivers/net/ethernet/intel/ice/ice_type.h\nindex 119fda5674cc..e21ea271b48e 100644\n--- a/drivers/net/ethernet/intel/ice/ice_type.h\n+++ b/drivers/net/ethernet/intel/ice/ice_type.h\n@@ -148,6 +148,8 @@ struct ice_hw_common_caps {\n \t/* RSS related capabilities */\n \tu16 rss_table_size;\t\t/* 512 for PFs and 64 for VFs */\n \tu8 rss_table_entry_width;\t/* RSS Entry width in bits */\n+\n+\tu8 dcb;\n };\n \n /* Function specific capabilities */\n@@ -277,6 +279,8 @@ struct ice_port_info {\n \tstruct ice_mac_info mac;\n \tstruct ice_phy_info phy;\n \tstruct mutex sched_lock;\t/* protect access to TXSched tree */\n+\t/* LLDP/DCBX Status */\n+\tu8 dcbx_status;\n \tu8 lport;\n #define ICE_LPORT_MASK\t\t0xff\n \tu8 is_vf;\n", "prefixes": [ "S16", "01/11" ] }