get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2216795,
    "url": "http://patchwork.ozlabs.org/api/patches/2216795/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260327072236.129802-4-aleksandr.loktionov@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": "<20260327072236.129802-4-aleksandr.loktionov@intel.com>",
    "list_archive_url": null,
    "date": "2026-03-27T07:22:35",
    "name": "[iwl-next] ice: fix AQ error code comparison in ice_set_pauseparam()",
    "commit_ref": null,
    "pull_url": null,
    "state": "under-review",
    "archived": false,
    "hash": "020cdb898173db9568c23836de4f9efb63a6bf3a",
    "submitter": {
        "id": 75597,
        "url": "http://patchwork.ozlabs.org/api/people/75597/?format=api",
        "name": "Loktionov, Aleksandr",
        "email": "aleksandr.loktionov@intel.com"
    },
    "delegate": {
        "id": 109701,
        "url": "http://patchwork.ozlabs.org/api/users/109701/?format=api",
        "username": "anguy11",
        "first_name": "Anthony",
        "last_name": "Nguyen",
        "email": "anthony.l.nguyen@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260327072236.129802-4-aleksandr.loktionov@intel.com/mbox/",
    "series": [
        {
            "id": 497704,
            "url": "http://patchwork.ozlabs.org/api/series/497704/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=497704",
            "date": "2026-03-27T07:22:35",
            "name": "[iwl-next] ice: fix AQ error code comparison in ice_set_pauseparam()",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497704/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216795/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216795/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@legolas.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256\n header.s=default header.b=yS5f2Lms;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fhsYP43Qvz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 18:22:49 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id 5F8F083C66;\n\tFri, 27 Mar 2026 07:22:46 +0000 (UTC)",
            "from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id l5-QK02WQJRr; Fri, 27 Mar 2026 07:22:45 +0000 (UTC)",
            "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id 90EA783C44;\n\tFri, 27 Mar 2026 07:22:45 +0000 (UTC)",
            "from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n by lists1.osuosl.org (Postfix) with ESMTP id D40FC249\n for <intel-wired-lan@lists.osuosl.org>; Fri, 27 Mar 2026 07:22:43 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id C5C3C61279\n for <intel-wired-lan@lists.osuosl.org>; Fri, 27 Mar 2026 07:22:43 +0000 (UTC)",
            "from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id LGysrMfPlSJ1 for <intel-wired-lan@lists.osuosl.org>;\n Fri, 27 Mar 2026 07:22:43 +0000 (UTC)",
            "from mgamail.intel.com (mgamail.intel.com [192.198.163.18])\n by smtp3.osuosl.org (Postfix) with ESMTPS id CBF1A611DF\n for <intel-wired-lan@lists.osuosl.org>; Fri, 27 Mar 2026 07:22:42 +0000 (UTC)",
            "from fmviesa008.fm.intel.com ([10.60.135.148])\n by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 27 Mar 2026 00:22:42 -0700",
            "from amlin-019-225.igk.intel.com ([10.102.19.225])\n by fmviesa008.fm.intel.com with ESMTP; 27 Mar 2026 00:22:41 -0700"
        ],
        "X-Virus-Scanned": [
            "amavis at osuosl.org",
            "amavis at osuosl.org"
        ],
        "X-Comment": "SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=<UNKNOWN> ",
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 smtp1.osuosl.org 90EA783C44",
            "OpenDKIM Filter v2.11.0 smtp3.osuosl.org CBF1A611DF"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1774596165;\n\tbh=iD4873NpGb57fGco40CPEG6s5r3mNXzbht9v0CAKjTE=;\n\th=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id:\n\t List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\t From;\n\tb=yS5f2LmsKio1x5rlQbtMpI1vOLbsUNu0JCep+j/urY0PbglaiYYhpv2c2rh9lvSMN\n\t xrct0Hm/pQKxiDZ1ZOjexBJ6rMFXJmYmwbSiZcb8hEXtfzmAAGeJb/aEOcJIFxXB37\n\t sNotfnu9f98eEis+O/Q91eRQjSN7YvYmUBwPx4VbdlUjp+9BNNytw5cM8fN/9T+JYm\n\t Wi97IoGNp3JLktz19IGNDhqunxHsA971y3XqNN4Te+CQ6qPq1Am0oAWeXsBtnmY+vm\n\t eTG533qNXOBCPOWGiykeJwQdupUvkVFEWzEjq/OXeKw88k+YTzxVtAu15LZR3WZFME\n\t AGtIeiEPMiJQg==",
        "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.18;\n helo=mgamail.intel.com; envelope-from=aleksandr.loktionov@intel.com;\n receiver=<UNKNOWN>",
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp3.osuosl.org CBF1A611DF",
        "X-CSE-ConnectionGUID": [
            "WMnhkDNZToKKCB65biiCVg==",
            "955Bkq6PQkykoS+cUp64Ng=="
        ],
        "X-CSE-MsgGUID": [
            "WPo7097BQHeLM5T8/3cWmQ==",
            "t9hH/tsHQxWCvK2Q9LqugQ=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6800,10657,11741\"; a=\"74848620\"",
            "E=Sophos;i=\"6.23,143,1770624000\"; d=\"scan'208\";a=\"74848620\"",
            "E=Sophos;i=\"6.23,143,1770624000\"; d=\"scan'208\";a=\"222359563\""
        ],
        "X-ExtLoop1": "1",
        "From": "Aleksandr Loktionov <aleksandr.loktionov@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com,\n aleksandr.loktionov@intel.com",
        "Cc": "netdev@vger.kernel.org,\n\tLukasz Czapnik <lukasz.czapnik@intel.com>",
        "Date": "Fri, 27 Mar 2026 08:22:35 +0100",
        "Message-ID": "<20260327072236.129802-4-aleksandr.loktionov@intel.com>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20260327072236.129802-1-aleksandr.loktionov@intel.com>",
        "References": "<20260327072236.129802-1-aleksandr.loktionov@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Mailman-Original-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1774596162; x=1806132162;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=NPzE/oAt4YAyOSuZTJ7ABZ8cwWD0xhoFinLo3gs+8r8=;\n b=X85NKgmfVmy5G3E0xZu/QJLLtMZcuN7ZOxFHztOVpBPEt3q1ioQ6q2Mv\n aqgBygls8ukl8jv5v4AFuSufDKI4ZsSbYr8/glLLy0Zw3twmaIA3OHDOF\n Cr5CJ7A0FXpyKTjFxKHJAZfKvncYTkgb0jpQ96Seq5u9OSqSdFOQYP9IC\n KYtNTCtx6ajm8JlJ6dJcOoxKMXhgRM+qbVFPIhkzxCOCGU/XgNY1MZFJy\n 7e0TtJGCGQpryRA/IFGrnkCYsNThJP64QV18ZGQFzjHMiOYtUDdGaWyYT\n Iw5Y1JpqpCEwJDcRHtSPSay4l9II5LcUbl/mL992I5W3XC+w0NBRHyrov\n Q==;",
        "X-Mailman-Original-Authentication-Results": [
            "smtp3.osuosl.org;\n dmarc=pass (p=none dis=none)\n header.from=intel.com",
            "smtp3.osuosl.org;\n dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.a=rsa-sha256 header.s=Intel header.b=X85NKgmf"
        ],
        "Subject": "[Intel-wired-lan] [PATCH iwl-next] ice: fix AQ error code\n comparison in ice_set_pauseparam()",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.30",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <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 <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "From: Lukasz Czapnik <lukasz.czapnik@intel.com>\n\nFix unreachable code: the conditionals in ice_set_pauseparam() used\nthe bitwise-AND operator suggesting aq_failures is a bitmap, but it\nis actually an enum, making the third condition logically unreachable.\n\nReplace the if-else ladder with a switch statement.  Also move the\naq_failures initialization to the variable declaration and remove the\nredundant zeroing from ice_set_fc().\n\nFixes: fcea6f3da546 (\"ice: Add stats and ethtool support\")\nSigned-off-by: Lukasz Czapnik <lukasz.czapnik@intel.com>\nSigned-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>\n---\n\n drivers/net/ethernet/intel/ice/ice_common.c  |  1 -\n drivers/net/ethernet/intel/ice/ice_ethtool.c | 12 ++++++++----\n 2 files changed, 8 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c\nindex f1a6601..6dad7d4 100644\n--- a/drivers/net/ethernet/intel/ice/ice_common.c\n+++ b/drivers/net/ethernet/intel/ice/ice_common.c\n@@ -3883,7 +3883,6 @@ ice_set_fc(struct ice_port_info *pi, u8 *aq_failures, bool ena_auto_link_update)\n \tif (!pi || !aq_failures)\n \t\treturn -EINVAL;\n \n-\t*aq_failures = 0;\n \thw = pi->hw;\n \n \tpcaps = kzalloc_obj(*pcaps);\ndiff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c\nindex 2a4f06f..0cf064c 100644\n--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c\n+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c\n@@ -3501,7 +3501,7 @@ ice_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause)\n \tstruct ice_vsi *vsi = np->vsi;\n \tstruct ice_hw *hw = &pf->hw;\n \tstruct ice_port_info *pi;\n-\tu8 aq_failures;\n+\tu8 aq_failures = 0;\n \tbool link_up;\n \tu32 is_an;\n \tint err;\n@@ -3572,18 +3572,22 @@ ice_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause)\n \t/* Set the FC mode and only restart AN if link is up */\n \terr = ice_set_fc(pi, &aq_failures, link_up);\n \n-\tif (aq_failures & ICE_SET_FC_AQ_FAIL_GET) {\n+\tswitch (aq_failures) {\n+\tcase ICE_SET_FC_AQ_FAIL_GET:\n \t\tnetdev_info(netdev, \"Set fc failed on the get_phy_capabilities call with err %d aq_err %s\\n\",\n \t\t\t    err, libie_aq_str(hw->adminq.sq_last_status));\n \t\terr = -EAGAIN;\n-\t} else if (aq_failures & ICE_SET_FC_AQ_FAIL_SET) {\n+\t\tbreak;\n+\tcase ICE_SET_FC_AQ_FAIL_SET:\n \t\tnetdev_info(netdev, \"Set fc failed on the set_phy_config call with err %d aq_err %s\\n\",\n \t\t\t    err, libie_aq_str(hw->adminq.sq_last_status));\n \t\terr = -EAGAIN;\n-\t} else if (aq_failures & ICE_SET_FC_AQ_FAIL_UPDATE) {\n+\t\tbreak;\n+\tcase ICE_SET_FC_AQ_FAIL_UPDATE:\n \t\tnetdev_info(netdev, \"Set fc failed on the get_link_info call with err %d aq_err %s\\n\",\n \t\t\t    err, libie_aq_str(hw->adminq.sq_last_status));\n \t\terr = -EAGAIN;\n+\t\tbreak;\n \t}\n \n \treturn err;\n",
    "prefixes": [
        "iwl-next"
    ]
}