Skip to contentSkip to conversation

igc: Support ACPI-based MAC passthrough

PATCH Superseded Dima Ruinskiy 1 participant 1 message Aug 23

Subsystems (3)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 igc: Support ACPI-based MAC passthrough

Some systems implement a system MAC address object in the ACPI table, using either \\_SB.AMAC or \\MACA object names. This system MAC address, when enabled, is intended to override the permanent MAC address of a network controller in a docking station connected to the system.

Implement lookup of the relevant ACPI object names and use them to initialize the MAC address. Limit the scope to I225/I226 device IDs used in docking stations, to avoid interfering with onboard I225/I226 NICs.

On systems where the feature is disabled or unsupported, the ACPI objects do not exist or do not contain a valid Ethernet MAC, causing a fallback to the existing MAC address initialization path.

Assisted-by GitHub-Copilot:claude-opus-4.7

---
v3: fix typo that introduced check reversal
v2: limit scope to dock device ids
v1: initial version

---
 drivers/net/ethernet/intel/igc/igc.h      |  1 +
 drivers/net/ethernet/intel/igc/igc_base.c |  8 +++
 drivers/net/ethernet/intel/igc/igc_hw.h   |  2 +
 drivers/net/ethernet/intel/igc/igc_main.c | 69 +++++++++++++++++++++--
 4 files changed, 76 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/igc/igc.h +1 -0
index 88291f775c22..05affaa04aa4 100644
@@ -567,6 +567,7 @@ enum igc_tx_flags {
 
 enum igc_boards {
 	board_base,
+	board_dock,
 };
 
 /* The largest size we can write to the descriptor is 65535.  In order to
drivers/net/ethernet/intel/igc/igc_base.c +8 -0
index ab9120a3127f..c9067cc79b69 100644
@@ -474,4 +474,12 @@ const struct igc_info igc_base_info = {
 	.get_invariants		= igc_get_invariants_base,
 	.mac_ops		= &igc_mac_ops_base,
 	.phy_ops		= &igc_phy_ops_base,
+	.is_dock		= false,
+};
+
+const struct igc_info igc_dock_info = {
+	.get_invariants		= igc_get_invariants_base,
+	.mac_ops		= &igc_mac_ops_base,
+	.phy_ops		= &igc_phy_ops_base,
+	.is_dock		= true,
 };
drivers/net/ethernet/intel/igc/igc_hw.h +2 -0
index 62aaee55668a..d14b7666b5d7 100644
@@ -69,9 +69,11 @@ struct igc_info {
 	struct igc_mac_operations *mac_ops;
 	const struct igc_phy_operations *phy_ops;
 	struct igc_nvm_operations *nvm_ops;
+	bool is_dock;
 };
 
 extern const struct igc_info igc_base_info;
+extern const struct igc_info igc_dock_info;
 
 enum igc_forced_speed_duplex {
 	IGC_FORCED_10H,
drivers/net/ethernet/intel/igc/igc_main.c +65 -4

100 lines not on this page · raw message

Signature · 1 line
2.43.7