All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v2] net: sparx5: fix wrong config being used when reconfiguring PCS
@ 2024-04-09 10:41 ` Daniel Machon
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Machon @ 2024-04-09 10:41 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Lars Povlsen, Steen Hegelund, UNGLinuxDriver, Bjarni Jonasson
  Cc: linux, netdev, linux-arm-kernel, linux-kernel, Steen Hegelund,
	Daniel Machon

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(-)

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,
-- 
Daniel Machon <daniel.machon@microchip.com>


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net v2] net: sparx5: fix wrong config being used when reconfiguring PCS
@ 2024-04-09 10:41 ` Daniel Machon
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Machon @ 2024-04-09 10:41 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Lars Povlsen, Steen Hegelund, UNGLinuxDriver, Bjarni Jonasson
  Cc: linux, netdev, linux-arm-kernel, linux-kernel, Steen Hegelund,
	Daniel Machon

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(-)

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,
-- 
Daniel Machon <daniel.machon@microchip.com>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH net v2] net: sparx5: fix wrong config being used when reconfiguring PCS
  2024-04-09 10:41 ` Daniel Machon
@ 2024-04-10  0:03   ` Jacob Keller
  -1 siblings, 0 replies; 6+ messages in thread
From: Jacob Keller @ 2024-04-10  0:03 UTC (permalink / raw)
  To: Daniel Machon, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Lars Povlsen, Steen Hegelund, UNGLinuxDriver,
	Bjarni Jonasson
  Cc: linux, netdev, linux-arm-kernel, linux-kernel



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,

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net v2] net: sparx5: fix wrong config being used when reconfiguring PCS
@ 2024-04-10  0:03   ` Jacob Keller
  0 siblings, 0 replies; 6+ messages in thread
From: Jacob Keller @ 2024-04-10  0:03 UTC (permalink / raw)
  To: Daniel Machon, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Lars Povlsen, Steen Hegelund, UNGLinuxDriver,
	Bjarni Jonasson
  Cc: linux, netdev, linux-arm-kernel, linux-kernel



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,

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net v2] net: sparx5: fix wrong config being used when reconfiguring PCS
  2024-04-09 10:41 ` Daniel Machon
@ 2024-04-11  7:10   ` patchwork-bot+netdevbpf
  -1 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-04-11  7:10 UTC (permalink / raw)
  To: Daniel Machon
  Cc: davem, edumazet, kuba, pabeni, lars.povlsen, Steen.Hegelund,
	UNGLinuxDriver, bjarni.jonasson, linux, netdev, linux-arm-kernel,
	linux-kernel, steen.hegelund

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net v2] net: sparx5: fix wrong config being used when reconfiguring PCS
@ 2024-04-11  7:10   ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-04-11  7:10 UTC (permalink / raw)
  To: Daniel Machon
  Cc: davem, edumazet, kuba, pabeni, lars.povlsen, Steen.Hegelund,
	UNGLinuxDriver, bjarni.jonasson, linux, netdev, linux-arm-kernel,
	linux-kernel, steen.hegelund

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-11  7:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-09 10:41 [PATCH net v2] net: sparx5: fix wrong config being used when reconfiguring PCS Daniel Machon
2024-04-09 10:41 ` Daniel Machon
2024-04-10  0:03 ` Jacob Keller
2024-04-10  0:03   ` Jacob Keller
2024-04-11  7:10 ` patchwork-bot+netdevbpf
2024-04-11  7:10   ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.