* Re: [PATCH net] net: dsa: microchip: ksz8795: Correctly handle huge frame configuration
2023-04-17 18:19 [PATCH net] net: dsa: microchip: ksz8795: Correctly handle huge frame configuration Christophe JAILLET
@ 2023-04-18 4:21 ` Oleksij Rempel
2023-04-19 15:14 ` Simon Horman
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Oleksij Rempel @ 2023-04-18 4:21 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Woojung Huh, UNGLinuxDriver, Andrew Lunn, Florian Fainelli,
Vladimir Oltean, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Arun Ramadoss, Oleksij Rempel, linux-kernel,
kernel-janitors, netdev
Hi Christophe,
On Mon, Apr 17, 2023 at 08:19:33PM +0200, Christophe JAILLET wrote:
> Because of the logic in place, SW_HUGE_PACKET can never be set.
> (If the first condition is true, then the 2nd one is also true, but is not
> executed)
>
> Change the logic and update each bit individually.
>
> Fixes: 29d1e85f45e0 ("net: dsa: microchip: ksz8: add MTU configuration support")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Thank you!
> ---
> Untested.
I do not have access to this HW too.
> ---
> drivers/net/dsa/microchip/ksz8795.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c
> index 23614a937cc3..f56fca1b1a22 100644
> --- a/drivers/net/dsa/microchip/ksz8795.c
> +++ b/drivers/net/dsa/microchip/ksz8795.c
> @@ -96,7 +96,7 @@ static int ksz8795_change_mtu(struct ksz_device *dev, int frame_size)
>
> if (frame_size > KSZ8_LEGAL_PACKET_SIZE)
> ctrl2 |= SW_LEGAL_PACKET_DISABLE;
> - else if (frame_size > KSZ8863_NORMAL_PACKET_SIZE)
> + if (frame_size > KSZ8863_NORMAL_PACKET_SIZE)
> ctrl1 |= SW_HUGE_PACKET;
>
> ret = ksz_rmw8(dev, REG_SW_CTRL_1, SW_HUGE_PACKET, ctrl1);
> --
> 2.34.1
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH net] net: dsa: microchip: ksz8795: Correctly handle huge frame configuration
2023-04-17 18:19 [PATCH net] net: dsa: microchip: ksz8795: Correctly handle huge frame configuration Christophe JAILLET
2023-04-18 4:21 ` Oleksij Rempel
@ 2023-04-19 15:14 ` Simon Horman
2023-04-19 16:14 ` Vladimir Oltean
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2023-04-19 15:14 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Woojung Huh, UNGLinuxDriver, Andrew Lunn, Florian Fainelli,
Vladimir Oltean, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Arun Ramadoss, Oleksij Rempel, linux-kernel,
kernel-janitors, netdev
On Mon, Apr 17, 2023 at 08:19:33PM +0200, Christophe JAILLET wrote:
> Because of the logic in place, SW_HUGE_PACKET can never be set.
> (If the first condition is true, then the 2nd one is also true, but is not
> executed)
>
> Change the logic and update each bit individually.
>
> Fixes: 29d1e85f45e0 ("net: dsa: microchip: ksz8: add MTU configuration support")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Untested.
> ---
> drivers/net/dsa/microchip/ksz8795.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Horman <simon.horman@corigine.com>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH net] net: dsa: microchip: ksz8795: Correctly handle huge frame configuration
2023-04-17 18:19 [PATCH net] net: dsa: microchip: ksz8795: Correctly handle huge frame configuration Christophe JAILLET
2023-04-18 4:21 ` Oleksij Rempel
2023-04-19 15:14 ` Simon Horman
@ 2023-04-19 16:14 ` Vladimir Oltean
2023-04-19 17:46 ` Florian Fainelli
2023-04-19 21:20 ` patchwork-bot+netdevbpf
4 siblings, 0 replies; 6+ messages in thread
From: Vladimir Oltean @ 2023-04-19 16:14 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Woojung Huh, UNGLinuxDriver, Andrew Lunn, Florian Fainelli,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Arun Ramadoss, Oleksij Rempel, linux-kernel, kernel-janitors,
netdev
On Mon, Apr 17, 2023 at 08:19:33PM +0200, Christophe JAILLET wrote:
> Because of the logic in place, SW_HUGE_PACKET can never be set.
> (If the first condition is true, then the 2nd one is also true, but is not
> executed)
>
> Change the logic and update each bit individually.
>
> Fixes: 29d1e85f45e0 ("net: dsa: microchip: ksz8: add MTU configuration support")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Untested.
> ---
> drivers/net/dsa/microchip/ksz8795.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c
> index 23614a937cc3..f56fca1b1a22 100644
> --- a/drivers/net/dsa/microchip/ksz8795.c
> +++ b/drivers/net/dsa/microchip/ksz8795.c
> @@ -96,7 +96,7 @@ static int ksz8795_change_mtu(struct ksz_device *dev, int frame_size)
>
> if (frame_size > KSZ8_LEGAL_PACKET_SIZE)
> ctrl2 |= SW_LEGAL_PACKET_DISABLE;
> - else if (frame_size > KSZ8863_NORMAL_PACKET_SIZE)
> + if (frame_size > KSZ8863_NORMAL_PACKET_SIZE)
> ctrl1 |= SW_HUGE_PACKET;
>
> ret = ksz_rmw8(dev, REG_SW_CTRL_1, SW_HUGE_PACKET, ctrl1);
> --
> 2.34.1
>
After checking with the datasheet, the change looks indeed correct.
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH net] net: dsa: microchip: ksz8795: Correctly handle huge frame configuration
2023-04-17 18:19 [PATCH net] net: dsa: microchip: ksz8795: Correctly handle huge frame configuration Christophe JAILLET
` (2 preceding siblings ...)
2023-04-19 16:14 ` Vladimir Oltean
@ 2023-04-19 17:46 ` Florian Fainelli
2023-04-19 21:20 ` patchwork-bot+netdevbpf
4 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2023-04-19 17:46 UTC (permalink / raw)
To: Christophe JAILLET, Woojung Huh, UNGLinuxDriver, Andrew Lunn,
Vladimir Oltean, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Arun Ramadoss, Oleksij Rempel
Cc: linux-kernel, kernel-janitors, netdev
On 4/17/23 11:19, Christophe JAILLET wrote:
> Because of the logic in place, SW_HUGE_PACKET can never be set.
> (If the first condition is true, then the 2nd one is also true, but is not
> executed)
>
> Change the logic and update each bit individually.
>
> Fixes: 29d1e85f45e0 ("net: dsa: microchip: ksz8: add MTU configuration support")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH net] net: dsa: microchip: ksz8795: Correctly handle huge frame configuration
2023-04-17 18:19 [PATCH net] net: dsa: microchip: ksz8795: Correctly handle huge frame configuration Christophe JAILLET
` (3 preceding siblings ...)
2023-04-19 17:46 ` Florian Fainelli
@ 2023-04-19 21:20 ` patchwork-bot+netdevbpf
4 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-04-19 21:20 UTC (permalink / raw)
To: Christophe JAILLET
Cc: woojung.huh, UNGLinuxDriver, andrew, f.fainelli, olteanv, davem,
edumazet, kuba, pabeni, arun.ramadoss, linux, linux-kernel,
kernel-janitors, netdev
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 17 Apr 2023 20:19:33 +0200 you wrote:
> Because of the logic in place, SW_HUGE_PACKET can never be set.
> (If the first condition is true, then the 2nd one is also true, but is not
> executed)
>
> Change the logic and update each bit individually.
>
> Fixes: 29d1e85f45e0 ("net: dsa: microchip: ksz8: add MTU configuration support")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>
> [...]
Here is the summary with links:
- [net] net: dsa: microchip: ksz8795: Correctly handle huge frame configuration
https://git.kernel.org/netdev/net/c/3d2f8f1f184c
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