* [PATCH net] net: dsa: vsc73xx: fix possible subblocks range of CAPT block
@ 2024-09-03 20:33 Pawel Dembicki
2024-09-03 21:48 ` Florian Fainelli
2024-09-05 10:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Pawel Dembicki @ 2024-09-03 20:33 UTC (permalink / raw)
To: netdev
Cc: Pawel Dembicki, Andrew Lunn, Florian Fainelli, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Linus Walleij, linux-kernel
CAPT block (CPU Capture Buffer) have 7 sublocks: 0-3, 4, 6, 7.
Function 'vsc73xx_is_addr_valid' allows to use only block 0 at this
moment.
This patch fix it.
Fixes: 05bd97fc559d ("net: dsa: Add Vitesse VSC73xx DSA router driver")
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
---
drivers/net/dsa/vitesse-vsc73xx-core.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dsa/vitesse-vsc73xx-core.c b/drivers/net/dsa/vitesse-vsc73xx-core.c
index e3f95d2cc2c1..212421e9d42e 100644
--- a/drivers/net/dsa/vitesse-vsc73xx-core.c
+++ b/drivers/net/dsa/vitesse-vsc73xx-core.c
@@ -36,7 +36,7 @@
#define VSC73XX_BLOCK_ANALYZER 0x2 /* Only subblock 0 */
#define VSC73XX_BLOCK_MII 0x3 /* Subblocks 0 and 1 */
#define VSC73XX_BLOCK_MEMINIT 0x3 /* Only subblock 2 */
-#define VSC73XX_BLOCK_CAPTURE 0x4 /* Only subblock 2 */
+#define VSC73XX_BLOCK_CAPTURE 0x4 /* Subblocks 0-4, 6, 7 */
#define VSC73XX_BLOCK_ARBITER 0x5 /* Only subblock 0 */
#define VSC73XX_BLOCK_SYSTEM 0x7 /* Only subblock 0 */
@@ -410,13 +410,19 @@ int vsc73xx_is_addr_valid(u8 block, u8 subblock)
break;
case VSC73XX_BLOCK_MII:
- case VSC73XX_BLOCK_CAPTURE:
case VSC73XX_BLOCK_ARBITER:
switch (subblock) {
case 0 ... 1:
return 1;
}
break;
+ case VSC73XX_BLOCK_CAPTURE:
+ switch (subblock) {
+ case 0 ... 4:
+ case 6 ... 7:
+ return 1;
+ }
+ break;
}
return 0;
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net] net: dsa: vsc73xx: fix possible subblocks range of CAPT block
2024-09-03 20:33 [PATCH net] net: dsa: vsc73xx: fix possible subblocks range of CAPT block Pawel Dembicki
@ 2024-09-03 21:48 ` Florian Fainelli
2024-09-04 6:42 ` Paweł Dembicki
2024-09-05 10:50 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: Florian Fainelli @ 2024-09-03 21:48 UTC (permalink / raw)
To: Pawel Dembicki, netdev
Cc: Andrew Lunn, Vladimir Oltean, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Linus Walleij, linux-kernel
On 9/3/24 13:33, Pawel Dembicki wrote:
> CAPT block (CPU Capture Buffer) have 7 sublocks: 0-3, 4, 6, 7.
> Function 'vsc73xx_is_addr_valid' allows to use only block 0 at this
> moment.
>
> This patch fix it.
No objection to targeting 'net' as it is a proper bug fix, however there
is nothing in 'net' that currently depends upon VSC73XX_BLOCK_CAPTURE,
so this has no functional impact at the moment.
>
> Fixes: 05bd97fc559d ("net: dsa: Add Vitesse VSC73xx DSA router driver")
> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net] net: dsa: vsc73xx: fix possible subblocks range of CAPT block
2024-09-03 21:48 ` Florian Fainelli
@ 2024-09-04 6:42 ` Paweł Dembicki
0 siblings, 0 replies; 4+ messages in thread
From: Paweł Dembicki @ 2024-09-04 6:42 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Walleij,
linux-kernel
wt., 3 wrz 2024 o 23:48 Florian Fainelli <f.fainelli@gmail.com> napisał(a):
>
> On 9/3/24 13:33, Pawel Dembicki wrote:
> > CAPT block (CPU Capture Buffer) have 7 sublocks: 0-3, 4, 6, 7.
> > Function 'vsc73xx_is_addr_valid' allows to use only block 0 at this
> > moment.
> >
> > This patch fix it.
>
> No objection to targeting 'net' as it is a proper bug fix, however there
> is nothing in 'net' that currently depends upon VSC73XX_BLOCK_CAPTURE,
> so this has no functional impact at the moment.
Yes. I found it during work on the STP packet capture funcionality.
It's almost done, so I decided to send this fix to the 'net' before.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] net: dsa: vsc73xx: fix possible subblocks range of CAPT block
2024-09-03 20:33 [PATCH net] net: dsa: vsc73xx: fix possible subblocks range of CAPT block Pawel Dembicki
2024-09-03 21:48 ` Florian Fainelli
@ 2024-09-05 10:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-09-05 10:50 UTC (permalink / raw)
To: =?utf-8?q?Pawe=C5=82_Dembicki_=3Cpaweldembicki=40gmail=2Ecom=3E?=
Cc: netdev, andrew, f.fainelli, olteanv, davem, edumazet, kuba,
pabeni, linus.walleij, linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Tue, 3 Sep 2024 22:33:41 +0200 you wrote:
> CAPT block (CPU Capture Buffer) have 7 sublocks: 0-3, 4, 6, 7.
> Function 'vsc73xx_is_addr_valid' allows to use only block 0 at this
> moment.
>
> This patch fix it.
>
> Fixes: 05bd97fc559d ("net: dsa: Add Vitesse VSC73xx DSA router driver")
> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
>
> [...]
Here is the summary with links:
- [net] net: dsa: vsc73xx: fix possible subblocks range of CAPT block
https://git.kernel.org/netdev/net/c/8e69c96df771
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] 4+ messages in thread
end of thread, other threads:[~2024-09-05 10:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-03 20:33 [PATCH net] net: dsa: vsc73xx: fix possible subblocks range of CAPT block Pawel Dembicki
2024-09-03 21:48 ` Florian Fainelli
2024-09-04 6:42 ` Paweł Dembicki
2024-09-05 10:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox