public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc: ti: k3-ringacc: Fix access mode for k3_ringacc_ring_pop_tail_io()
@ 2026-04-13  6:51 Siddharth Vadapalli
  2026-04-21 15:50 ` Hari Prasath G E
  0 siblings, 1 reply; 3+ messages in thread
From: Siddharth Vadapalli @ 2026-04-13  6:51 UTC (permalink / raw)
  To: nm, ssantosh; +Cc: stable, linux-kernel, linux-arm-kernel, srk, s-vadapalli

k3_ringacc_ring_pop_tail_io() invokes k3_ringacc_ring_access_io() with the
access mode incorrectly set to K3_RINGACC_ACCESS_MODE_POP_HEAD instead of
K3_RINGACC_ACCESS_MODE_POP_TAIL. Fix this.

Fixes: 3277e8aa2504 ("soc: ti: k3: add navss ringacc driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
---

Hello,

This patch is based on commit
028ef9c96e96 Linux 7.0
of Mainline Linux.

I noticed (visually) the incorrect access mode while working on:
https://lore.kernel.org/r/20260325123850.638748-1-s-vadapalli@ti.com/

Regards,
Siddharth.

 drivers/soc/ti/k3-ringacc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/ti/k3-ringacc.c b/drivers/soc/ti/k3-ringacc.c
index 7602b8a909b0..24f658e8c1dc 100644
--- a/drivers/soc/ti/k3-ringacc.c
+++ b/drivers/soc/ti/k3-ringacc.c
@@ -1083,7 +1083,7 @@ static int k3_ringacc_ring_pop_io(struct k3_ring *ring, void *elem)
 static int k3_ringacc_ring_pop_tail_io(struct k3_ring *ring, void *elem)
 {
 	return k3_ringacc_ring_access_io(ring, elem,
-					 K3_RINGACC_ACCESS_MODE_POP_HEAD);
+					 K3_RINGACC_ACCESS_MODE_POP_TAIL);
 }
 
 /*
-- 
2.51.1


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

* Re: [PATCH] soc: ti: k3-ringacc: Fix access mode for k3_ringacc_ring_pop_tail_io()
  2026-04-13  6:51 [PATCH] soc: ti: k3-ringacc: Fix access mode for k3_ringacc_ring_pop_tail_io() Siddharth Vadapalli
@ 2026-04-21 15:50 ` Hari Prasath G E
  2026-04-22  4:54   ` Siddharth Vadapalli
  0 siblings, 1 reply; 3+ messages in thread
From: Hari Prasath G E @ 2026-04-21 15:50 UTC (permalink / raw)
  To: Siddharth Vadapalli, nm, ssantosh
  Cc: stable, linux-kernel, linux-arm-kernel, srk, s-adivi

Hello Siddharth,

Thanks for the patch.

On 4/13/2026 12:21 PM, Siddharth Vadapalli wrote:
> k3_ringacc_ring_pop_tail_io() invokes k3_ringacc_ring_access_io() with the
> access mode incorrectly set to K3_RINGACC_ACCESS_MODE_POP_HEAD instead of
> K3_RINGACC_ACCESS_MODE_POP_TAIL. Fix this.
> 
> Fixes: 3277e8aa2504 ("soc: ti: k3: add navss ringacc driver")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
> ---
> 
> Hello,
> 
> This patch is based on commit
> 028ef9c96e96 Linux 7.0
> of Mainline Linux.
> 
> I noticed (visually) the incorrect access mode while working on:
> https://lore.kernel.org/r/20260325123850.638748-1-s-vadapalli@ti.com/
> 
> Regards,
> Siddharth.
> 
>   drivers/soc/ti/k3-ringacc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/ti/k3-ringacc.c b/drivers/soc/ti/k3-ringacc.c
> index 7602b8a909b0..24f658e8c1dc 100644
> --- a/drivers/soc/ti/k3-ringacc.c
> +++ b/drivers/soc/ti/k3-ringacc.c
> @@ -1083,7 +1083,7 @@ static int k3_ringacc_ring_pop_io(struct k3_ring *ring, void *elem)
>   static int k3_ringacc_ring_pop_tail_io(struct k3_ring *ring, void *elem)
>   {
>   	return k3_ringacc_ring_access_io(ring, elem,
> -					 K3_RINGACC_ACCESS_MODE_POP_HEAD);
> +					 K3_RINGACC_ACCESS_MODE_POP_TAIL);

I see that you have noticed this visually and fixed this,was there any 
impact you faced without this change like data corruption or something ?
It would be better to mention the impact this change brings-in by doing 
some analysis.

There is a similar function k3_ringacc_ring_pop_tail_proxy() few lines 
above where the same change might be required.

Regards,
Hari

>   }
>   
>   /*


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

* Re: [PATCH] soc: ti: k3-ringacc: Fix access mode for k3_ringacc_ring_pop_tail_io()
  2026-04-21 15:50 ` Hari Prasath G E
