* [PATCH] net: marvell: fix MVNETA_TX_IN_PRGRS bit number
@ 2021-08-20 15:39 Maxim Kiselev
2021-08-20 22:09 ` Jakub Kicinski
2021-08-23 12:00 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 6+ messages in thread
From: Maxim Kiselev @ 2021-08-20 15:39 UTC (permalink / raw)
Cc: Maxim Kiselev, Thomas Petazzoni, David S. Miller, Jakub Kicinski,
netdev, linux-kernel
According to Armada XP datasheet bit at 0 position is corresponding for
TxInProg indication.
Signed-off-by: Maxim Kiselev <bigunclemax@gmail.com>
---
drivers/net/ethernet/marvell/mvneta.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 76a7777c746da..de32e5b49053b 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -105,7 +105,7 @@
#define MVNETA_VLAN_PRIO_TO_RXQ 0x2440
#define MVNETA_VLAN_PRIO_RXQ_MAP(prio, rxq) ((rxq) << ((prio) * 3))
#define MVNETA_PORT_STATUS 0x2444
-#define MVNETA_TX_IN_PRGRS BIT(1)
+#define MVNETA_TX_IN_PRGRS BIT(0)
#define MVNETA_TX_FIFO_EMPTY BIT(8)
#define MVNETA_RX_MIN_FRAME_SIZE 0x247c
/* Only exists on Armada XP and Armada 370 */
--
2.30.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] net: marvell: fix MVNETA_TX_IN_PRGRS bit number
2021-08-20 15:39 [PATCH] net: marvell: fix MVNETA_TX_IN_PRGRS bit number Maxim Kiselev
@ 2021-08-20 22:09 ` Jakub Kicinski
2021-08-23 12:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 6+ messages in thread
From: Jakub Kicinski @ 2021-08-20 22:09 UTC (permalink / raw)
To: Maxim Kiselev; +Cc: Thomas Petazzoni, David S. Miller, netdev, linux-kernel
On Fri, 20 Aug 2021 18:39:51 +0300 Maxim Kiselev wrote:
> According to Armada XP datasheet bit at 0 position is corresponding for
> TxInProg indication.
>
> Signed-off-by: Maxim Kiselev <bigunclemax@gmail.com>
Fixes: c5aff18204da ("net: mvneta: driver for Marvell Armada 370/XP network unit")
?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] net: marvell: fix MVNETA_TX_IN_PRGRS bit number
2021-08-20 15:39 [PATCH] net: marvell: fix MVNETA_TX_IN_PRGRS bit number Maxim Kiselev
2021-08-20 22:09 ` Jakub Kicinski
@ 2021-08-23 12:00 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-08-23 12:00 UTC (permalink / raw)
To: Maxim Kiselev; +Cc: thomas.petazzoni, davem, kuba, netdev, linux-kernel
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Fri, 20 Aug 2021 18:39:51 +0300 you wrote:
> According to Armada XP datasheet bit at 0 position is corresponding for
> TxInProg indication.
>
> Signed-off-by: Maxim Kiselev <bigunclemax@gmail.com>
> ---
> drivers/net/ethernet/marvell/mvneta.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- net: marvell: fix MVNETA_TX_IN_PRGRS bit number
https://git.kernel.org/netdev/net/c/359f4cdd7d78
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: marvell: fix MVNETA_TX_IN_PRGRS bit number
2021-08-06 14:04 Maksim
2021-08-06 14:22 ` Thomas Petazzoni
@ 2021-08-06 23:17 ` Jakub Kicinski
1 sibling, 0 replies; 6+ messages in thread
From: Jakub Kicinski @ 2021-08-06 23:17 UTC (permalink / raw)
To: Maksim; +Cc: Thomas Petazzoni, David S. Miller, netdev, linux-kernel
On Fri, 6 Aug 2021 17:04:37 +0300 Maksim wrote:
> According to Armada XP datasheet bit at 0 position is corresponding for
> TxInProg indication.
>
> Signed-off-by: Maksim <bigunclemax@gmail.com>
We'll need your full name in the From and Sign-off tag.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] net: marvell: fix MVNETA_TX_IN_PRGRS bit number
2021-08-06 14:04 Maksim
@ 2021-08-06 14:22 ` Thomas Petazzoni
2021-08-06 23:17 ` Jakub Kicinski
1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2021-08-06 14:22 UTC (permalink / raw)
To: Maksim; +Cc: David S. Miller, Jakub Kicinski, netdev, linux-kernel
Hello,
On Fri, 6 Aug 2021 17:04:37 +0300
Maksim <bigunclemax@gmail.com> wrote:
> According to Armada XP datasheet bit at 0 position is corresponding for
> TxInProg indication.
>
> Signed-off-by: Maksim <bigunclemax@gmail.com>
> ---
> drivers/net/ethernet/marvell/mvneta.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
> index 76a7777c746da..de32e5b49053b 100644
> --- a/drivers/net/ethernet/marvell/mvneta.c
> +++ b/drivers/net/ethernet/marvell/mvneta.c
> @@ -105,7 +105,7 @@
> #define MVNETA_VLAN_PRIO_TO_RXQ 0x2440
> #define MVNETA_VLAN_PRIO_RXQ_MAP(prio, rxq) ((rxq) << ((prio) * 3))
> #define MVNETA_PORT_STATUS 0x2444
> -#define MVNETA_TX_IN_PRGRS BIT(1)
> +#define MVNETA_TX_IN_PRGRS BIT(0)
> #define MVNETA_TX_FIFO_EMPTY BIT(8)
> #define MVNETA_RX_MIN_FRAME_SIZE 0x247c
> /* Only exists on Armada XP and Armada 370 */
Indeed, I just checked the datasheet, and it's bit 0 in this register
that indicates if transmit is in progress. The only function using this
is mvneta_port_down(), which polls until MVNETA_TX_FIFO_EMPTY is set
and MVNETA_TX_IN_PRGRS is cleared in this register. Bit 1 in this
register is marked as reserved, read-only and read as zero, so I
suppose that mvneta_port_down() was basically never waiting for
MVNETA_TX_IN_PRGRS to clear.
Have you seen some actual visible issue, or was this just found by code
inspection ?
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] net: marvell: fix MVNETA_TX_IN_PRGRS bit number
@ 2021-08-06 14:04 Maksim
2021-08-06 14:22 ` Thomas Petazzoni
2021-08-06 23:17 ` Jakub Kicinski
0 siblings, 2 replies; 6+ messages in thread
From: Maksim @ 2021-08-06 14:04 UTC (permalink / raw)
Cc: Maksim, Thomas Petazzoni, David S. Miller, Jakub Kicinski,
netdev, linux-kernel
According to Armada XP datasheet bit at 0 position is corresponding for
TxInProg indication.
Signed-off-by: Maksim <bigunclemax@gmail.com>
---
drivers/net/ethernet/marvell/mvneta.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 76a7777c746da..de32e5b49053b 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -105,7 +105,7 @@
#define MVNETA_VLAN_PRIO_TO_RXQ 0x2440
#define MVNETA_VLAN_PRIO_RXQ_MAP(prio, rxq) ((rxq) << ((prio) * 3))
#define MVNETA_PORT_STATUS 0x2444
-#define MVNETA_TX_IN_PRGRS BIT(1)
+#define MVNETA_TX_IN_PRGRS BIT(0)
#define MVNETA_TX_FIFO_EMPTY BIT(8)
#define MVNETA_RX_MIN_FRAME_SIZE 0x247c
/* Only exists on Armada XP and Armada 370 */
--
2.30.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-08-23 12:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20 15:39 [PATCH] net: marvell: fix MVNETA_TX_IN_PRGRS bit number Maxim Kiselev
2021-08-20 22:09 ` Jakub Kicinski
2021-08-23 12:00 ` patchwork-bot+netdevbpf
-- strict thread matches above, loose matches on Subject: below --
2021-08-06 14:04 Maksim
2021-08-06 14:22 ` Thomas Petazzoni
2021-08-06 23:17 ` Jakub Kicinski
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.