From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-02-01 21:46:26
This series contains updates to igc and i40e drivers.
Kai-Heng Feng fixes igc to report unknown speed and duplex during suspend
as an attempted read will cause errors.
Kevin Lo sets the default value to -IGC_ERR_NVM instead of success for
writing shadow RAM as this could miss a timeout. Also propagates the return
value for Flow Control configuration to properly pass on errors for igc.
Aleksandr reverts commit 2ad1274fa35a ("i40e: don't report link up for a VF
who hasn't enabled queues") as this can cause link flapping.
v2: Additional information to commit message of i40e revert patch.
The following are changes since commit eb4e8fac00d1e01ada5e57c05d24739156086677:
neighbour: Prevent a dead entry from updating gc_list
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 1GbE
Aleksandr Loktionov (1):
i40e: Revert "i40e: don't report link up for a VF who hasn't enabled
queues"
Kai-Heng Feng (1):
igc: Report speed and duplex as unknown when device is runtime
suspended
Kevin Lo (2):
igc: set the default return value to -IGC_ERR_NVM in
igc_write_nvm_srwr
igc: check return value of ret_val in igc_config_fc_after_link_up
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 13 +------------
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 1 -
drivers/net/ethernet/intel/igc/igc_ethtool.c | 3 ++-
drivers/net/ethernet/intel/igc/igc_i225.c | 3 +--
drivers/net/ethernet/intel/igc/igc_mac.c | 2 +-
5 files changed, 5 insertions(+), 17 deletions(-)
--
2.26.2
From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-02-01 21:47:01
From: Kevin Lo <redacted>
This patch sets the default return value to -IGC_ERR_NVM in
igc_write_nvm_srwr. Without this change it wouldn't lead to a shadow RAM
write EEWR timeout.
Fixes: ab4056126813 ("igc: Add NVM support")
Signed-off-by: Kevin Lo <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/igc/igc_i225.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
@@ -219,9 +219,9 @@ static s32 igc_write_nvm_srwr(struct igc_hw *hw, u16 offset, u16 words,u16*data){structigc_nvm_info*nvm=&hw->nvm;+s32ret_val=-IGC_ERR_NVM;u32attempts=100000;u32i,k,eewr=0;-s32ret_val=0;/* A check for invalid values: offset too large, too many words,*toomanywordsfortheoffset,andnotenoughwords.
@@ -229,7 +229,6 @@ static s32 igc_write_nvm_srwr(struct igc_hw *hw, u16 offset, u16 words,if(offset>=nvm->word_size||(words>(nvm->word_size-offset))||words==0){hw_dbg("nvm parameter(s) out of bounds\n");-ret_val=-IGC_ERR_NVM;gotoout;}
From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-02-01 21:47:07
From: Kevin Lo <redacted>
Check return value from ret_val to make error check actually work.
Fixes: 4eb8080143a9 ("igc: Add setup link functionality")
Signed-off-by: Kevin Lo <redacted>
Acked-by: Sasha Neftin <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/igc/igc_mac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Tony Nguyen <anthony.l.nguyen@intel.com> Date: 2021-02-01 21:47:27
From: Aleksandr Loktionov <redacted>
This reverts commit 2ad1274fa35ace5c6360762ba48d33b63da2396c
VF queues were not brought up when PF was brought up after being
downed if the VF driver disabled VFs queues during PF down.
This could happen in some older or external VF driver implementations.
The problem was that PF driver used vf->queues_enabled as a condition
to decide what link-state it would send out which caused the issue.
Remove the check for vf->queues_enabled in the VF link notify.
Now VF will always be notified of the current link status.
Also remove the queues_enabled member from i40e_vf structure as it is
not used anymore. Otherwise VNF implementation was broken and caused
a link flap.
The original commit was a workaround to avoid breaking existing VFs though
it's really a fault of the VF code not the PF. The commit should be safe to
revert as all of the VFs we know of have been fixed. Also, since we now
know there is a related bug in the workaround, removing it is preferred.
Fixes: 2ad1274fa35a ("i40e: don't report link up for a VF who hasn't enabled")
Signed-off-by: Aleksandr Loktionov <redacted>
Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Tested-by: Konrad Jankowski <redacted>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 13 +------------
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 1 -
2 files changed, 1 insertion(+), 13 deletions(-)
@@ -55,12 +55,7 @@ static void i40e_vc_notify_vf_link_state(struct i40e_vf *vf)pfe.event=VIRTCHNL_EVENT_LINK_CHANGE;pfe.severity=PF_EVENT_SEVERITY_INFO;--/* Always report link is down if the VF queues aren't enabled */-if(!vf->queues_enabled){-pfe.event_data.link_event.link_status=false;-pfe.event_data.link_event.link_speed=0;-}elseif(vf->link_forced){+if(vf->link_forced){pfe.event_data.link_event.link_status=vf->link_up;pfe.event_data.link_event.link_speed=(vf->link_up?i40e_virtchnl_link_speed(ls->link_speed):0);
@@ -2443,8 +2437,6 @@ static int i40e_vc_enable_queues_msg(struct i40e_vf *vf, u8 *msg)}}-vf->queues_enabled=true;-error_param:/* send the response to the VF */returni40e_vc_send_resp_to_vf(vf,VIRTCHNL_OP_ENABLE_QUEUES,
@@ -2466,9 +2458,6 @@ static int i40e_vc_disable_queues_msg(struct i40e_vf *vf, u8 *msg)structi40e_pf*pf=vf->pf;i40e_statusaq_ret=0;-/* Immediately mark queues as disabled */-vf->queues_enabled=false;-if(!test_bit(I40E_VF_STATE_ACTIVE,&vf->vf_states)){aq_ret=I40E_ERR_PARAM;gotoerror_param;
@@ -98,7 +98,6 @@ struct i40e_vf {unsignedinttx_rate;/* Tx bandwidth limit in Mbps */boollink_forced;boollink_up;/* only valid if VF link is forced */-boolqueues_enabled;/* true if the VF queues are enabled */boolspoofchk;u16num_vlan;
Hello:
This series was applied to netdev/net.git (refs/heads/master):
On Mon, 1 Feb 2021 13:46:14 -0800 you wrote:
This series contains updates to igc and i40e drivers.
Kai-Heng Feng fixes igc to report unknown speed and duplex during suspend
as an attempted read will cause errors.
Kevin Lo sets the default value to -IGC_ERR_NVM instead of success for
writing shadow RAM as this could miss a timeout. Also propagates the return
value for Flow Control configuration to properly pass on errors for igc.
[...]