All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH v1 1/1] igc: Cleanup the redundant code
@ 2019-04-21  8:17 Sasha Neftin
  2019-04-24  2:08 ` Brown, Aaron F
  0 siblings, 1 reply; 3+ messages in thread
From: Sasha Neftin @ 2019-04-21  8:17 UTC (permalink / raw)
  To: intel-wired-lan

The default flow control settings for the i225 device is both
'rx' and 'tx' pause frames. There is no depend on the NVM value.
This patch comes to fix this and clean up the driver code.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_mac.c | 23 +++--------------------
 1 file changed, 3 insertions(+), 20 deletions(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_mac.c b/drivers/net/ethernet/intel/igc/igc_mac.c
index f7683d3ae47c..ba4646737288 100644
--- a/drivers/net/ethernet/intel/igc/igc_mac.c
+++ b/drivers/net/ethernet/intel/igc/igc_mac.c
@@ -8,7 +8,6 @@
 #include "igc_hw.h"
 
 /* forward declaration */
-static s32 igc_set_default_fc(struct igc_hw *hw);
 static s32 igc_set_fc_watermarks(struct igc_hw *hw);
 
 /**
@@ -96,13 +95,10 @@ s32 igc_setup_link(struct igc_hw *hw)
 		goto out;
 
 	/* If requested flow control is set to default, set flow control
-	 * based on the EEPROM flow control settings.
+	 * to the both 'rx' and 'tx' pause frames.
 	 */
-	if (hw->fc.requested_mode == igc_fc_default) {
-		ret_val = igc_set_default_fc(hw);
-		if (ret_val)
-			goto out;
-	}
+	if (hw->fc.requested_mode == igc_fc_default)
+		hw->fc.requested_mode = igc_fc_full;
 
 	/* We want to save off the original Flow Control configuration just
 	 * in case we get disconnected and then reconnected into a different
@@ -136,19 +132,6 @@ s32 igc_setup_link(struct igc_hw *hw)
 }
 
 /**
- * igc_set_default_fc - Set flow control default values
- * @hw: pointer to the HW structure
- *
- * Read the EEPROM for the default values for flow control and store the
- * values.
- */
-static s32 igc_set_default_fc(struct igc_hw *hw)
-{
-	hw->fc.requested_mode = igc_fc_full;
-	return 0;
-}
-
-/**
  * igc_force_mac_fc - Force the MAC's flow control settings
  * @hw: pointer to the HW structure
  *
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Intel-wired-lan] [PATCH v1 1/1] igc: Cleanup the redundant code
  2019-04-21  8:17 [Intel-wired-lan] [PATCH v1 1/1] igc: Cleanup the redundant code Sasha Neftin
@ 2019-04-24  2:08 ` Brown, Aaron F
  2019-04-24  2:14   ` Brown, Aaron F
  0 siblings, 1 reply; 3+ messages in thread
From: Brown, Aaron F @ 2019-04-24  2:08 UTC (permalink / raw)
  To: intel-wired-lan

> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Sasha Neftin
> Sent: Sunday, April 21, 2019 1:17 AM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH v1 1/1] igc: Cleanup the redundant code
> 
> The default flow control settings for the i225 device is both
> 'rx' and 'tx' pause frames. There is no depend on the NVM value.
> This patch comes to fix this and clean up the driver code.
> 
> Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
> ---
>  drivers/net/ethernet/intel/igc/igc_mac.c | 23 +++--------------------
>  1 file changed, 3 insertions(+), 20 deletions(-)

Tested-by: Aaron Brown <aaron.f.brown@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Intel-wired-lan] [PATCH v1 1/1] igc: Cleanup the redundant code
  2019-04-24  2:08 ` Brown, Aaron F
@ 2019-04-24  2:14   ` Brown, Aaron F
  0 siblings, 0 replies; 3+ messages in thread
From: Brown, Aaron F @ 2019-04-24  2:14 UTC (permalink / raw)
  To: intel-wired-lan

> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Brown, Aaron F
> Sent: Tuesday, April 23, 2019 7:08 PM
> To: Neftin, Sasha <sasha.neftin@intel.com>; intel-wired-lan at lists.osuosl.org
> Subject: Re: [Intel-wired-lan] [PATCH v1 1/1] igc: Cleanup the redundant
> code
> 
> > From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> > Behalf Of Sasha Neftin
> > Sent: Sunday, April 21, 2019 1:17 AM
> > To: intel-wired-lan at lists.osuosl.org
> > Subject: [Intel-wired-lan] [PATCH v1 1/1] igc: Cleanup the redundant code
> >
> > The default flow control settings for the i225 device is both
> > 'rx' and 'tx' pause frames. There is no depend on the NVM value.
> > This patch comes to fix this and clean up the driver code.
> >
> > Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
> > ---
> >  drivers/net/ethernet/intel/igc/igc_mac.c | 23 +++--------------------
> >  1 file changed, 3 insertions(+), 20 deletions(-)
> 
> Tested-by: Aaron Brown <aaron.f.brown@intel.com>

Ignore this, it was meant for a different igc patch with a similar title (Remove the obsolete workaround.)



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-24  2:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-21  8:17 [Intel-wired-lan] [PATCH v1 1/1] igc: Cleanup the redundant code Sasha Neftin
2019-04-24  2:08 ` Brown, Aaron F
2019-04-24  2:14   ` Brown, Aaron F

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.