Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says:
====================
Intel Wired LAN Driver Updates 2021-02-01
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 2ad1274fa3
("i40e: don't report link up for a VF
who hasn't enabled queues") as this can cause link flapping.
* '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
i40e: Revert "i40e: don't report link up for a VF who hasn't enabled queues"
igc: check return value of ret_val in igc_config_fc_after_link_up
igc: set the default return value to -IGC_ERR_NVM in igc_write_nvm_srwr
igc: Report speed and duplex as unknown when device is runtime suspended
====================
Link: https://lore.kernel.org/r/20210201214618.852831-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
188fa104f2
|
@ -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;
|
||||
} else if (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);
|
||||
|
@ -70,7 +65,6 @@ static void i40e_vc_notify_vf_link_state(struct i40e_vf *vf)
|
|||
pfe.event_data.link_event.link_speed =
|
||||
i40e_virtchnl_link_speed(ls->link_speed);
|
||||
}
|
||||
|
||||
i40e_aq_send_msg_to_vf(hw, abs_vf_id, VIRTCHNL_OP_EVENT,
|
||||
0, (u8 *)&pfe, sizeof(pfe), NULL);
|
||||
}
|
||||
|
@ -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 */
|
||||
return i40e_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)
|
|||
struct i40e_pf *pf = vf->pf;
|
||||
i40e_status aq_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;
|
||||
goto error_param;
|
||||
|
|
|
@ -98,7 +98,6 @@ struct i40e_vf {
|
|||
unsigned int tx_rate; /* Tx bandwidth limit in Mbps */
|
||||
bool link_forced;
|
||||
bool link_up; /* only valid if VF link is forced */
|
||||
bool queues_enabled; /* true if the VF queues are enabled */
|
||||
bool spoofchk;
|
||||
u16 num_vlan;
|
||||
|
||||
|
|
|
@ -1714,7 +1714,8 @@ static int igc_ethtool_get_link_ksettings(struct net_device *netdev,
|
|||
Asym_Pause);
|
||||
}
|
||||
|
||||
status = rd32(IGC_STATUS);
|
||||
status = pm_runtime_suspended(&adapter->pdev->dev) ?
|
||||
0 : rd32(IGC_STATUS);
|
||||
|
||||
if (status & IGC_STATUS_LU) {
|
||||
if (status & IGC_STATUS_SPEED_1000) {
|
||||
|
|
|
@ -219,9 +219,9 @@ static s32 igc_write_nvm_srwr(struct igc_hw *hw, u16 offset, u16 words,
|
|||
u16 *data)
|
||||
{
|
||||
struct igc_nvm_info *nvm = &hw->nvm;
|
||||
s32 ret_val = -IGC_ERR_NVM;
|
||||
u32 attempts = 100000;
|
||||
u32 i, k, eewr = 0;
|
||||
s32 ret_val = 0;
|
||||
|
||||
/* A check for invalid values: offset too large, too many words,
|
||||
* too many words for the offset, and not enough words.
|
||||
|
@ -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;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
|
@ -638,7 +638,7 @@ s32 igc_config_fc_after_link_up(struct igc_hw *hw)
|
|||
}
|
||||
|
||||
out:
|
||||
return 0;
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue