* [PATCH] can: xilinx_can: Add check for NAPI Poll function
@ 2022-02-08 16:20 Srinivas Neeli
2022-02-09 7:49 ` Marc Kleine-Budde
0 siblings, 1 reply; 7+ messages in thread
From: Srinivas Neeli @ 2022-02-08 16:20 UTC (permalink / raw)
To: wg, mkl, davem, kuba
Cc: michal.simek, linux-can, netdev, linux-arm-kernel, linux-kernel,
appana.durga.rao, sgoud, git, Srinivas Neeli
Add check for NAPI poll function to avoid enabling interrupts
with out completing the NAPI call.
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
---
drivers/net/can/xilinx_can.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
index 1674b561c9a2..e562c5ab1149 100644
--- a/drivers/net/can/xilinx_can.c
+++ b/drivers/net/can/xilinx_can.c
@@ -1215,10 +1215,11 @@ static int xcan_rx_poll(struct napi_struct *napi, int quota)
}
if (work_done < quota) {
- napi_complete_done(napi, work_done);
- ier = priv->read_reg(priv, XCAN_IER_OFFSET);
- ier |= xcan_rx_int_mask(priv);
- priv->write_reg(priv, XCAN_IER_OFFSET, ier);
+ if (napi_complete_done(napi, work_done)) {
+ ier = priv->read_reg(priv, XCAN_IER_OFFSET);
+ ier |= xcan_rx_int_mask(priv);
+ priv->write_reg(priv, XCAN_IER_OFFSET, ier);
+ }
}
return work_done;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] can: xilinx_can: Add check for NAPI Poll function
2022-02-08 16:20 [PATCH] can: xilinx_can: Add check for NAPI Poll function Srinivas Neeli
@ 2022-02-09 7:49 ` Marc Kleine-Budde
2022-02-09 8:29 ` Srinivas Neeli
0 siblings, 1 reply; 7+ messages in thread
From: Marc Kleine-Budde @ 2022-02-09 7:49 UTC (permalink / raw)
To: Srinivas Neeli
Cc: wg, davem, kuba, michal.simek, linux-can, netdev,
linux-arm-kernel, linux-kernel, appana.durga.rao, sgoud, git
[-- Attachment #1: Type: text/plain, Size: 564 bytes --]
On 08.02.2022 21:50:53, Srinivas Neeli wrote:
> Add check for NAPI poll function to avoid enabling interrupts
> with out completing the NAPI call.
Thanks for the patch. Does this fix a bug? If so, please add a Fixes:
tag that lists the patch that introduced that bug.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] can: xilinx_can: Add check for NAPI Poll function
2022-02-09 7:49 ` Marc Kleine-Budde
@ 2022-02-09 8:29 ` Srinivas Neeli
2022-02-09 8:31 ` Marc Kleine-Budde
0 siblings, 1 reply; 7+ messages in thread
From: Srinivas Neeli @ 2022-02-09 8:29 UTC (permalink / raw)
To: Marc Kleine-Budde
Cc: wg, davem, kuba, Michal Simek, linux-can, netdev,
linux-arm-kernel, linux-kernel, Appana Durga Kedareswara Rao,
Srinivas Goud, git
Hi Marc,
> -----Original Message-----
> From: Marc Kleine-Budde <mkl@pengutronix.de>
> Sent: Wednesday, February 9, 2022 1:20 PM
> To: Srinivas Neeli <sneeli@xilinx.com>
> Cc: wg@grandegger.com; davem@davemloft.net; kuba@kernel.org; Michal
> Simek <michals@xilinx.com>; linux-can@vger.kernel.org;
> netdev@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; Appana Durga Kedareswara Rao
> <appanad@xilinx.com>; Srinivas Goud <sgoud@xilinx.com>; git
> <git@xilinx.com>
> Subject: Re: [PATCH] can: xilinx_can: Add check for NAPI Poll function
>
> On 08.02.2022 21:50:53, Srinivas Neeli wrote:
> > Add check for NAPI poll function to avoid enabling interrupts with out
> > completing the NAPI call.
>
> Thanks for the patch. Does this fix a bug? If so, please add a Fixes:
> tag that lists the patch that introduced that bug.
It is not a bug. I am adding additional safety check( Validating the return value of "napi_complete_done" call).
Thanks
Srinivas Neeli
>
> regards,
> Marc
>
> --
> Pengutronix e.K. | Marc Kleine-Budde |
> Embedded Linux | https://www.pengutronix.de |
> Vertretung West/Dortmund | Phone: +49-231-2826-924 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] can: xilinx_can: Add check for NAPI Poll function
2022-02-09 8:29 ` Srinivas Neeli
@ 2022-02-09 8:31 ` Marc Kleine-Budde
2022-02-09 8:40 ` Srinivas Neeli
0 siblings, 1 reply; 7+ messages in thread
From: Marc Kleine-Budde @ 2022-02-09 8:31 UTC (permalink / raw)
To: Srinivas Neeli
Cc: wg, davem, kuba, Michal Simek, linux-can, netdev,
linux-arm-kernel, linux-kernel, Appana Durga Kedareswara Rao,
Srinivas Goud, git
[-- Attachment #1: Type: text/plain, Size: 824 bytes --]
On 09.02.2022 08:29:55, Srinivas Neeli wrote:
> > On 08.02.2022 21:50:53, Srinivas Neeli wrote:
> > > Add check for NAPI poll function to avoid enabling interrupts with out
> > > completing the NAPI call.
> >
> > Thanks for the patch. Does this fix a bug? If so, please add a Fixes:
> > tag that lists the patch that introduced that bug.
>
> It is not a bug. I am adding additional safety check( Validating the
> return value of "napi_complete_done" call).
Thanks for your feedback. Should this go into can or can-next?
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH] can: xilinx_can: Add check for NAPI Poll function
2022-02-09 8:31 ` Marc Kleine-Budde
@ 2022-02-09 8:40 ` Srinivas Neeli
2022-02-09 8:41 ` Michal Simek
2022-02-09 8:43 ` Marc Kleine-Budde
0 siblings, 2 replies; 7+ messages in thread
From: Srinivas Neeli @ 2022-02-09 8:40 UTC (permalink / raw)
To: Marc Kleine-Budde
Cc: wg, davem, kuba, Michal Simek, linux-can, netdev,
linux-arm-kernel, linux-kernel, Appana Durga Kedareswara Rao,
Srinivas Goud, git
Hi Marc,
> -----Original Message-----
> From: Marc Kleine-Budde <mkl@pengutronix.de>
> Sent: Wednesday, February 9, 2022 2:02 PM
> To: Srinivas Neeli <sneeli@xilinx.com>
> Cc: wg@grandegger.com; davem@davemloft.net; kuba@kernel.org; Michal
> Simek <michals@xilinx.com>; linux-can@vger.kernel.org;
> netdev@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; Appana Durga Kedareswara Rao
> <appanad@xilinx.com>; Srinivas Goud <sgoud@xilinx.com>; git
> <git@xilinx.com>
> Subject: Re: [PATCH] can: xilinx_can: Add check for NAPI Poll function
>
> On 09.02.2022 08:29:55, Srinivas Neeli wrote:
> > > On 08.02.2022 21:50:53, Srinivas Neeli wrote:
> > > > Add check for NAPI poll function to avoid enabling interrupts with
> > > > out completing the NAPI call.
> > >
> > > Thanks for the patch. Does this fix a bug? If so, please add a Fixes:
> > > tag that lists the patch that introduced that bug.
> >
> > It is not a bug. I am adding additional safety check( Validating the
> > return value of "napi_complete_done" call).
>
> Thanks for your feedback. Should this go into can or can-next?
If possible please apply on both branches.
>
> regards,
> Marc
>
> --
> Pengutronix e.K. | Marc Kleine-Budde |
> Embedded Linux | https://www.pengutronix.de |
> Vertretung West/Dortmund | Phone: +49-231-2826-924 |
> Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] can: xilinx_can: Add check for NAPI Poll function
2022-02-09 8:40 ` Srinivas Neeli
@ 2022-02-09 8:41 ` Michal Simek
2022-02-09 8:43 ` Marc Kleine-Budde
1 sibling, 0 replies; 7+ messages in thread
From: Michal Simek @ 2022-02-09 8:41 UTC (permalink / raw)
To: Srinivas Neeli, Marc Kleine-Budde
Cc: wg, davem, kuba, linux-can, netdev, linux-arm-kernel,
linux-kernel, Appana Durga Kedareswara Rao, Srinivas Goud, git
Hi,
On 2/9/22 09:40, Srinivas Neeli wrote:
> Hi Marc,
>
>> -----Original Message-----
>> From: Marc Kleine-Budde <mkl@pengutronix.de>
>> Sent: Wednesday, February 9, 2022 2:02 PM
>> To: Srinivas Neeli <sneeli@xilinx.com>
>> Cc: wg@grandegger.com; davem@davemloft.net; kuba@kernel.org; Michal
>> Simek <michals@xilinx.com>; linux-can@vger.kernel.org;
>> netdev@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
>> kernel@vger.kernel.org; Appana Durga Kedareswara Rao
>> <appanad@xilinx.com>; Srinivas Goud <sgoud@xilinx.com>; git
>> <git@xilinx.com>
>> Subject: Re: [PATCH] can: xilinx_can: Add check for NAPI Poll function
>>
>> On 09.02.2022 08:29:55, Srinivas Neeli wrote:
>>>> On 08.02.2022 21:50:53, Srinivas Neeli wrote:
>>>>> Add check for NAPI poll function to avoid enabling interrupts with
>>>>> out completing the NAPI call.
>>>>
>>>> Thanks for the patch. Does this fix a bug? If so, please add a Fixes:
>>>> tag that lists the patch that introduced that bug.
>>>
>>> It is not a bug. I am adding additional safety check( Validating the
>>> return value of "napi_complete_done" call).
>>
>> Thanks for your feedback. Should this go into can or can-next?
>
> If possible please apply on both branches.
New feature should come to next. It means can-next please.
Thanks,
Michal
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] can: xilinx_can: Add check for NAPI Poll function
2022-02-09 8:40 ` Srinivas Neeli
2022-02-09 8:41 ` Michal Simek
@ 2022-02-09 8:43 ` Marc Kleine-Budde
1 sibling, 0 replies; 7+ messages in thread
From: Marc Kleine-Budde @ 2022-02-09 8:43 UTC (permalink / raw)
To: Srinivas Neeli
Cc: wg, davem, kuba, Michal Simek, linux-can, netdev,
linux-arm-kernel, linux-kernel, Appana Durga Kedareswara Rao,
Srinivas Goud, git
[-- Attachment #1: Type: text/plain, Size: 1688 bytes --]
On 09.02.2022 08:40:48, Srinivas Neeli wrote:
> Hi Marc,
>
> > -----Original Message-----
> > From: Marc Kleine-Budde <mkl@pengutronix.de>
> > Sent: Wednesday, February 9, 2022 2:02 PM
> > To: Srinivas Neeli <sneeli@xilinx.com>
> > Cc: wg@grandegger.com; davem@davemloft.net; kuba@kernel.org; Michal
> > Simek <michals@xilinx.com>; linux-can@vger.kernel.org;
> > netdev@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> > kernel@vger.kernel.org; Appana Durga Kedareswara Rao
> > <appanad@xilinx.com>; Srinivas Goud <sgoud@xilinx.com>; git
> > <git@xilinx.com>
> > Subject: Re: [PATCH] can: xilinx_can: Add check for NAPI Poll function
> >
> > On 09.02.2022 08:29:55, Srinivas Neeli wrote:
> > > > On 08.02.2022 21:50:53, Srinivas Neeli wrote:
> > > > > Add check for NAPI poll function to avoid enabling interrupts with
> > > > > out completing the NAPI call.
> > > >
> > > > Thanks for the patch. Does this fix a bug? If so, please add a Fixes:
> > > > tag that lists the patch that introduced that bug.
> > >
> > > It is not a bug. I am adding additional safety check( Validating the
> > > return value of "napi_complete_done" call).
> >
> > Thanks for your feedback. Should this go into can or can-next?
>
> If possible please apply on both branches.
That's not an option. Going for can-next as Michal Simek suggested.
Adding to linux-can-next/testing.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-02-09 8:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-08 16:20 [PATCH] can: xilinx_can: Add check for NAPI Poll function Srinivas Neeli
2022-02-09 7:49 ` Marc Kleine-Budde
2022-02-09 8:29 ` Srinivas Neeli
2022-02-09 8:31 ` Marc Kleine-Budde
2022-02-09 8:40 ` Srinivas Neeli
2022-02-09 8:41 ` Michal Simek
2022-02-09 8:43 ` Marc Kleine-Budde
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).