[33/70] net/e1000/base: wrap the unneeded code

Message ID 20200622064634.70941-34-guinanx.sun@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series update e1000 base code |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Guinan Sun June 22, 2020, 6:45 a.m. UTC
  The default flow control settings for i225 should be set up as 'full'
for a request mode and do not depend from a NVM. '_set_default_fc_generic'
method took value from NVM and set a wrong default flow control settings.
Therefore driver up with none flow control settings.
Setting up '_fc_full' directly from a '_setup_link_generic' method and
solve this problem.

Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
 drivers/net/e1000/base/e1000_mac.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
  

Patch

diff --git a/drivers/net/e1000/base/e1000_mac.c b/drivers/net/e1000/base/e1000_mac.c
index 0ae2a60d8..577ba9c1b 100644
--- a/drivers/net/e1000/base/e1000_mac.c
+++ b/drivers/net/e1000/base/e1000_mac.c
@@ -941,9 +941,7 @@  s32 e1000_setup_link_generic(struct e1000_hw *hw)
 	 * based on the EEPROM flow control settings.
 	 */
 	if (hw->fc.requested_mode == e1000_fc_default) {
-		ret_val = e1000_set_default_fc_generic(hw);
-		if (ret_val)
-			return ret_val;
+		hw->fc.requested_mode = e1000_fc_full;
 	}
 
 	/* Save off the requested flow control mode for use later.  Depending