diff mbox series

[net,v2] net: sparx5: fix wrong config being used when reconfiguring PCS

Message ID 20240409-link-mode-reconfiguration-fix-v2-1-db6a507f3627@microchip.com (mailing list archive)
State Accepted
Commit 33623113a48ea906f1955cbf71094f6aa4462e8f
Delegated to: Netdev Maintainers
Headers show
Series [net,v2] net: sparx5: fix wrong config being used when reconfiguring PCS | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 942 this patch: 942
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 10 of 10 maintainers
netdev/build_clang success Errors and warnings before: 953 this patch: 953
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 953 this patch: 953
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-04-10--06-00 (tests: 962)

Commit Message

Daniel Machon April 9, 2024, 10:41 a.m. UTC
The wrong port config is being used if the PCS is reconfigured. Fix this
by correctly using the new config instead of the old one.

Fixes: 946e7fd5053a ("net: sparx5: add port module support")
Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
---
Changes in v2:
- Rewrite subject and commit description
- Link to v1: https://lore.kernel.org/r/20240405-link-mode-reconfiguration-fix-v1-1-c1480bc2346a@microchip.com
---
 drivers/net/ethernet/microchip/sparx5/sparx5_port.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


---
base-commit: 1c25fe9a044d5334153a3585754b26553f8287b9
change-id: 20240305-link-mode-reconfiguration-fix-df961fef5505

Best regards,

Comments

Jacob Keller April 10, 2024, 12:03 a.m. UTC | #1
On 4/9/2024 3:41 AM, Daniel Machon wrote:
> The wrong port config is being used if the PCS is reconfigured. Fix this
> by correctly using the new config instead of the old one.
> 
> Fixes: 946e7fd5053a ("net: sparx5: add port module support")
> Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
> ---

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>

> Changes in v2:
> - Rewrite subject and commit description
> - Link to v1: https://lore.kernel.org/r/20240405-link-mode-reconfiguration-fix-v1-1-c1480bc2346a@microchip.com
> ---
>  drivers/net/ethernet/microchip/sparx5/sparx5_port.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_port.c b/drivers/net/ethernet/microchip/sparx5/sparx5_port.c
> index 3a1b1a1f5a19..60dd2fd603a8 100644
> --- a/drivers/net/ethernet/microchip/sparx5/sparx5_port.c
> +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_port.c
> @@ -731,7 +731,7 @@ static int sparx5_port_pcs_low_set(struct sparx5 *sparx5,
>  	bool sgmii = false, inband_aneg = false;
>  	int err;
>  
> -	if (port->conf.inband) {
> +	if (conf->inband) {
>  		if (conf->portmode == PHY_INTERFACE_MODE_SGMII ||
>  		    conf->portmode == PHY_INTERFACE_MODE_QSGMII)
>  			inband_aneg = true; /* Cisco-SGMII in-band-aneg */
> @@ -948,7 +948,7 @@ int sparx5_port_pcs_set(struct sparx5 *sparx5,
>  	if (err)
>  		return -EINVAL;
>  
> -	if (port->conf.inband) {
> +	if (conf->inband) {
>  		/* Enable/disable 1G counters in ASM */
>  		spx5_rmw(ASM_PORT_CFG_CSC_STAT_DIS_SET(high_speed_dev),
>  			 ASM_PORT_CFG_CSC_STAT_DIS,
> 
> ---
> base-commit: 1c25fe9a044d5334153a3585754b26553f8287b9
> change-id: 20240305-link-mode-reconfiguration-fix-df961fef5505
> 
> Best regards,
patchwork-bot+netdevbpf@kernel.org April 11, 2024, 7:10 a.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Tue, 9 Apr 2024 12:41:59 +0200 you wrote:
> The wrong port config is being used if the PCS is reconfigured. Fix this
> by correctly using the new config instead of the old one.
> 
> Fixes: 946e7fd5053a ("net: sparx5: add port module support")
> Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
> ---
> Changes in v2:
> - Rewrite subject and commit description
> - Link to v1: https://lore.kernel.org/r/20240405-link-mode-reconfiguration-fix-v1-1-c1480bc2346a@microchip.com
> 
> [...]

Here is the summary with links:
  - [net,v2] net: sparx5: fix wrong config being used when reconfiguring PCS
    https://git.kernel.org/netdev/net/c/33623113a48e

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_port.c b/drivers/net/ethernet/microchip/sparx5/sparx5_port.c
index 3a1b1a1f5a19..60dd2fd603a8 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_port.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_port.c
@@ -731,7 +731,7 @@  static int sparx5_port_pcs_low_set(struct sparx5 *sparx5,
 	bool sgmii = false, inband_aneg = false;
 	int err;
 
-	if (port->conf.inband) {
+	if (conf->inband) {
 		if (conf->portmode == PHY_INTERFACE_MODE_SGMII ||
 		    conf->portmode == PHY_INTERFACE_MODE_QSGMII)
 			inband_aneg = true; /* Cisco-SGMII in-band-aneg */
@@ -948,7 +948,7 @@  int sparx5_port_pcs_set(struct sparx5 *sparx5,
 	if (err)
 		return -EINVAL;
 
-	if (port->conf.inband) {
+	if (conf->inband) {
 		/* Enable/disable 1G counters in ASM */
 		spx5_rmw(ASM_PORT_CFG_CSC_STAT_DIS_SET(high_speed_dev),
 			 ASM_PORT_CFG_CSC_STAT_DIS,