Skip to contentSkip to conversation

igc: Remove unneeded check for copper media type

PATCH New Sasha Neftin 3 participants 4 messages Jun 10, 2020 – Jun 24, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 igc: Remove unneeded check for copper media type

PHY of the i225 device support only copper mode.
There is no point to check media type in the
igc_power_up_link() method.

v1->v2:
Address community comment and correct the title

---
 drivers/net/ethernet/intel/igc/igc_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/intel/igc/igc_main.c +1 -2
index af5e1686f7f2..83c94fa58c40 100644
@@ -115,8 +115,7 @@ static void igc_power_up_link(struct igc_adapter *adapter)
 {
 	igc_reset_phy(&adapter->hw);
 
-	if (adapter->hw.phy.media_type == igc_media_type_copper)
-		igc_power_up_phy_copper(&adapter->hw);
+	igc_power_up_phy_copper(&adapter->hw);
 
 	igc_setup_link(&adapter->hw);
 }
Signature · 1 line
2.11.0
#1 lore raw

PATCH v2 1/1 igc: Remove unneeded check for copper media type

Hi Sasha,

Quoted 3 lines

PHY of the i225 device support only copper mode.
There is no point to check media type in the
igc_power_up_link() method.

A quick grep shows that we have many checks like this in the igc code. How about we extend this patch to remove all of them at once?

Regards,

Andre

#2 lore raw

PATCH v2 1/1 igc: Remove unneeded check for copper media type

Quoted 8 lines · Andre Guedes

Hi Sasha,

Quoted 3 lines

PHY of the i225 device support only copper mode.
There is no point to check media type in the
igc_power_up_link() method.

A quick grep shows that we have many checks like this in the igc code. How about we extend this patch to remove all of them at once?

yes I know. we will do clean up per logic impact. For example, "force speed" mode not supported, need to clean up all logic, not only "copper media type".

Quoted 5 lines

Regards,

Andre

Hello Andre,
Thanks,
Sasha

#3 lore raw

PATCH v2 1/1 igc: Remove unneeded check for copper media type

In reply to Sasha Neftin
Quoted 11 lines

From: Intel-wired-lan <[email protected]> On Behalf Of Sasha Neftin
Sent: Wednesday, June 10, 2020 5:43 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH v2 1/1] igc: Remove unneeded check for copper media type

PHY of the i225 device support only copper mode. There is no point to check media type in the igc_power_up_link() method.

Quoted 8 lines

v1->v2:
Address community comment and correct the title

---
 drivers/net/ethernet/intel/igc/igc_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)