public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 net] net: dsa: felix: ignore pending status of TAS module when it's disabled
@ 2024-09-06  9:35 Xiaoliang Yang
  2024-09-11 23:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Xiaoliang Yang @ 2024-09-06  9:35 UTC (permalink / raw)
  To: netdev
  Cc: davem, kuba, pabeni, vladimir.oltean, claudiu.manoil,
	alexandre.belloni, UNGLinuxDriver, andrew, f.fainelli, michael,
	linux-kernel, xiaoliang.yang_1

The TAS module could not be configured when it's running in pending
status. We need disable the module and configure it again. However, the
pending status is not cleared after the module disabled. TC taprio set
will always return busy even it's disabled.

For example, a user uses tc-taprio to configure Qbv and a future
basetime. The TAS module will run in a pending status. There is no way
to reconfigure Qbv, it always returns busy.

Actually the TAS module can be reconfigured when it's disabled. So it
doesn't need to check the pending status if the TAS module is disabled.

After the patch, user can delete the tc taprio configuration to disable
Qbv and reconfigure it again.

Fixes: de143c0e274b ("net: dsa: felix: Configure Time-Aware Scheduler via taprio offload")
Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
---
 drivers/net/dsa/ocelot/felix_vsc9959.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c
index ba37a566da39..ecfa73725d25 100644
--- a/drivers/net/dsa/ocelot/felix_vsc9959.c
+++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
@@ -1474,10 +1474,13 @@ static int vsc9959_qos_port_tas_set(struct ocelot *ocelot, int port,
 	/* Hardware errata -  Admin config could not be overwritten if
 	 * config is pending, need reset the TAS module
 	 */
-	val = ocelot_read(ocelot, QSYS_PARAM_STATUS_REG_8);
-	if (val & QSYS_PARAM_STATUS_REG_8_CONFIG_PENDING) {
-		ret = -EBUSY;
-		goto err_reset_tc;
+	val = ocelot_read_rix(ocelot, QSYS_TAG_CONFIG, port);
+	if (val & QSYS_TAG_CONFIG_ENABLE) {
+		val = ocelot_read(ocelot, QSYS_PARAM_STATUS_REG_8);
+		if (val & QSYS_PARAM_STATUS_REG_8_CONFIG_PENDING) {
+			ret = -EBUSY;
+			goto err_reset_tc;
+		}
 	}
 
 	ocelot_rmw_rix(ocelot,
-- 
2.17.1


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

* Re: [PATCH v2 net] net: dsa: felix: ignore pending status of TAS module when it's disabled
  2024-09-06  9:35 [PATCH v2 net] net: dsa: felix: ignore pending status of TAS module when it's disabled Xiaoliang Yang
@ 2024-09-11 23:20 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-09-11 23:20 UTC (permalink / raw)
  To: Xiaoliang Yang
  Cc: netdev, davem, kuba, pabeni, vladimir.oltean, claudiu.manoil,
	alexandre.belloni, UNGLinuxDriver, andrew, f.fainelli, michael,
	linux-kernel

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri,  6 Sep 2024 17:35:50 +0800 you wrote:
> The TAS module could not be configured when it's running in pending
> status. We need disable the module and configure it again. However, the
> pending status is not cleared after the module disabled. TC taprio set
> will always return busy even it's disabled.
> 
> For example, a user uses tc-taprio to configure Qbv and a future
> basetime. The TAS module will run in a pending status. There is no way
> to reconfigure Qbv, it always returns busy.
> 
> [...]

Here is the summary with links:
  - [v2,net] net: dsa: felix: ignore pending status of TAS module when it's disabled
    https://git.kernel.org/netdev/net/c/70654f4c212e

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] 2+ messages in thread

end of thread, other threads:[~2024-09-11 23:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-06  9:35 [PATCH v2 net] net: dsa: felix: ignore pending status of TAS module when it's disabled Xiaoliang Yang
2024-09-11 23:20 ` 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