From mboxrd@z Thu Jan 1 00:00:00 1970 List-Id: Return-Path: Received: from localhost (localhost [127.0.0.1]) by mail.ignore.pl (Postfix) with ESMTP id ADAB64124E for ; Mon, 19 Jan 2026 16:16:50 +0000 (UTC) X-Virus-Scanned: Debian amavis at ignore.pl Received: from mail.ignore.pl ([127.0.0.1]) by localhost (geidontei.ignore.pl [127.0.0.1]) (amavis, port 10024) with ESMTP id YfvSbNSJjIcz for ; Mon, 19 Jan 2026 16:16:49 +0000 (UTC) Authentication-Results: mail.ignore.pl; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=gKy01ann; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) by mail.ignore.pl (Postfix) with ESMTPS id 7C18242FB0 for ; Mon, 19 Jan 2026 16:16:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1768839407; x=1800375407; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KLqGn4QvnSlDOca7ppV2st5ym8nQJLr5eex7QRcTW8s=; b=gKy01ann+1HBKu9gPgfalEayRQihYRxpsG/oJ6nUhQ+Dv70iD0K9b4jS u5uaqoZTJB8egDV8hSfk/o/Z8iK+uzR4VHCJX5qWAgwHHmV7h3H2H9KAm hFNjs426yRN0W9F6k9kRlvdYq012ahOi6tIHvjVPOscAGXYVTTQxJH3m+ HPr8LsqkRhga0aoRE2AwXd98nbE5umUcDRyR5MNkjucH1gwXNMmJFCSp1 ZHMOwEW6yX6bnT5pZ8ZXEfHEXI23p8P1crLTxTTLTTBEhnNJ95Eflz9/s yNEl0gajq+TYS9EiY0YcIfZFRuGrdxusrXeEyMs7h3WBF1t1uVM9QhOzf g==; X-CSE-ConnectionGUID: V9czKeq1Rhii0xbcg3aH/g== X-CSE-MsgGUID: n+jA5I+OTx+cOoke9w+ZRw== X-IronPort-AV: E=McAfee;i="6800,10657,11676"; a="69960187" X-IronPort-AV: E=Sophos;i="6.21,238,1763452800"; d="scan'208";a="69960187" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2026 08:16:46 -0800 X-CSE-ConnectionGUID: BRdKR+HkSgGQOdRWiDekJg== X-CSE-MsgGUID: oEY07sncSm+n1k1/UV3/DQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,238,1763452800"; d="scan'208";a="206155238" Received: from soc-5cg4396xfb.clients.intel.com ([172.28.180.200]) by fmviesa008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2026 08:16:47 -0800 From: Dawid Osuchowski To: patches@ignore.pl Cc: Dawid Osuchowski Subject: [PATCH what v2 1/2] ice: extract extended_phy_capabilities into a separate file Date: Mon, 19 Jan 2026 17:16:29 +0100 Message-ID: <20260119161630.20162-2-dawid.osuchowski@linux.intel.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260119161630.20162-1-dawid.osuchowski@linux.intel.com> References: <20260119161630.20162-1-dawid.osuchowski@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Allows to include them in other opcodes without code duplication. Signed-off-by: Dawid Osuchowski --- v2: - everything, as this didn't exist in v1 what/ice/extended_phy_capabilities.lua | 104 ++++++++++++++++++++++++ what/ice/opcodes/0x0607.lua | 107 +------------------------ 2 files changed, 105 insertions(+), 106 deletions(-) create mode 100644 what/ice/extended_phy_capabilities.lua diff --git a/what/ice/extended_phy_capabilities.lua b/what/ice/extended_phy_capabilities.lua new file mode 100644 index 000000000000..52d9d7d5af5a --- /dev/null +++ b/what/ice/extended_phy_capabilities.lua @@ -0,0 +1,104 @@ +--- 3.3.3.2.1 Extended PHY Capabilities 128-Bit Word Structure[E810] +--- Table 3-90. 128-Bit Word Extended PHY Capabilities[E810] +return { + -- Word[0]: + "100BASE-TX", + "100M-SGMII", + "1000BASE-T", + "1000BASE-SX", + "1000BASE-LX", + "1000BASE-KX", + "1G-SGMII", + nil, -- Reserved + nil, + nil, + "5GBASE-T", + "5GBASE-KR", + nil, + "10G-SFI-DA", + "10GBASE-SR", + "10GBASE-LR", + "10GBASE-KR", + "10G-SFI-AOC/ACC", + "10G-SFI-C2C", + nil, + "25GBASE-CR", + "25GBASE-CR-S", + "25GBASE-CR1", + "25GBASE-SR", + "25GBASE-LR", + "25GBASE-KR", + "25GBASE-KR-S", + "25GBASE-KR1", + "25G-AUI-AOC/ACC", + "25G-AUI-C2C", + nil, + nil, + -- Word[1]: + nil, + nil, + nil, + nil, + "50GBASE-CR2", + "50G-LAUI2-AOC/ACC w/CL133 PCS", + "50G-LAUI2 w/CL133 PCS", + "50GBASE-KR2", + "50G-LAUI2-AOC/ACC", + "50G-LAUI2", + "50G-AUI2-AOC/ACC", + "50G-AUI2", + "50GBASE-CP", + "50GBASE-SR", + "50GBASE-FR", + "50GBASE-LR", + "50GBASE-KR-PAM4", + "50G-AUI1-AOC/ACC", + "50G-AUI1", + "100GBASE-CR4", + "100GBASE-SR4", + "100GBASE-LR4", + "100GBASE-KR4", + "100G-CAUI4-AOC/ACC", + "100G-CAUI4", + "100G-AUI4-AOC/ACC", + "100G-AUI4", + "100GBASE-DR [CAUI4]", + "100GBASE-KR4-PAM4", + "100GBASE-CR2", + "100GBASE-SR2", + "100GBASE-DR [AUI2]", + -- Word[2]: + "100GBASE-KR2-PAM4", + nil, + nil, + "100G-AUI2-AOC/ACC", + "100G-AUI2", + "100GBASE-CR1", + "100GBASE-KR1", + "100GBASE-SR1[30m]", + "100GBASE-SR1[100m]", + "100GBASE-LR", + "100GBASE-FR", + "100GBASE-DR [AUI1]", + "100GBASE-AUI1-AOC/ACC", + "100G-AUI1-C2C", + "200G-AUI8-AOC/ACC", + "200G-AUI8", + "200GBASE-CR4-PAM4", + "200GBASE-SR4", + "200GBASE-FR4", + "200GBASE-LR4", + "200GBASE-DR4", + "200GBASE-KR4-PAM4", + "200G-AUI4-AOC/ACC", + "200G-AUI4", + "200G-CR2", + "200GBASE-KR2", + "200GBASE-SR2[30m]", + "200GBASE-SR2[100m]", + "200GBASE-DR2", + "200GBASE-AUI2-AOC/ACC", + "200G-AUI2-C2C", + nil, + -- Word[3]: every bit is Reserved +} diff --git a/what/ice/opcodes/0x0607.lua b/what/ice/opcodes/0x0607.lua index 374326a3472a..4848258f7ba1 100644 --- a/what/ice/opcodes/0x0607.lua +++ b/what/ice/opcodes/0x0607.lua @@ -1,6 +1,7 @@ local dis = require "what.dissecting" local bits = require "what.bits" local flags = require "what.ice.flags" +local extended_phy_capabilities = require "what.ice.extended_phy_capabilities" local bit = bits.bit local get_link_status = {} local dump = [[ @@ -49,112 +50,6 @@ function get_link_status:dump_command_flags () end ---- 3.3.3.2.1 Extended PHY Capabilities 128-Bit Word Structure[E810] ---- Table 3-90. 128-Bit Word Extended PHY Capabilities[E810] -local extended_phy_capabilities = { - -- Word[0]: - "100BASE-TX", - "100M-SGMII", - "1000BASE-T", - "1000BASE-SX", - "1000BASE-LX", - "1000BASE-KX", - "1G-SGMII", - nil, -- Reserved - nil, - nil, - "5GBASE-T", - "5GBASE-KR", - nil, - "10G-SFI-DA", - "10GBASE-SR", - "10GBASE-LR", - "10GBASE-KR", - "10G-SFI-AOC/ACC", - "10G-SFI-C2C", - nil, - "25GBASE-CR", - "25GBASE-CR-S", - "25GBASE-CR1", - "25GBASE-SR", - "25GBASE-LR", - "25GBASE-KR", - "25GBASE-KR-S", - "25GBASE-KR1", - "25G-AUI-AOC/ACC", - "25G-AUI-C2C", - nil, - nil, - -- Word[1]: - nil, - nil, - nil, - nil, - "50GBASE-CR2", - "50G-LAUI2-AOC/ACC w/CL133 PCS", - "50G-LAUI2 w/CL133 PCS", - "50GBASE-KR2", - "50G-LAUI2-AOC/ACC", - "50G-LAUI2", - "50G-AUI2-AOC/ACC", - "50G-AUI2", - "50GBASE-CP", - "50GBASE-SR", - "50GBASE-FR", - "50GBASE-LR", - "50GBASE-KR-PAM4", - "50G-AUI1-AOC/ACC", - "50G-AUI1", - "100GBASE-CR4", - "100GBASE-SR4", - "100GBASE-LR4", - "100GBASE-KR4", - "100G-CAUI4-AOC/ACC", - "100G-CAUI4", - "100G-AUI4-AOC/ACC", - "100G-AUI4", - "100GBASE-DR [CAUI4]", - "100GBASE-KR4-PAM4", - "100GBASE-CR2", - "100GBASE-SR2", - "100GBASE-DR [AUI2]", - -- Word[2]: - "100GBASE-KR2-PAM4", - nil, - nil, - "100G-AUI2-AOC/ACC", - "100G-AUI2", - "100GBASE-CR1", - "100GBASE-KR1", - "100GBASE-SR1[30m]", - "100GBASE-SR1[100m]", - "100GBASE-LR", - "100GBASE-FR", - "100GBASE-DR [AUI1]", - "100GBASE-AUI1-AOC/ACC", - "100G-AUI1-C2C", - "200G-AUI8-AOC/ACC", - "200G-AUI8", - "200GBASE-CR4-PAM4", - "200GBASE-SR4", - "200GBASE-FR4", - "200GBASE-LR4", - "200GBASE-DR4", - "200GBASE-KR4-PAM4", - "200G-AUI4-AOC/ACC", - "200G-AUI4", - "200G-CR2", - "200GBASE-KR2", - "200GBASE-SR2[30m]", - "200GBASE-SR2[100m]", - "200GBASE-DR2", - "200GBASE-AUI2-AOC/ACC", - "200G-AUI2-C2C", - nil, - -- Word[3]: every bit is Reserved -} - - local function bit_toggle (entries, count, offset) offset = offset or 0 -- 2.52.0