Message ID | 20240609065309.2049754-1-sasha.neftin@intel.com |
---|---|
State | Superseded |
Headers | show |
Series | [iwl-next,v1,1/1] igc: Remove the internal 'eee_advert' field | expand |
Dear Sasha, Thank you for your patch. Am 09.06.24 um 08:53 schrieb Sasha Neftin: > Since kernels 'ethtool_keee' structure is in use, the internal 'eee_advert' > a field becomes pointless and can be removed. Redundant *a*? > This patch comes to clean up this redundant code. > > Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> Is this due to another commit? If so, note it in a Fixes: tag? > --- > drivers/net/ethernet/intel/igc/igc.h | 1 - > drivers/net/ethernet/intel/igc/igc_ethtool.c | 6 ------ > drivers/net/ethernet/intel/igc/igc_main.c | 3 --- > 3 files changed, 10 deletions(-) > > diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h > index 8b14c029eda1..c38b4d0f00ce 100644 > --- a/drivers/net/ethernet/intel/igc/igc.h > +++ b/drivers/net/ethernet/intel/igc/igc.h > @@ -202,7 +202,6 @@ struct igc_adapter { > struct net_device *netdev; > > struct ethtool_keee eee; > - u16 eee_advert; > > unsigned long state; > unsigned int flags; > diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c > index a80ac148b402..1e9241103aa9 100644 > --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c > +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c > @@ -1636,10 +1636,6 @@ static int igc_ethtool_get_eee(struct net_device *netdev, > linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, > edata->supported); > > - if (hw->dev_spec._base.eee_enable) > - mii_eee_cap1_mod_linkmode_t(edata->advertised, > - adapter->eee_advert); > - > eeer = rd32(IGC_EEER); > > /* EEE status on negotiated link */ > @@ -1700,8 +1696,6 @@ static int igc_ethtool_set_eee(struct net_device *netdev, > return -EINVAL; > } > > - adapter->eee_advert = linkmode_to_mii_eee_cap1_t(edata->advertised); > - > if (hw->dev_spec._base.eee_enable != edata->eee_enabled) { > hw->dev_spec._base.eee_enable = edata->eee_enabled; > adapter->flags |= IGC_FLAG_EEE; > diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c > index c057d0afaf9a..772f425b1a24 100644 > --- a/drivers/net/ethernet/intel/igc/igc_main.c > +++ b/drivers/net/ethernet/intel/igc/igc_main.c > @@ -4976,9 +4976,6 @@ void igc_up(struct igc_adapter *adapter) > /* start the watchdog. */ > hw->mac.get_link_status = true; > schedule_work(&adapter->watchdog_task); > - > - adapter->eee_advert = MDIO_EEE_100TX | MDIO_EEE_1000T | > - MDIO_EEE_2_5GT; > } > > /** Kind regards, Paul
On 09/06/2024 11:43, Paul Menzel wrote: > Dear Sasha, > > > Thank you for your patch. > > Am 09.06.24 um 08:53 schrieb Sasha Neftin: >> Since kernels 'ethtool_keee' structure is in use, the internal >> 'eee_advert' >> a field becomes pointless and can be removed. > > Redundant *a*? Right, I will fix it. > >> This patch comes to clean up this redundant code. >> >> Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> > > Is this due to another commit? If so, note it in a Fixes: tag? This patch targeted iwl-next. Aren't? There is no "Fixes" tag needed. (cleaning up as kernel evolution) > >> --- >> drivers/net/ethernet/intel/igc/igc.h | 1 - >> drivers/net/ethernet/intel/igc/igc_ethtool.c | 6 ------ >> drivers/net/ethernet/intel/igc/igc_main.c | 3 --- >> 3 files changed, 10 deletions(-) >> >> diff --git a/drivers/net/ethernet/intel/igc/igc.h >> b/drivers/net/ethernet/intel/igc/igc.h >> index 8b14c029eda1..c38b4d0f00ce 100644 >> --- a/drivers/net/ethernet/intel/igc/igc.h >> +++ b/drivers/net/ethernet/intel/igc/igc.h >> @@ -202,7 +202,6 @@ struct igc_adapter { >> struct net_device *netdev; >> struct ethtool_keee eee; >> - u16 eee_advert; >> unsigned long state; >> unsigned int flags; >> diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c >> b/drivers/net/ethernet/intel/igc/igc_ethtool.c >> index a80ac148b402..1e9241103aa9 100644 >> --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c >> +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c >> @@ -1636,10 +1636,6 @@ static int igc_ethtool_get_eee(struct >> net_device *netdev, >> linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, >> edata->supported); >> - if (hw->dev_spec._base.eee_enable) >> - mii_eee_cap1_mod_linkmode_t(edata->advertised, >> - adapter->eee_advert); >> - >> eeer = rd32(IGC_EEER); >> /* EEE status on negotiated link */ >> @@ -1700,8 +1696,6 @@ static int igc_ethtool_set_eee(struct net_device >> *netdev, >> return -EINVAL; >> } >> - adapter->eee_advert = linkmode_to_mii_eee_cap1_t(edata->advertised); >> - >> if (hw->dev_spec._base.eee_enable != edata->eee_enabled) { >> hw->dev_spec._base.eee_enable = edata->eee_enabled; >> adapter->flags |= IGC_FLAG_EEE; >> diff --git a/drivers/net/ethernet/intel/igc/igc_main.c >> b/drivers/net/ethernet/intel/igc/igc_main.c >> index c057d0afaf9a..772f425b1a24 100644 >> --- a/drivers/net/ethernet/intel/igc/igc_main.c >> +++ b/drivers/net/ethernet/intel/igc/igc_main.c >> @@ -4976,9 +4976,6 @@ void igc_up(struct igc_adapter *adapter) >> /* start the watchdog. */ >> hw->mac.get_link_status = true; >> schedule_work(&adapter->watchdog_task); >> - >> - adapter->eee_advert = MDIO_EEE_100TX | MDIO_EEE_1000T | >> - MDIO_EEE_2_5GT; >> } >> /** > > > Kind regards, > > Paul
diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h index 8b14c029eda1..c38b4d0f00ce 100644 --- a/drivers/net/ethernet/intel/igc/igc.h +++ b/drivers/net/ethernet/intel/igc/igc.h @@ -202,7 +202,6 @@ struct igc_adapter { struct net_device *netdev; struct ethtool_keee eee; - u16 eee_advert; unsigned long state; unsigned int flags; diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c index a80ac148b402..1e9241103aa9 100644 --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c @@ -1636,10 +1636,6 @@ static int igc_ethtool_get_eee(struct net_device *netdev, linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, edata->supported); - if (hw->dev_spec._base.eee_enable) - mii_eee_cap1_mod_linkmode_t(edata->advertised, - adapter->eee_advert); - eeer = rd32(IGC_EEER); /* EEE status on negotiated link */ @@ -1700,8 +1696,6 @@ static int igc_ethtool_set_eee(struct net_device *netdev, return -EINVAL; } - adapter->eee_advert = linkmode_to_mii_eee_cap1_t(edata->advertised); - if (hw->dev_spec._base.eee_enable != edata->eee_enabled) { hw->dev_spec._base.eee_enable = edata->eee_enabled; adapter->flags |= IGC_FLAG_EEE; diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index c057d0afaf9a..772f425b1a24 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -4976,9 +4976,6 @@ void igc_up(struct igc_adapter *adapter) /* start the watchdog. */ hw->mac.get_link_status = true; schedule_work(&adapter->watchdog_task); - - adapter->eee_advert = MDIO_EEE_100TX | MDIO_EEE_1000T | - MDIO_EEE_2_5GT; } /**
Since kernels 'ethtool_keee' structure is in use, the internal 'eee_advert' a field becomes pointless and can be removed. This patch comes to clean up this redundant code. Signed-off-by: Sasha Neftin <sasha.neftin@intel.com> --- drivers/net/ethernet/intel/igc/igc.h | 1 - drivers/net/ethernet/intel/igc/igc_ethtool.c | 6 ------ drivers/net/ethernet/intel/igc/igc_main.c | 3 --- 3 files changed, 10 deletions(-)