Skip to content

Commit 0fa4f91

Browse files
committed
Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-12-27 (ice, i40e) This series contains updates to ice and i40e drivers. Katarzyna changes message to no longer be reported as error under certain conditions as it can be expected on ice. Ngai-Mint ensures VSI is always closed when stopping interface to prevent NULL pointer dereference for ice. Arkadiusz corrects reporting of phase offset value for ice. Sudheer corrects checking on ADQ filters to prevent invalid values on i40e. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: i40e: Fix filter input checks to prevent config with invalid values ice: dpll: fix phase offset value ice: Shut down VSI with "link-down-on-close" enabled ice: Fix link_down_on_close message ==================== Link: https://lore.kernel.org/r/20231227182541.3033124-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents 9dbe086 + 3e48041 commit 0fa4f91

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3521,16 +3521,16 @@ static int i40e_validate_cloud_filter(struct i40e_vf *vf,
35213521
bool found = false;
35223522
int bkt;
35233523

3524-
if (!tc_filter->action) {
3524+
if (tc_filter->action != VIRTCHNL_ACTION_TC_REDIRECT) {
35253525
dev_info(&pf->pdev->dev,
3526-
"VF %d: Currently ADq doesn't support Drop Action\n",
3527-
vf->vf_id);
3526+
"VF %d: ADQ doesn't support this action (%d)\n",
3527+
vf->vf_id, tc_filter->action);
35283528
goto err;
35293529
}
35303530

35313531
/* action_meta is TC number here to which the filter is applied */
35323532
if (!tc_filter->action_meta ||
3533-
tc_filter->action_meta > I40E_MAX_VF_VSI) {
3533+
tc_filter->action_meta > vf->num_tc) {
35343534
dev_info(&pf->pdev->dev, "VF %d: Invalid TC number %u\n",
35353535
vf->vf_id, tc_filter->action_meta);
35363536
goto err;

drivers/net/ethernet/intel/ice/ice_common.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5332,7 +5332,6 @@ ice_aq_get_cgu_dpll_status(struct ice_hw *hw, u8 dpll_num, u8 *ref_state,
53325332
u8 *eec_mode)
53335333
{
53345334
struct ice_aqc_get_cgu_dpll_status *cmd;
5335-
const s64 nsec_per_psec = 1000LL;
53365335
struct ice_aq_desc desc;
53375336
int status;
53385337

@@ -5348,8 +5347,7 @@ ice_aq_get_cgu_dpll_status(struct ice_hw *hw, u8 dpll_num, u8 *ref_state,
53485347
*phase_offset = le32_to_cpu(cmd->phase_offset_h);
53495348
*phase_offset <<= 32;
53505349
*phase_offset += le32_to_cpu(cmd->phase_offset_l);
5351-
*phase_offset = div64_s64(sign_extend64(*phase_offset, 47),
5352-
nsec_per_psec);
5350+
*phase_offset = sign_extend64(*phase_offset, 47);
53535351
*eec_mode = cmd->eec_mode;
53545352
}
53555353

drivers/net/ethernet/intel/ice/ice_main.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2146,7 +2146,7 @@ static int ice_configure_phy(struct ice_vsi *vsi)
21462146

21472147
/* Ensure we have media as we cannot configure a medialess port */
21482148
if (!(phy->link_info.link_info & ICE_AQ_MEDIA_AVAILABLE))
2149-
return -EPERM;
2149+
return -ENOMEDIUM;
21502150

21512151
ice_print_topo_conflict(vsi);
21522152

@@ -9187,8 +9187,14 @@ int ice_stop(struct net_device *netdev)
91879187
int link_err = ice_force_phys_link_state(vsi, false);
91889188

91899189
if (link_err) {
9190-
netdev_err(vsi->netdev, "Failed to set physical link down, VSI %d error %d\n",
9191-
vsi->vsi_num, link_err);
9190+
if (link_err == -ENOMEDIUM)
9191+
netdev_info(vsi->netdev, "Skipping link reconfig - no media attached, VSI %d\n",
9192+
vsi->vsi_num);
9193+
else
9194+
netdev_err(vsi->netdev, "Failed to set physical link down, VSI %d error %d\n",
9195+
vsi->vsi_num, link_err);
9196+
9197+
ice_vsi_close(vsi);
91929198
return -EIO;
91939199
}
91949200
}

0 commit comments

Comments
 (0)