Message ID | 20200610124308.41422-1-sasha.neftin@intel.com |
---|---|
State | Accepted |
Delegated to: | Jeff Kirsher |
Headers | show |
Series | [v2,1/1] igc: Remove unneeded check for copper media type | expand |
Hi Sasha, > 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
On 6/10/2020 21:40, Andre Guedes wrote: > Hi Sasha, > >> 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". > > Regards, > > Andre > Hello Andre, Thanks, Sasha
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of > Sasha Neftin > Sent: Wednesday, June 10, 2020 5:43 AM > To: intel-wired-lan@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. > > v1->v2: > Address community comment and correct the title > > Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> > --- > drivers/net/ethernet/intel/igc/igc_main.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > Tested-by: Aaron Brown <aaron.f.brown@intel.com>
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index af5e1686f7f2..83c94fa58c40 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -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); }
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 Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> --- drivers/net/ethernet/intel/igc/igc_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)