* [PATCH net] net: ti: icss-iep: Reject perout generation request
@ 2025-02-27 9:24 Meghana Malladi
2025-02-27 16:06 ` Vadim Fedorenko
2025-02-27 16:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Meghana Malladi @ 2025-02-27 9:24 UTC (permalink / raw)
To: vigneshr, javier.carrasco.cruz, m-malladi, jacob.e.keller,
diogo.ivo, horms, richardcochran, pabeni, kuba, edumazet, davem,
andrew+netdev
Cc: linux-kernel, netdev, linux-arm-kernel, srk, Roger Quadros,
danishanwar
IEP driver supports both perout and pps signal generation
but perout feature is faulty with half-cooked support
due to some missing configuration. Remove perout
support from the driver and reject perout requests with
"not supported" error code.
Fixes: c1e0230eeaab2 ("net: ti: icss-iep: Add IEP driver")
Signed-off-by: Meghana Malladi <m-malladi@ti.com>
---
This patch is a bug fix to disable/remove a faulty feature, which will be
enabled separately as a feature addition to net-next, as suggested by
Jakub Kicinski and Jacob Keller:
https://lore.kernel.org/all/20250220172410.025b96d6@kernel.org/
drivers/net/ethernet/ti/icssg/icss_iep.c | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/drivers/net/ethernet/ti/icssg/icss_iep.c b/drivers/net/ethernet/ti/icssg/icss_iep.c
index 768578c0d958..d59c1744840a 100644
--- a/drivers/net/ethernet/ti/icssg/icss_iep.c
+++ b/drivers/net/ethernet/ti/icssg/icss_iep.c
@@ -474,26 +474,7 @@ static int icss_iep_perout_enable_hw(struct icss_iep *iep,
static int icss_iep_perout_enable(struct icss_iep *iep,
struct ptp_perout_request *req, int on)
{
- int ret = 0;
-
- mutex_lock(&iep->ptp_clk_mutex);
-
- if (iep->pps_enabled) {
- ret = -EBUSY;
- goto exit;
- }
-
- if (iep->perout_enabled == !!on)
- goto exit;
-
- ret = icss_iep_perout_enable_hw(iep, req, on);
- if (!ret)
- iep->perout_enabled = !!on;
-
-exit:
- mutex_unlock(&iep->ptp_clk_mutex);
-
- return ret;
+ return -EOPNOTSUPP;
}
static void icss_iep_cap_cmp_work(struct work_struct *work)
base-commit: 29b036be1b0bfcfc958380d5931325997fddf08a
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: ti: icss-iep: Reject perout generation request
2025-02-27 9:24 [PATCH net] net: ti: icss-iep: Reject perout generation request Meghana Malladi
@ 2025-02-27 16:06 ` Vadim Fedorenko
2025-02-27 16:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Vadim Fedorenko @ 2025-02-27 16:06 UTC (permalink / raw)
To: Meghana Malladi, vigneshr, javier.carrasco.cruz, jacob.e.keller,
diogo.ivo, horms, richardcochran, pabeni, kuba, edumazet, davem,
andrew+netdev
Cc: linux-kernel, netdev, linux-arm-kernel, srk, Roger Quadros,
danishanwar
On 27/02/2025 09:24, Meghana Malladi wrote:
> IEP driver supports both perout and pps signal generation
> but perout feature is faulty with half-cooked support
> due to some missing configuration. Remove perout
> support from the driver and reject perout requests with
> "not supported" error code.
>
> Fixes: c1e0230eeaab2 ("net: ti: icss-iep: Add IEP driver")
> Signed-off-by: Meghana Malladi <m-malladi@ti.com>
> ---
>
> This patch is a bug fix to disable/remove a faulty feature, which will be
> enabled separately as a feature addition to net-next, as suggested by
> Jakub Kicinski and Jacob Keller:
> https://lore.kernel.org/all/20250220172410.025b96d6@kernel.org/
>
> drivers/net/ethernet/ti/icssg/icss_iep.c | 21 +--------------------
> 1 file changed, 1 insertion(+), 20 deletions(-)
>
> diff --git a/drivers/net/ethernet/ti/icssg/icss_iep.c b/drivers/net/ethernet/ti/icssg/icss_iep.c
> index 768578c0d958..d59c1744840a 100644
> --- a/drivers/net/ethernet/ti/icssg/icss_iep.c
> +++ b/drivers/net/ethernet/ti/icssg/icss_iep.c
> @@ -474,26 +474,7 @@ static int icss_iep_perout_enable_hw(struct icss_iep *iep,
> static int icss_iep_perout_enable(struct icss_iep *iep,
> struct ptp_perout_request *req, int on)
> {
> - int ret = 0;
> -
> - mutex_lock(&iep->ptp_clk_mutex);
> -
> - if (iep->pps_enabled) {
> - ret = -EBUSY;
> - goto exit;
> - }
> -
> - if (iep->perout_enabled == !!on)
> - goto exit;
> -
> - ret = icss_iep_perout_enable_hw(iep, req, on);
> - if (!ret)
> - iep->perout_enabled = !!on;
> -
> -exit:
> - mutex_unlock(&iep->ptp_clk_mutex);
> -
> - return ret;
> + return -EOPNOTSUPP;
> }
>
> static void icss_iep_cap_cmp_work(struct work_struct *work)
>
> base-commit: 29b036be1b0bfcfc958380d5931325997fddf08a
LGTM. It maybe cleaner to remove PTP_CLK_REQ_PEROUT in
icss_iep_ptp_enable as well, but if the idea is to bring the feature
back, then it should be good enough.
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: ti: icss-iep: Reject perout generation request
2025-02-27 9:24 [PATCH net] net: ti: icss-iep: Reject perout generation request Meghana Malladi
2025-02-27 16:06 ` Vadim Fedorenko
@ 2025-02-27 16:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-02-27 16:20 UTC (permalink / raw)
To: Meghana Malladi
Cc: vigneshr, javier.carrasco.cruz, jacob.e.keller, diogo.ivo, horms,
richardcochran, pabeni, kuba, edumazet, davem, andrew+netdev,
linux-kernel, netdev, linux-arm-kernel, srk, rogerq, danishanwar
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 27 Feb 2025 14:54:41 +0530 you wrote:
> IEP driver supports both perout and pps signal generation
> but perout feature is faulty with half-cooked support
> due to some missing configuration. Remove perout
> support from the driver and reject perout requests with
> "not supported" error code.
>
> Fixes: c1e0230eeaab2 ("net: ti: icss-iep: Add IEP driver")
> Signed-off-by: Meghana Malladi <m-malladi@ti.com>
>
> [...]
Here is the summary with links:
- [net] net: ti: icss-iep: Reject perout generation request
https://git.kernel.org/netdev/net/c/54e1b4becf5e
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] 3+ messages in thread
end of thread, other threads:[~2025-02-27 16:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-27 9:24 [PATCH net] net: ti: icss-iep: Reject perout generation request Meghana Malladi
2025-02-27 16:06 ` Vadim Fedorenko
2025-02-27 16: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;
as well as URLs for NNTP newsgroup(s).