Skip to contentSkip to conversation

i40e: add restore default speed when changed PHY doesn't support it

PATCH In review Aleksandr Loktionov 2 participants 4 messages Oct 13, 2023 – Oct 16, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 i40e: add restore default speed when changed PHY doesn't support it

Currently, there was no link after plugging a different type of PHY module if user forced previous PHY specific link type/speed before.

Add reset link speed settings to the default values for PHY module, if different PHY module is inserted and currently defined user-specified speed is not compatible with this module.

---
v1->v2 fixed Reviewed-by tags
v2->v3 fixed commit messages and tags
v3->v4 fixed commit message typo
v4->v5 cc to [email protected]
---

---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 65 +++++++++++++++++++--
 1 file changed, 61 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +61 -4
index d0d0218..6829720 100644
@@ -10076,6 +10076,55 @@ static void i40e_reset_subtask(struct i40e_pf *pf)
 	rtnl_unlock();
 }
 
+/**
+ * i40e_restore_supported_phy_link_speed - Restore default PHY speed
+ * @pf: board private structure
+ *
+ * Set PHY module speeds according to values got from
+ * initial link speed abilites.
+ **/
+static int i40e_restore_supported_phy_link_speed(struct i40e_pf *pf)
+{
+	struct i40e_aq_get_phy_abilities_resp abilities;
+	struct i40e_aq_set_phy_config config = {0};
+	struct i40e_hw *hw = &pf->hw;
+	int err;
+
+	err = i40e_aq_get_phy_capabilities(hw, false, false, &abilities, NULL);
+	if (err) {
+		dev_dbg(&pf->pdev->dev, "failed to get phy cap., ret =  %i last_status =  %s\n",
+			err, i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
+		return err;
+	}
+	config.eee_capability = abilities.eee_capability;
+	config.phy_type_ext = abilities.phy_type_ext;
+	config.low_power_ctrl = abilities.d3_lpan;
+	config.abilities = abilities.abilities;
+	config.abilities |= I40E_AQ_PHY_ENABLE_AN;
+	config.phy_type = abilities.phy_type;
+	config.eeer = abilities.eeer_val;
+	config.fec_config = abilities.fec_cfg_curr_mod_ext_info &
+			    I40E_AQ_PHY_FEC_CONFIG_MASK;
+	err = i40e_aq_get_phy_capabilities(hw, false, true, &abilities, NULL);
+	if (err) {
+		dev_dbg(&pf->pdev->dev, "get supported phy types ret =  %i last_status =  %s\n",
+			err, i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
+		return err;
+	}
+	config.link_speed = abilities.link_speed;
+
+	err = i40e_aq_set_phy_config(hw, &config, NULL);
+	if (err)
+		return err;
+	err = i40e_aq_set_link_restart_an(hw, true, NULL);
+	if (err)
+		return err;
+
+	pf->hw.phy.link_info.requested_speeds = config.link_speed;
+
+	return err;
+}
+
 /**
  * i40e_handle_link_event - Handle link event
  * @pf: board private structure
@@ -10086,6 +10135,7 @@ static void i40e_handle_link_event(struct i40e_pf *pf,
 {
 	struct i40e_aqc_get_link_status *status =
 		(struct i40e_aqc_get_link_status *)&e->desc.params.raw;
+	int err;
 
 	/* Do a new status request to re-enable LSE reporting
 	 * and load new status information into the hw struct
@@ -10109,10 +10159,17 @@ static void i40e_handle_link_event(struct i40e_pf *pf,
 		    (!(status->an_info & I40E_AQ_QUALIFIED_MODULE)) &&
 		    (!(status->link_info & I40E_AQ_LINK_UP)) &&
 		    (!(pf->flags & I40E_FLAG_LINK_DOWN_ON_CLOSE_ENABLED))) {
-			dev_err(&pf->pdev->dev,
-				"Rx/Tx is disabled on this device because an unsupported SFP module type was detected.\n");
-			dev_err(&pf->pdev->dev,
-				"Refer to the Intel(R) Ethernet Adapters and Devices User Guide for a list of supported modules.\n");
+			err = i40e_restore_supported_phy_link_speed(pf);
+			if (err) {
+				dev_err(&pf->pdev->dev,
+					"Rx/Tx is disabled on this device because an unsupported SFP module type was detected.\n");
+				dev_err(&pf->pdev->dev,
+					"Refer to the Intel(R) Ethernet Adapters and Devices User Guide for a list of supported modules.\n");
+
+				return;
+			}
+
+			dev_info(&pf->pdev->dev, "The selected speed is incompatible with the connected media type. Resetting to the default speed setting for the media type.");
 		}
 	}
 }
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 11 lines · Aleksandr Loktionov

Currently, there was no link after plugging a different type of PHY module if user forced previous PHY specific link type/speed before.

Add reset link speed settings to the default values for PHY module, if different PHY module is inserted and currently defined user-specified speed is not compatible with this module.

Quoted 5 lines

---
v1->v2 fixed Reviewed-by tags
v2->v3 fixed commit messages and tags
v3->v4 fixed commit message typo
v4->v5 cc to [email protected]

good move!,
now you have to focus on the rules more, like those:
do not post next version before 24h of prev one;

more metadata:
I would remove the word 'add' from the Subject line; You still need to change author to Radoslaw.

Quoted 14 lines

---

---
  drivers/net/ethernet/intel/i40e/i40e_main.c | 65 +++++++++++++++++++--
  1 file changed, 61 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -0
index d0d0218..6829720 100644
@@ -10076,6 +10076,55 @@ static void i40e_reset_subtask(struct i40e_pf *pf)
  	rtnl_unlock();
  }
 
+/**

drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_reset_subtask(struct i40e_pf *pf) · line 10089

Quoted 10 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +10 -0
+ * i40e_restore_supported_phy_link_speed - Restore default PHY speed
+ * @pf: board private structure
+ *
+ * Set PHY module speeds according to values got from
+ * initial link speed abilites.
+ **/
+static int i40e_restore_supported_phy_link_speed(struct i40e_pf *pf)
+{
+	struct i40e_aq_get_phy_abilities_resp abilities;
+	struct i40e_aq_set_phy_config config = {0};

just = {};

Quoted 11 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +11 -0
+	struct i40e_hw *hw = &pf->hw;
+	int err;
+
+	err = i40e_aq_get_phy_capabilities(hw, false, false, &abilities, NULL);
+	if (err) {
+		dev_dbg(&pf->pdev->dev, "failed to get phy cap., ret =  %i last_status =  %s\n",
+			err, i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
+		return err;
+	}
+	config.eee_capability = abilities.eee_capability;
+	config.phy_type_ext = abilities.phy_type_ext;

drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_reset_subtask(struct i40e_pf *pf) · line 10110

Quoted 10 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +10 -0
+	config.low_power_ctrl = abilities.d3_lpan;
+	config.abilities = abilities.abilities;
+	config.abilities |= I40E_AQ_PHY_ENABLE_AN;
+	config.phy_type = abilities.phy_type;
+	config.eeer = abilities.eeer_val;
+	config.fec_config = abilities.fec_cfg_curr_mod_ext_info &
+			    I40E_AQ_PHY_FEC_CONFIG_MASK;
+	err = i40e_aq_get_phy_capabilities(hw, false, true, &abilities, NULL);
+	if (err) {
+		dev_dbg(&pf->pdev->dev, "get supported phy types ret =  %i last_status =  %s\n",

s/ / /g

(in English: replace double spaces by single ones)

Quoted 50 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +29 -4
+			err, i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
+		return err;
+	}
+	config.link_speed = abilities.link_speed;
+
+	err = i40e_aq_set_phy_config(hw, &config, NULL);
+	if (err)
+		return err;
+	err = i40e_aq_set_link_restart_an(hw, true, NULL);
+	if (err)
+		return err;
+
+	pf->hw.phy.link_info.requested_speeds = config.link_speed;
+
+	return err;
+}
+
  /**
   * i40e_handle_link_event - Handle link event
   * @pf: board private structure
@@ -10086,6 +10135,7 @@ static void i40e_handle_link_event(struct i40e_pf *pf,
  {
  	struct i40e_aqc_get_link_status *status =
  		(struct i40e_aqc_get_link_status *)&e->desc.params.raw;
+	int err;
 
  	/* Do a new status request to re-enable LSE reporting
  	 * and load new status information into the hw struct
@@ -10109,10 +10159,17 @@ static void i40e_handle_link_event(struct i40e_pf *pf,
  		    (!(status->an_info & I40E_AQ_QUALIFIED_MODULE)) &&
  		    (!(status->link_info & I40E_AQ_LINK_UP)) &&
  		    (!(pf->flags & I40E_FLAG_LINK_DOWN_ON_CLOSE_ENABLED))) {
-			dev_err(&pf->pdev->dev,
-				"Rx/Tx is disabled on this device because an unsupported SFP module type was detected.\n");
-			dev_err(&pf->pdev->dev,
-				"Refer to the Intel(R) Ethernet Adapters and Devices User Guide for a list of supported modules.\n");
+			err = i40e_restore_supported_phy_link_speed(pf);
+			if (err) {
+				dev_err(&pf->pdev->dev,
+					"Rx/Tx is disabled on this device because an unsupported SFP module type was detected.\n");
+				dev_err(&pf->pdev->dev,
+					"Refer to the Intel(R) Ethernet Adapters and Devices User Guide for a list of supported modules.\n");
+
+				return;
+			}
+
+			dev_info(&pf->pdev->dev, "The selected speed is incompatible with the connected media type. Resetting to the default speed setting for the media type.");
  		}
  	}
  }
#2 lore raw
Quoted 30 lines

-----Original Message-----
From: Kitszel, Przemyslaw <[email protected]>
Sent: Friday, October 13, 2023 2:35 PM
To: Loktionov, Aleksandr <[email protected]>; intel-wired- [email protected]; Nguyen, Anthony L <[email protected]>; Jagielski, Jedrzej <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH iwl-next v5] i40e: add restore default speed when changed PHY doesn't support it

Quoted 11 lines · Aleksandr Loktionov

Currently, there was no link after plugging a different type of PHY module if user forced previous PHY specific link type/speed before.

Add reset link speed settings to the default values for PHY module, if different PHY module is inserted and currently defined user-specified speed is not compatible with this module.

Quoted 5 lines

---
v1->v2 fixed Reviewed-by tags
v2->v3 fixed commit messages and tags
v3->v4 fixed commit message typo
v4->v5 cc to [email protected]

Quoted 4 lines

good move!,
now you have to focus on the rules more, like those:
do not post next version before 24h of prev one;

Ok

Quoted 2 lines

more metadata:
I would remove the word 'add' from the Subject line; You still need to change

I don't agree, because it's not a fix it's a new feature implementation => 'add' feature. If you have a better idea please suggest a full commit title which fits 72 chars. What I have now it my best.

Quoted 2 lines

author to Radoslaw.

The patch was seriously modified, so we are co-authors.
And I'd better leave my e-mail, which is still alive, on top for better community support.

Quoted 117 lines

drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_reset_subtask(struct i40e_pf

Quoted 11 lines

---

---
  drivers/net/ethernet/intel/i40e/i40e_main.c | 65 +++++++++++++++++++--
  1 file changed, 61 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +0 -0
index d0d0218..6829720 100644
@@ -10076,6 +10076,55 @@ static void i40e_reset_subtask(struct i40e_pf

*pf)

Quoted 4 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -0
  	rtnl_unlock();
  }
 
+/**

drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_reset_subtask(struct i40e_pf *pf) · line 10089

Quoted 10 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +10 -0
+ * i40e_restore_supported_phy_link_speed - Restore default PHY speed
+ * @pf: board private structure
+ *
+ * Set PHY module speeds according to values got from
+ * initial link speed abilites.
+ **/
+static int i40e_restore_supported_phy_link_speed(struct i40e_pf *pf)
+{
+	struct i40e_aq_get_phy_abilities_resp abilities;
+	struct i40e_aq_set_phy_config config = {0};

just = {};

drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_reset_subtask(struct i40e_pf *pf)

Quoted 6 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +6 -0
+	struct i40e_hw *hw = &pf->hw;
+	int err;
+
+	err = i40e_aq_get_phy_capabilities(hw, false, false, &abilities, NULL);
+	if (err) {
+		dev_dbg(&pf->pdev->dev, "failed to get phy cap., ret =  %i

last_status = %s\n",

Quoted 6 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +6 -0
+			err, i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
+		return err;
+	}
+	config.eee_capability = abilities.eee_capability;
+	config.phy_type_ext = abilities.phy_type_ext;
+	config.low_power_ctrl = abilities.d3_lpan;

drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_reset_subtask(struct i40e_pf *pf)

Quoted 10 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +10 -0
+	config.abilities = abilities.abilities;
+	config.abilities |= I40E_AQ_PHY_ENABLE_AN;
+	config.phy_type = abilities.phy_type;
+	config.eeer = abilities.eeer_val;
+	config.fec_config = abilities.fec_cfg_curr_mod_ext_info &
+			    I40E_AQ_PHY_FEC_CONFIG_MASK;
+	err = i40e_aq_get_phy_capabilities(hw, false, true, &abilities, NULL);
+	if (err) {
+		dev_dbg(&pf->pdev->dev, "get supported phy types ret =  %i
+last_status =  %s\n",

s/ / /g

(in English: replace double spaces by single ones)

drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_handle_link_event(struct

Quoted 21 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +17 -0
+			err, i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
+		return err;
+	}
+	config.link_speed = abilities.link_speed;
+
+	err = i40e_aq_set_phy_config(hw, &config, NULL);
+	if (err)
+		return err;
+	err = i40e_aq_set_link_restart_an(hw, true, NULL);
+	if (err)
+		return err;
+
+	pf->hw.phy.link_info.requested_speeds = config.link_speed;
+
+	return err;
+}
+
  /**
   * i40e_handle_link_event - Handle link event
   * @pf: board private structure
@@ -10086,6 +10135,7 @@ static void i40e_handle_link_event(struct

i40e_pf *pf,

drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_handle_link_event(struct i40e_pf *pf,

Quoted 11 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +2 -0
  {
  	struct i40e_aqc_get_link_status *status =
  		(struct i40e_aqc_get_link_status *)&e->desc.params.raw;
+	int err;
 
  	/* Do a new status request to re-enable LSE reporting
  	 * and load new status information into the hw struct @@ -10109,10
+10159,17 @@ static void i40e_handle_link_event(struct i40e_pf *pf,
  		    (!(status->an_info & I40E_AQ_QUALIFIED_MODULE)) &&
  		    (!(status->link_info & I40E_AQ_LINK_UP)) &&
  		    (!(pf->flags &

I40E_FLAG_LINK_DOWN_ON_CLOSE_ENABLED))) {

drivers/net/ethernet/intel/i40e/i40e_main.c

Quoted 2 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +0 -2
-			dev_err(&pf->pdev->dev,
-				"Rx/Tx is disabled on this device because an

unsupported SFP module type was detected.\n");

drivers/net/ethernet/intel/i40e/i40e_main.c

Quoted 2 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +0 -2
-			dev_err(&pf->pdev->dev,
-				"Refer to the Intel(R) Ethernet Adapters and

Devices User Guide for a list of supported modules.\n");

drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_handle_link_event(struct i40e_pf *pf,

Quoted 4 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +4 -0
+			err = i40e_restore_supported_phy_link_speed(pf);
+			if (err) {
+				dev_err(&pf->pdev->dev,
+					"Rx/Tx is disabled on this device

because an unsupported SFP module type was detected.\n");

drivers/net/ethernet/intel/i40e/i40e_main.c

Quoted 2 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +2 -0
+				dev_err(&pf->pdev->dev,
+					"Refer to the Intel(R) Ethernet

Adapters and Devices User Guide

drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_handle_link_event(struct i40e_pf *pf,

Quoted 6 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +6 -0
+for a list of supported modules.\n");
+
+				return;
+			}
+
+			dev_info(&pf->pdev->dev, "The selected speed is

incompatible with

Quoted 5 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +2 -0
+the connected media type. Resetting to the default speed setting for
+the media type.");
  		}
  	}
  }
maintainer
#3 lore raw
Quoted 34 lines · Aleksandr
Quoted 30 lines

-----Original Message-----
From: Kitszel, Przemyslaw <[email protected]>
Sent: Friday, October 13, 2023 2:35 PM
To: Loktionov, Aleksandr <[email protected]>; intel-wired- [email protected]; Nguyen, Anthony L <[email protected]>; Jagielski, Jedrzej <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH iwl-next v5] i40e: add restore default speed when changed PHY doesn't support it

Quoted 11 lines · Aleksandr Loktionov

Currently, there was no link after plugging a different type of PHY module if user forced previous PHY specific link type/speed before.

Add reset link speed settings to the default values for PHY module, if different PHY module is inserted and currently defined user-specified speed is not compatible with this module.

Quoted 5 lines

---
v1->v2 fixed Reviewed-by tags
v2->v3 fixed commit messages and tags
v3->v4 fixed commit message typo
v4->v5 cc to [email protected]

Quoted 4 lines

good move!,
now you have to focus on the rules more, like those:
do not post next version before 24h of prev one;

Quoted 6 lines

Ok

Quoted 2 lines

more metadata:
I would remove the word 'add' from the Subject line; You still need to change

I don't agree, because it's not a fix it's a new feature implementation => 'add' feature. If you have a better idea please suggest a full commit title which fits 72 chars. What I have now it my best.

i40e: support restoring default speed when changed PHY does not

Quoted 4 lines
Quoted 3 lines

author to Radoslaw.

The patch was seriously modified, so we are co-authors.

sure, my rule of thumb then is to put bigger contributor as main author, and the other/s as co-authors,
perhaps some people believe that chronologically first should be the main?

I always try to split patch into more
(each of them still being of value when standing alone ofc).

anyway, it's just a comment, not change-request :)

Quoted 1 line

And I'd better leave my e-mail, which is still alive, on top for better community support.

doesn't matter, your address is there as a Submitter anyway :)

Quoted 119 lines
Quoted 118 lines

drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_reset_subtask(struct i40e_pf

Quoted 12 lines

---

---
   drivers/net/ethernet/intel/i40e/i40e_main.c | 65 +++++++++++++++++++--
   1 file changed, 61 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +0 -0
index d0d0218..6829720 100644
@@ -10076,6 +10076,55 @@ static void i40e_reset_subtask(struct i40e_pf

*pf)

Quoted 4 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -0
   	rtnl_unlock();
   }
 
+/**

drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_reset_subtask(struct i40e_pf *pf) · line 10089

Quoted 10 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +10 -0
+ * i40e_restore_supported_phy_link_speed - Restore default PHY speed
+ * @pf: board private structure
+ *
+ * Set PHY module speeds according to values got from
+ * initial link speed abilites.
+ **/
+static int i40e_restore_supported_phy_link_speed(struct i40e_pf *pf)
+{
+	struct i40e_aq_get_phy_abilities_resp abilities;
+	struct i40e_aq_set_phy_config config = {0};

just = {};

drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_reset_subtask(struct i40e_pf *pf)

Quoted 6 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +6 -0
+	struct i40e_hw *hw = &pf->hw;
+	int err;
+
+	err = i40e_aq_get_phy_capabilities(hw, false, false, &abilities, NULL);
+	if (err) {
+		dev_dbg(&pf->pdev->dev, "failed to get phy cap., ret =  %i

last_status = %s\n",

Quoted 6 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +6 -0
+			err, i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
+		return err;
+	}
+	config.eee_capability = abilities.eee_capability;
+	config.phy_type_ext = abilities.phy_type_ext;
+	config.low_power_ctrl = abilities.d3_lpan;

drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_reset_subtask(struct i40e_pf *pf)

Quoted 10 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +10 -0
+	config.abilities = abilities.abilities;
+	config.abilities |= I40E_AQ_PHY_ENABLE_AN;
+	config.phy_type = abilities.phy_type;
+	config.eeer = abilities.eeer_val;
+	config.fec_config = abilities.fec_cfg_curr_mod_ext_info &
+			    I40E_AQ_PHY_FEC_CONFIG_MASK;
+	err = i40e_aq_get_phy_capabilities(hw, false, true, &abilities, NULL);
+	if (err) {
+		dev_dbg(&pf->pdev->dev, "get supported phy types ret =  %i
+last_status =  %s\n",

s/ / /g

(in English: replace double spaces by single ones)

drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_handle_link_event(struct

Quoted 21 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +17 -0
+			err, i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
+		return err;
+	}
+	config.link_speed = abilities.link_speed;
+
+	err = i40e_aq_set_phy_config(hw, &config, NULL);
+	if (err)
+		return err;
+	err = i40e_aq_set_link_restart_an(hw, true, NULL);
+	if (err)
+		return err;
+
+	pf->hw.phy.link_info.requested_speeds = config.link_speed;
+
+	return err;
+}
+
   /**
    * i40e_handle_link_event - Handle link event
    * @pf: board private structure
@@ -10086,6 +10135,7 @@ static void i40e_handle_link_event(struct

i40e_pf *pf,

drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_handle_link_event(struct i40e_pf *pf,

Quoted 11 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +2 -0
   {
   	struct i40e_aqc_get_link_status *status =
   		(struct i40e_aqc_get_link_status *)&e->desc.params.raw;
+	int err;
 
   	/* Do a new status request to re-enable LSE reporting
   	 * and load new status information into the hw struct @@ -10109,10
+10159,17 @@ static void i40e_handle_link_event(struct i40e_pf *pf,
   		    (!(status->an_info & I40E_AQ_QUALIFIED_MODULE)) &&
   		    (!(status->link_info & I40E_AQ_LINK_UP)) &&
   		    (!(pf->flags &

I40E_FLAG_LINK_DOWN_ON_CLOSE_ENABLED))) {

drivers/net/ethernet/intel/i40e/i40e_main.c

Quoted 2 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +0 -2
-			dev_err(&pf->pdev->dev,
-				"Rx/Tx is disabled on this device because an

unsupported SFP module type was detected.\n");

drivers/net/ethernet/intel/i40e/i40e_main.c

Quoted 2 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +0 -2
-			dev_err(&pf->pdev->dev,
-				"Refer to the Intel(R) Ethernet Adapters and

Devices User Guide for a list of supported modules.\n");

drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_handle_link_event(struct i40e_pf *pf,

Quoted 4 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +4 -0
+			err = i40e_restore_supported_phy_link_speed(pf);
+			if (err) {
+				dev_err(&pf->pdev->dev,
+					"Rx/Tx is disabled on this device

because an unsupported SFP module type was detected.\n");

drivers/net/ethernet/intel/i40e/i40e_main.c

Quoted 2 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +2 -0
+				dev_err(&pf->pdev->dev,
+					"Refer to the Intel(R) Ethernet

Adapters and Devices User Guide

drivers/net/ethernet/intel/i40e/i40e_main.c static void i40e_handle_link_event(struct i40e_pf *pf,

Quoted 6 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +6 -0
+for a list of supported modules.\n");
+
+				return;
+			}
+
+			dev_info(&pf->pdev->dev, "The selected speed is

incompatible with

Quoted 5 lines
drivers/net/ethernet/intel/i40e/i40e_main.c +2 -0
+the connected media type. Resetting to the default speed setting for
+the media type.");
   		}
   	}
   }