From: Greg Kroah-Hartman Date: Thu, 4 Nov 2021 08:20:11 +0000 (+0100) Subject: 5.4-stable patches X-Git-Tag: v4.19.216~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d9236571c7372bcd929343a60b1afacf53b6a8ea;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: sfc-fix-reading-non-legacy-supported-link-modes.patch --- diff --git a/queue-5.4/series b/queue-5.4/series index e7260d86358..1cf8ab41000 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -4,3 +4,4 @@ net-ethernet-microchip-lan743x-fix-skb-allocation-failure.patch media-firewire-firedtv-avc-fix-a-buffer-overflow-in-avc_ca_pmt.patch revert-xhci-set-hcd-flag-to-defer-primary-roothub-registration.patch revert-usb-core-hcd-add-support-for-deferring-roothub.patch +sfc-fix-reading-non-legacy-supported-link-modes.patch diff --git a/queue-5.4/sfc-fix-reading-non-legacy-supported-link-modes.patch b/queue-5.4/sfc-fix-reading-non-legacy-supported-link-modes.patch new file mode 100644 index 00000000000..07f3f81bed6 --- /dev/null +++ b/queue-5.4/sfc-fix-reading-non-legacy-supported-link-modes.patch @@ -0,0 +1,48 @@ +From 041c61488236a5a84789083e3d9f0a51139b6edf Mon Sep 17 00:00:00 2001 +From: Erik Ekman +Date: Sun, 17 Oct 2021 19:16:57 +0200 +Subject: sfc: Fix reading non-legacy supported link modes + +From: Erik Ekman + +commit 041c61488236a5a84789083e3d9f0a51139b6edf upstream. + +Everything except the first 32 bits was lost when the pause flags were +added. This makes the 50000baseCR2 mode flag (bit 34) not appear. + +I have tested this with a 10G card (SFN5122F-R7) by modifying it to +return a non-legacy link mode (10000baseCR). + +Signed-off-by: Erik Ekman +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/sfc/ethtool.c | 10 ++-------- + 1 file changed, 2 insertions(+), 8 deletions(-) + +--- a/drivers/net/ethernet/sfc/ethtool.c ++++ b/drivers/net/ethernet/sfc/ethtool.c +@@ -128,20 +128,14 @@ efx_ethtool_get_link_ksettings(struct ne + { + struct efx_nic *efx = netdev_priv(net_dev); + struct efx_link_state *link_state = &efx->link_state; +- u32 supported; + + mutex_lock(&efx->mac_lock); + efx->phy_op->get_link_ksettings(efx, cmd); + mutex_unlock(&efx->mac_lock); + + /* Both MACs support pause frames (bidirectional and respond-only) */ +- ethtool_convert_link_mode_to_legacy_u32(&supported, +- cmd->link_modes.supported); +- +- supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause; +- +- ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported, +- supported); ++ ethtool_link_ksettings_add_link_mode(cmd, supported, Pause); ++ ethtool_link_ksettings_add_link_mode(cmd, supported, Asym_Pause); + + if (LOOPBACK_INTERNAL(efx)) { + cmd->base.speed = link_state->speed;