summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKatarzyna Wieczerzycka <katarzyna.wieczerzycka@intel.com>2023-12-15 12:01:56 +0100
committerTony Nguyen <anthony.l.nguyen@intel.com>2023-12-27 19:07:11 +0100
commit6a8d8bb55e7001de2d50920381cc858f3a3e9fb7 (patch)
treebdc8ce44dae35b94198da75a5835a15ae514e5da
parentMerge tag 'wireless-2023-12-19' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
downloadlinux-6a8d8bb55e7001de2d50920381cc858f3a3e9fb7.tar.xz
linux-6a8d8bb55e7001de2d50920381cc858f3a3e9fb7.zip
ice: Fix link_down_on_close message
The driver should not report an error message when for a medialess port the link_down_on_close flag is enabled and the physical link cannot be set down. Fixes: 8ac7132704f3 ("ice: Fix interface being down after reset with link-down-on-close flag on") Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com> Signed-off-by: Katarzyna Wieczerzycka <katarzyna.wieczerzycka@intel.com> Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
-rw-r--r--drivers/net/ethernet/intel/ice/ice_main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index fb9c93f37e84..270d68b69c59 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -2146,7 +2146,7 @@ static int ice_configure_phy(struct ice_vsi *vsi)
/* Ensure we have media as we cannot configure a medialess port */
if (!(phy->link_info.link_info & ICE_AQ_MEDIA_AVAILABLE))
- return -EPERM;
+ return -ENOMEDIUM;
ice_print_topo_conflict(vsi);
@@ -9187,8 +9187,12 @@ int ice_stop(struct net_device *netdev)
int link_err = ice_force_phys_link_state(vsi, false);
if (link_err) {
- netdev_err(vsi->netdev, "Failed to set physical link down, VSI %d error %d\n",
- vsi->vsi_num, link_err);
+ if (link_err == -ENOMEDIUM)
+ netdev_info(vsi->netdev, "Skipping link reconfig - no media attached, VSI %d\n",
+ vsi->vsi_num);
+ else
+ netdev_err(vsi->netdev, "Failed to set physical link down, VSI %d error %d\n",
+ vsi->vsi_num, link_err);
return -EIO;
}
}