igc: Refactor the igc_power_up_link()
Subsystems (2)
PATCH 1/1 igc: Refactor the igc_power_up_link()
PHY of the i225 device support only copper mode.
There is no point to check media type in theigc_power_up_link() method.
--- 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
@@ -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
PATCH 1/1 igc: Refactor the igc_power_up_link()
Dear Sasha,
Thank you for the patch.
Am 10.06.20 um 08:12 schrieb Sasha Neftin:
Quoted 3 lines
PHY of the i225 device support only copper mode.
There is no point to check media type in theigc_power_up_link()method.
One nit regarding the commit message summary. *Refactor* very generic. Could you use something like:
Quoted 12 lines
igc: Remove unneeded check for copper media type
Signed-off-by Sasha Neftin <[email protected]>--- drivers/net/ethernet/intel/igc/igc_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/net/ethernet/intel/igc/igc_main.c +0
-0
drivers/net/ethernet/intel/igc/igc_main.c static void igc_power_up_link(struct igc_adapter *adapter) · line 121
Quoted 9 lines
drivers/net/ethernet/intel/igc/igc_main.c +1
-2@@ -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); }
Kind regards,
Paul
Neftin
PATCH 1/1 igc: Refactor the igc_power_up_link()
Quoted 5 lines · Paul Menzel
Dear Sasha,
Thank you for the patch.
Quoted 9 lines
Am 10.06.20 um 08:12 schrieb Sasha Neftin:
Quoted 3 lines
PHY of the i225 device support only copper mode.
There is no point to check media type in theigc_power_up_link()method.One nit regarding the commit message summary. *Refactor* very generic. Could you use something like:
Quoted 1 line
igc: Remove unneeded check for copper media type
Paul, thanks for reviewing this patch. I will send v2.
Quoted 27 lines
Quoted 12 lines
Signed-off-by Sasha Neftin <[email protected]>---
?drivers/net/ethernet/intel/igc/igc_main.c| 3 +-- ? 1 file changed, 1 insertion(+), 2 deletions(-)drivers/net/ethernet/intel/igc/igc_main.c +0
-0drivers/net/ethernet/intel/igc/igc_main.c static void igc_power_up_link(struct igc_adapter · line 120
Quoted 8 lines
drivers/net/ethernet/intel/igc/igc_main.c +1
-2@@ -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); ? }Reviewed-by Paul Menzel <[email protected]>Kind regards,
Paul