get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1137061,
    "url": "http://patchwork.ozlabs.org/api/patches/1137061/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190725095401.24590-7-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": "<20190725095401.24590-7-anthony.l.nguyen@intel.com>",
    "list_archive_url": null,
    "date": "2019-07-25T09:53:56",
    "name": "[S25,07/12] ice: shorten local and add debug prints",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "bb2f6aca2de6d717572734e4113cc3c39398d68f",
    "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/20190725095401.24590-7-anthony.l.nguyen@intel.com/mbox/",
    "series": [
        {
            "id": 121514,
            "url": "http://patchwork.ozlabs.org/api/series/121514/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=121514",
            "date": "2019-07-25T09:53:50",
            "name": "[S25,01/12] ice: update ethtool stats on-demand",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/121514/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1137061/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1137061/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.138; helo=whitealder.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 whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\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 45vgYP346Xz9sDB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 26 Jul 2019 04:22:33 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 0A37382580;\n\tThu, 25 Jul 2019 18:22:32 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id dDNp+zslbPsm; Thu, 25 Jul 2019 18:22:27 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 0DED6874E9;\n\tThu, 25 Jul 2019 18:22:24 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 9D1201BF988\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 25 Jul 2019 18:22:20 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 95B3F86559\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 25 Jul 2019 18:22:20 +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 6R6Y2NaH5osA for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 25 Jul 2019 18:22:18 +0000 (UTC)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 8125F86599\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 25 Jul 2019 18:22:18 +0000 (UTC)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Jul 2019 11:22:17 -0700",
            "from unknown (HELO localhost.jf.intel.com) ([10.166.244.174])\n\tby fmsmga004.fm.intel.com with ESMTP; 25 Jul 2019 11:22:17 -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,307,1559545200\"; d=\"scan'208\";a=\"193897614\"",
        "From": "Tony Nguyen <anthony.l.nguyen@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Thu, 25 Jul 2019 02:53:56 -0700",
        "Message-Id": "<20190725095401.24590-7-anthony.l.nguyen@intel.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20190725095401.24590-1-anthony.l.nguyen@intel.com>",
        "References": "<20190725095401.24590-1-anthony.l.nguyen@intel.com>",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH S25 07/12] ice: shorten local and add\n\tdebug prints",
        "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: Jesse Brandeburg <jesse.brandeburg@intel.com>\n\nAdd some verbose debugging for dyndbg to help us when\nwe are having issues with link and/or PHY.\n\nWhile there, shorten some strings used by locals that\nwere causing long line wrapping.\n\nSigned-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice_common.c | 63 ++++++++++++++-------\n 1 file changed, 44 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c\nindex 4b43e6de847b..302ad981129c 100644\n--- a/drivers/net/ethernet/intel/ice/ice_common.c\n+++ b/drivers/net/ethernet/intel/ice/ice_common.c\n@@ -263,21 +263,23 @@ enum ice_status\n ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse,\n \t\t     struct ice_link_status *link, struct ice_sq_cd *cd)\n {\n-\tstruct ice_link_status *hw_link_info_old, *hw_link_info;\n \tstruct ice_aqc_get_link_status_data link_data = { 0 };\n \tstruct ice_aqc_get_link_status *resp;\n+\tstruct ice_link_status *li_old, *li;\n \tenum ice_media_type *hw_media_type;\n \tstruct ice_fc_info *hw_fc_info;\n \tbool tx_pause, rx_pause;\n \tstruct ice_aq_desc desc;\n \tenum ice_status status;\n+\tstruct ice_hw *hw;\n \tu16 cmd_flags;\n \n \tif (!pi)\n \t\treturn ICE_ERR_PARAM;\n-\thw_link_info_old = &pi->phy.link_info_old;\n+\thw = pi->hw;\n+\tli_old = &pi->phy.link_info_old;\n \thw_media_type = &pi->phy.media_type;\n-\thw_link_info = &pi->phy.link_info;\n+\tli = &pi->phy.link_info;\n \thw_fc_info = &pi->fc;\n \n \tice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_get_link_status);\n@@ -286,27 +288,27 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse,\n \tresp->cmd_flags = cpu_to_le16(cmd_flags);\n \tresp->lport_num = pi->lport;\n \n-\tstatus = ice_aq_send_cmd(pi->hw, &desc, &link_data, sizeof(link_data),\n-\t\t\t\t cd);\n+\tstatus = ice_aq_send_cmd(hw, &desc, &link_data, sizeof(link_data), cd);\n \n \tif (status)\n \t\treturn status;\n \n \t/* save off old link status information */\n-\t*hw_link_info_old = *hw_link_info;\n+\t*li_old = *li;\n \n \t/* update current link status information */\n-\thw_link_info->link_speed = le16_to_cpu(link_data.link_speed);\n-\thw_link_info->phy_type_low = le64_to_cpu(link_data.phy_type_low);\n-\thw_link_info->phy_type_high = le64_to_cpu(link_data.phy_type_high);\n+\tli->link_speed = le16_to_cpu(link_data.link_speed);\n+\tli->phy_type_low = le64_to_cpu(link_data.phy_type_low);\n+\tli->phy_type_high = le64_to_cpu(link_data.phy_type_high);\n \t*hw_media_type = ice_get_media_type(pi);\n-\thw_link_info->link_info = link_data.link_info;\n-\thw_link_info->an_info = link_data.an_info;\n-\thw_link_info->ext_info = link_data.ext_info;\n-\thw_link_info->max_frame_size = le16_to_cpu(link_data.max_frame_size);\n-\thw_link_info->fec_info = link_data.cfg & ICE_AQ_FEC_MASK;\n-\thw_link_info->topo_media_conflict = link_data.topo_media_conflict;\n-\thw_link_info->pacing = link_data.cfg & ICE_AQ_CFG_PACING_M;\n+\tli->link_info = link_data.link_info;\n+\tli->an_info = link_data.an_info;\n+\tli->ext_info = link_data.ext_info;\n+\tli->max_frame_size = le16_to_cpu(link_data.max_frame_size);\n+\tli->fec_info = link_data.cfg & ICE_AQ_FEC_MASK;\n+\tli->topo_media_conflict = link_data.topo_media_conflict;\n+\tli->pacing = link_data.cfg & (ICE_AQ_CFG_PACING_M |\n+\t\t\t\t      ICE_AQ_CFG_PACING_TYPE_M);\n \n \t/* update fc info */\n \ttx_pause = !!(link_data.an_info & ICE_AQ_LINK_PAUSE_TX);\n@@ -320,12 +322,24 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse,\n \telse\n \t\thw_fc_info->current_mode = ICE_FC_NONE;\n \n-\thw_link_info->lse_ena =\n-\t\t!!(resp->cmd_flags & cpu_to_le16(ICE_AQ_LSE_IS_ENABLED));\n+\tli->lse_ena = !!(resp->cmd_flags & cpu_to_le16(ICE_AQ_LSE_IS_ENABLED));\n+\n+\tice_debug(hw, ICE_DBG_LINK, \"link_speed = 0x%x\\n\", li->link_speed);\n+\tice_debug(hw, ICE_DBG_LINK, \"phy_type_low = 0x%llx\\n\",\n+\t\t  (unsigned long long)li->phy_type_low);\n+\tice_debug(hw, ICE_DBG_LINK, \"phy_type_high = 0x%llx\\n\",\n+\t\t  (unsigned long long)li->phy_type_high);\n+\tice_debug(hw, ICE_DBG_LINK, \"media_type = 0x%x\\n\", *hw_media_type);\n+\tice_debug(hw, ICE_DBG_LINK, \"link_info = 0x%x\\n\", li->link_info);\n+\tice_debug(hw, ICE_DBG_LINK, \"an_info = 0x%x\\n\", li->an_info);\n+\tice_debug(hw, ICE_DBG_LINK, \"ext_info = 0x%x\\n\", li->ext_info);\n+\tice_debug(hw, ICE_DBG_LINK, \"lse_ena = 0x%x\\n\", li->lse_ena);\n+\tice_debug(hw, ICE_DBG_LINK, \"max_frame = 0x%x\\n\", li->max_frame_size);\n+\tice_debug(hw, ICE_DBG_LINK, \"pacing = 0x%x\\n\", li->pacing);\n \n \t/* save link status information */\n \tif (link)\n-\t\t*link = *hw_link_info;\n+\t\t*link = *li;\n \n \t/* flag cleared so calling functions don't call AQ again */\n \tpi->phy.get_link_info = false;\n@@ -2000,6 +2014,17 @@ ice_aq_set_phy_cfg(struct ice_hw *hw, u8 lport,\n \tdesc.params.set_phy.lport_num = lport;\n \tdesc.flags |= cpu_to_le16(ICE_AQ_FLAG_RD);\n \n+\tice_debug(hw, ICE_DBG_LINK, \"phy_type_low = 0x%llx\\n\",\n+\t\t  (unsigned long long)le64_to_cpu(cfg->phy_type_low));\n+\tice_debug(hw, ICE_DBG_LINK, \"phy_type_high = 0x%llx\\n\",\n+\t\t  (unsigned long long)le64_to_cpu(cfg->phy_type_high));\n+\tice_debug(hw, ICE_DBG_LINK, \"caps = 0x%x\\n\", cfg->caps);\n+\tice_debug(hw, ICE_DBG_LINK, \"low_power_ctrl = 0x%x\\n\",\n+\t\t  cfg->low_power_ctrl);\n+\tice_debug(hw, ICE_DBG_LINK, \"eee_cap = 0x%x\\n\", cfg->eee_cap);\n+\tice_debug(hw, ICE_DBG_LINK, \"eeer_value = 0x%x\\n\", cfg->eeer_value);\n+\tice_debug(hw, ICE_DBG_LINK, \"link_fec_opt = 0x%x\\n\", cfg->link_fec_opt);\n+\n \treturn ice_aq_send_cmd(hw, &desc, cfg, sizeof(*cfg), cd);\n }\n \n",
    "prefixes": [
        "S25",
        "07/12"
    ]
}