get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1157164,
    "url": "http://patchwork.ozlabs.org/api/patches/1157164/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190903083108.19593-6-anthony.l.nguyen@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": "<20190903083108.19593-6-anthony.l.nguyen@intel.com>",
    "list_archive_url": null,
    "date": "2019-09-03T08:31:05",
    "name": "[S28,v2,6/9] ice: Allow for delayed LLDP MIB change registration",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "f7ba076ac8d1987b0548008d8849a1b4109f29f4",
    "submitter": {
        "id": 68875,
        "url": "http://patchwork.ozlabs.org/api/people/68875/?format=api",
        "name": "Tony Nguyen",
        "email": "anthony.l.nguyen@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/20190903083108.19593-6-anthony.l.nguyen@intel.com/mbox/",
    "series": [
        {
            "id": 128806,
            "url": "http://patchwork.ozlabs.org/api/series/128806/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=128806",
            "date": "2019-09-03T08:31:06",
            "name": "[S28,v2,1/9] ice: Reliably reset VFs",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/128806/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1157164/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1157164/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.133; helo=hemlock.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 hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\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 46NCrC5MrKz9s00\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  4 Sep 2019 03:00:26 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id E12C487E3C;\n\tTue,  3 Sep 2019 17:00:24 +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 PAuBikWTe+c4; Tue,  3 Sep 2019 17:00:22 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 58B9F87E75;\n\tTue,  3 Sep 2019 17:00:22 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 9D7731BF27F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  3 Sep 2019 17:00:18 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 9B04C87E3C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  3 Sep 2019 17:00:18 +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 DwSAbmIQcu1w for <intel-wired-lan@lists.osuosl.org>;\n\tTue,  3 Sep 2019 17:00:17 +0000 (UTC)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id F15D087E8B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue,  3 Sep 2019 17:00:15 +0000 (UTC)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t03 Sep 2019 10:00:13 -0700",
            "from unknown (HELO localhost.jf.intel.com) ([10.166.244.174])\n\tby orsmga006.jf.intel.com with ESMTP; 03 Sep 2019 10:00:13 -0700"
        ],
        "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.64,463,1559545200\"; d=\"scan'208\";a=\"187320662\"",
        "From": "Tony Nguyen <anthony.l.nguyen@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Tue,  3 Sep 2019 01:31:05 -0700",
        "Message-Id": "<20190903083108.19593-6-anthony.l.nguyen@intel.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20190903083108.19593-1-anthony.l.nguyen@intel.com>",
        "References": "<20190903083108.19593-1-anthony.l.nguyen@intel.com>",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH S28 v2 6/9] ice: Allow for delayed LLDP\n\tMIB change registration",
        "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>",
        "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": "From: Dave Ertman <david.m.ertman@intel.com>\n\nAdd an additional boolean parameter to the ice_init_dcb\nfunction.  This boolean controls if the LLDP MIB change\nevents are registered for.  Also, add a new function\ndefined ice_cfg_lldp_mib_change.  The additional function\nis necessary to be able to register for LLDP MIB change\nevents after calling ice_init_dcb.  The net effect of these\ntwo changes is to allow a delayed registration for MIB change\nevents so that the driver is not accepting events before it\nis ready for them.\n\nSigned-off-by: Dave Ertman <david.m.ertman@intel.com>\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice_dcb.c     | 39 ++++++++++++++++++--\n drivers/net/ethernet/intel/ice/ice_dcb.h     | 11 ++----\n drivers/net/ethernet/intel/ice/ice_dcb_lib.c |  4 +-\n drivers/net/ethernet/intel/ice/ice_ethtool.c | 10 ++++-\n drivers/net/ethernet/intel/ice/ice_main.c    |  2 +\n 5 files changed, 51 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_dcb.c b/drivers/net/ethernet/intel/ice/ice_dcb.c\nindex c5ee8d930611..dd7efff121bd 100644\n--- a/drivers/net/ethernet/intel/ice/ice_dcb.c\n+++ b/drivers/net/ethernet/intel/ice/ice_dcb.c\n@@ -60,7 +60,7 @@ ice_aq_get_lldp_mib(struct ice_hw *hw, u8 bridge_type, u8 mib_type, void *buf,\n  * Enable or Disable posting of an event on ARQ when LLDP MIB\n  * associated with the interface changes (0x0A01)\n  */\n-enum ice_status\n+static enum ice_status\n ice_aq_cfg_lldp_mib_change(struct ice_hw *hw, bool ena_update,\n \t\t\t   struct ice_sq_cd *cd)\n {\n@@ -943,10 +943,11 @@ enum ice_status ice_get_dcb_cfg(struct ice_port_info *pi)\n /**\n  * ice_init_dcb\n  * @hw: pointer to the HW struct\n+ * @enable_mib_change: enable MIB change event\n  *\n  * Update DCB configuration from the Firmware\n  */\n-enum ice_status ice_init_dcb(struct ice_hw *hw)\n+enum ice_status ice_init_dcb(struct ice_hw *hw, bool enable_mib_change)\n {\n \tstruct ice_port_info *pi = hw->port_info;\n \tenum ice_status ret = 0;\n@@ -972,9 +973,39 @@ enum ice_status ice_init_dcb(struct ice_hw *hw)\n \t}\n \n \t/* Configure the LLDP MIB change event */\n-\tret = ice_aq_cfg_lldp_mib_change(hw, true, NULL);\n+\tif (enable_mib_change) {\n+\t\tret = ice_aq_cfg_lldp_mib_change(hw, true, NULL);\n+\t\tif (!ret)\n+\t\t\tpi->is_sw_lldp = false;\n+\t}\n+\n+\treturn ret;\n+}\n+\n+/**\n+ * ice_cfg_lldp_mib_change\n+ * @hw: pointer to the HW struct\n+ * @ena_mib: enable/disable MIB change event\n+ *\n+ * Configure (disable/enable) MIB\n+ */\n+enum ice_status ice_cfg_lldp_mib_change(struct ice_hw *hw, bool ena_mib)\n+{\n+\tstruct ice_port_info *pi = hw->port_info;\n+\tenum ice_status ret;\n+\n+\tif (!hw->func_caps.common_cap.dcb)\n+\t\treturn ICE_ERR_NOT_SUPPORTED;\n+\n+\t/* Get DCBX status */\n+\tpi->dcbx_status = ice_get_dcbx_status(hw);\n+\n+\tif (pi->dcbx_status == ICE_DCBX_STATUS_DIS)\n+\t\treturn ICE_ERR_NOT_READY;\n+\n+\tret = ice_aq_cfg_lldp_mib_change(hw, ena_mib, NULL);\n \tif (!ret)\n-\t\tpi->is_sw_lldp = false;\n+\t\tpi->is_sw_lldp = !ena_mib;\n \n \treturn ret;\n }\ndiff --git a/drivers/net/ethernet/intel/ice/ice_dcb.h b/drivers/net/ethernet/intel/ice/ice_dcb.h\nindex 522e1452abe2..ee138f9bdc7c 100644\n--- a/drivers/net/ethernet/intel/ice/ice_dcb.h\n+++ b/drivers/net/ethernet/intel/ice/ice_dcb.h\n@@ -125,7 +125,7 @@ ice_aq_get_dcb_cfg(struct ice_hw *hw, u8 mib_type, u8 bridgetype,\n \t\t   struct ice_dcbx_cfg *dcbcfg);\n enum ice_status ice_get_dcb_cfg(struct ice_port_info *pi);\n enum ice_status ice_set_dcb_cfg(struct ice_port_info *pi);\n-enum ice_status ice_init_dcb(struct ice_hw *hw);\n+enum ice_status ice_init_dcb(struct ice_hw *hw, bool enable_mib_change);\n enum ice_status\n ice_query_port_ets(struct ice_port_info *pi,\n \t\t   struct ice_aqc_port_ets_elem *buf, u16 buf_size,\n@@ -139,9 +139,7 @@ ice_aq_start_lldp(struct ice_hw *hw, bool persist, 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-enum ice_status\n-ice_aq_cfg_lldp_mib_change(struct ice_hw *hw, bool ena_update,\n-\t\t\t   struct ice_sq_cd *cd);\n+enum ice_status ice_cfg_lldp_mib_change(struct ice_hw *hw, bool ena_mib);\n #else /* CONFIG_DCB */\n static inline enum ice_status\n ice_aq_stop_lldp(struct ice_hw __always_unused *hw,\n@@ -172,9 +170,8 @@ ice_aq_start_stop_dcbx(struct ice_hw __always_unused *hw,\n }\n \n static inline enum ice_status\n-ice_aq_cfg_lldp_mib_change(struct ice_hw __always_unused *hw,\n-\t\t\t   bool __always_unused ena_update,\n-\t\t\t   struct ice_sq_cd __always_unused *cd)\n+ice_cfg_lldp_mib_change(struct ice_hw __always_unused *hw,\n+\t\t\tbool __always_unused ena_mib)\n {\n \treturn 0;\n }\ndiff --git a/drivers/net/ethernet/intel/ice/ice_dcb_lib.c b/drivers/net/ethernet/intel/ice/ice_dcb_lib.c\nindex 20f440a64650..97c22d4aae1d 100644\n--- a/drivers/net/ethernet/intel/ice/ice_dcb_lib.c\n+++ b/drivers/net/ethernet/intel/ice/ice_dcb_lib.c\n@@ -318,7 +318,7 @@ void ice_dcb_rebuild(struct ice_pf *pf)\n \t\tgoto dcb_error;\n \t}\n \n-\tice_init_dcb(&pf->hw);\n+\tice_init_dcb(&pf->hw, true);\n \tif (pf->hw.port_info->dcbx_status == ICE_DCBX_STATUS_DIS)\n \t\tpf->hw.port_info->is_sw_lldp = true;\n \telse\n@@ -451,7 +451,7 @@ int ice_init_pf_dcb(struct ice_pf *pf, bool locked)\n \n \tport_info = hw->port_info;\n \n-\terr = ice_init_dcb(hw);\n+\terr = ice_init_dcb(hw, false);\n \tif (err && !port_info->is_sw_lldp) {\n \t\tdev_err(&pf->pdev->dev, \"Error initializing DCB %d\\n\", err);\n \t\tgoto dcb_init_err;\ndiff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c\nindex ae9921b7de7b..d5db1426d484 100644\n--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c\n+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c\n@@ -1206,8 +1206,8 @@ static int ice_set_priv_flags(struct net_device *netdev, u32 flags)\n \t\t\tenum ice_status status;\n \n \t\t\t/* Disable FW LLDP engine */\n-\t\t\tstatus = ice_aq_cfg_lldp_mib_change(&pf->hw, false,\n-\t\t\t\t\t\t\t    NULL);\n+\t\t\tstatus = ice_cfg_lldp_mib_change(&pf->hw, false);\n+\n \t\t\t/* If unregistering for LLDP events fails, this is\n \t\t\t * not an error state, as there shouldn't be any\n \t\t\t * events to respond to.\n@@ -1273,6 +1273,12 @@ static int ice_set_priv_flags(struct net_device *netdev, u32 flags)\n \t\t\t * The FW LLDP engine will now be consuming them.\n \t\t\t */\n \t\t\tice_cfg_sw_lldp(vsi, false, false);\n+\n+\t\t\t/* Register for MIB change events */\n+\t\t\tstatus = ice_cfg_lldp_mib_change(&pf->hw, true);\n+\t\t\tif (status)\n+\t\t\t\tdev_dbg(&pf->pdev->dev,\n+\t\t\t\t\t\"Fail to enable MIB change events\\n\");\n \t\t}\n \t}\n \tclear_bit(ICE_FLAG_ETHTOOL_CTXT, pf->flags);\ndiff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\nindex 8bb3b81876a9..2d92d8591a8a 100644\n--- a/drivers/net/ethernet/intel/ice/ice_main.c\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -2536,6 +2536,8 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent)\n \t\tif (ice_init_pf_dcb(pf, false)) {\n \t\t\tclear_bit(ICE_FLAG_DCB_CAPABLE, pf->flags);\n \t\t\tclear_bit(ICE_FLAG_DCB_ENA, pf->flags);\n+\t\t} else {\n+\t\t\tice_cfg_lldp_mib_change(&pf->hw, true);\n \t\t}\n \t}\n \n",
    "prefixes": [
        "S28",
        "v2",
        "6/9"
    ]
}