@ 2026-04-22  4:54   ` Siddharth Vadapalli
  0 siblings, 0 replies; 3+ messages in thread
From: Siddharth Vadapalli @ 2026-04-22  4:54 UTC (permalink / raw)
  To: Hari Prasath G E
  Cc: nm, ssantosh, stable, linux-kernel, linux-arm-kernel, srk,
	s-adivi, s-vadapalli

On 21/04/26 21:20, Hari Prasath G E wrote:
> Hello Siddharth,
> 
> Thanks for the patch.
> 
> On 4/13/2026 12:21 PM, Siddharth Vadapalli wrote:
>> k3_ringacc_ring_pop_tail_io() invokes k3_ringacc_ring_access_io() with the
>> access mode incorrectly set to K3_RINGACC_ACCESS_MODE_POP_HEAD instead of
>> K3_RINGACC_ACCESS_MODE_POP_TAIL. Fix this.
>>
>> Fixes: 3277e8aa2504 ("soc: ti: k3: add navss ringacc driver")
>> Cc: <stable@vger.kernel.org>
>> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
>> ---
>>
>> Hello,
>>
>> This patch is based on commit
>> 028ef9c96e96 Linux 7.0
>> of Mainline Linux.
>>
>> I noticed (visually) the incorrect access mode while working on:
>> https://lore.kernel.org/r/20260325123850.638748-1-s-vadapalli@ti.com/
>>
>> Regards,
>> Siddharth.
>>
>>   drivers/soc/ti/k3-ringacc.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/soc/ti/k3-ringacc.c b/drivers/soc/ti/k3-ringacc.c
>> index 7602b8a909b0..24f658e8c1dc 100644
>> --- a/drivers/soc/ti/k3-ringacc.c
>> +++ b/drivers/soc/ti/k3-ringacc.c
>> @@ -1083,7 +1083,7 @@ static int k3_ringacc_ring_pop_io(struct k3_ring 
>> *ring, void *elem)
>>   static int k3_ringacc_ring_pop_tail_io(struct k3_ring *ring, void *elem)
>>   {
>>       return k3_ringacc_ring_access_io(ring, elem,
>> -                     K3_RINGACC_ACCESS_MODE_POP_HEAD);
>> +                     K3_RINGACC_ACCESS_MODE_POP_TAIL);
> 
> I see that you have noticed this visually and fixed this,was there any 
> impact you faced without this change like data corruption or something ?

I haven't tested it with / without the fix above. But if I have to guess, 
the impact will be out-of-order completions for transmit descriptors and 
out-of-order of packets on receive. Although I have described it in the 
context of Networking, the out-of-order (reversed order to be precise) 
issue will be faced by any user.

> It would be better to mention the impact this change brings-in by doing 
> some analysis.
> 
> There is a similar function k3_ringacc_ring_pop_tail_proxy() few lines 
> above where the same change might be required.

Thank you for pointing it out. I will fix that function as well in the v2 
patch.

Regards,
Siddharth.

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

end of thread, other threads:[~2026-04-22  4:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-13  6:51 [PATCH] soc: ti: k3-ringacc: Fix access mode for k3_ringacc_ring_pop_tail_io() Siddharth Vadapalli
2026-04-21 15:50 ` Hari Prasath G E
2026-04-22  4:54   ` Siddharth Vadapalli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox