public inbox for patches@ignore.pl
 help / color / mirror / Atom feed
From: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
To: patches@ignore.pl
Cc: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
Subject: [PATCH what v2 1/2] ice: extract extended_phy_capabilities into a separate file
Date: Mon, 19 Jan 2026 17:16:29 +0100	[thread overview]
Message-ID: <20260119161630.20162-2-dawid.osuchowski@linux.intel.com> (raw)
In-Reply-To: <20260119161630.20162-1-dawid.osuchowski@linux.intel.com>

Allows to include them in other opcodes without code duplication.

Signed-off-by: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
---
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


  reply	other threads:[~2026-01-19 16:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-19 16:16 [PATCH what v2 0/2] ice: implement support for 0x0601 opcode Dawid Osuchowski
2026-01-19 16:16 ` Dawid Osuchowski [this message]
2026-01-19 16:16 ` [PATCH what v2 2/2] " Dawid Osuchowski
2026-01-19 17:08 ` [PATCH what v2 0/2] " Aki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260119161630.20162-2-dawid.osuchowski@linux.intel.com \
    --to=dawid.osuchowski@linux.intel.com \
    --cc=patches@ignore.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox