All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] fixup! can: mscan: mscan_rx_poll(): fix rx path lockup when returning from polling to irq mode
       [not found] <4365eab9aee7f907c5b62fc71a79ccc4c56312fa.camel@tecon.ru>
@ 2020-11-11 22:44 ` Marc Kleine-Budde
  2020-11-12  6:13   ` Дунаев Дмитрий Михайлович
  0 siblings, 1 reply; 2+ messages in thread
From: Marc Kleine-Budde @ 2020-11-11 22:44 UTC (permalink / raw)
  To: dunaev, linux-can; +Cc: dunaich


[-- Attachment #1.1: Type: text/plain, Size: 1751 bytes --]

On 7/30/20 10:40 AM, Dmitry Dunaev wrote:
> can: mscan: mscan_rx_poll(): fix void function return result check
> 
> Last operation in mscan_rx_poll() check result of calling napi_complete_done()
> function which has void type. So some compilers (like riscv32-unknown-linux-gnu-gcc)
> raises error on this line.

Since commit:

    364b6055738b net: busy-poll:
                 return busypolling status to drivers

the function napi_complete_done() is bool, that was in v4.10-rc1~202^2~255^2~2.

> According to 'likely' compiler option and network api usage this check is removed.
> 
> Signed-off-by: Dmitry Dunaev <dunaev@tecon.ru>
> ---
>  drivers/net/can/mscan/mscan.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/can/mscan/mscan.c b/drivers/net/can/mscan/mscan.c
> index 99101d7027a8..e06ae5888358 100644
> --- a/drivers/net/can/mscan/mscan.c
> +++ b/drivers/net/can/mscan/mscan.c
> @@ -412,11 +412,10 @@ static int mscan_rx_poll(struct napi_struct *napi, int quota)
>          }
>  
>          if (work_done < quota) {
> -               if (likely(napi_complete_done(&priv->napi, work_done))) {

This "likely(napi_complete_done())" was introduced in:

    2d77bd61a292 can: mscan: mscan_rx_poll():
    fix rx path lockup when returning from polling to irq mode

which is v5.5-rc6~23^2~35^2.

Are you using a kernel older than v4.10?

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: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] fixup! can: mscan: mscan_rx_poll(): fix rx path lockup when returning from polling to irq mode
  2020-11-11 22:44 ` [PATCH] fixup! can: mscan: mscan_rx_poll(): fix rx path lockup when returning from polling to irq mode Marc Kleine-Budde
@ 2020-11-12  6:13   ` Дунаев Дмитрий Михайлович
  0 siblings, 0 replies; 2+ messages in thread
From: Дунаев Дмитрий Михайлович @ 2020-11-12  6:13 UTC (permalink / raw)
  To: Marc Kleine-Budde, linux-can; +Cc: dunaich

Good day.


Yes, we using LTE 4.9 so "likely(napi_complete_done())" from higher versions is incompatible with LTE 4.9 and 4.4.

I don't know how to leave it unchanged in LTE mainstream but in our port I will  uplift napi changes from 4.19 kernel to our port.


Thank you for answer! Take care on covid19!


/Dmitry

________________________________
От: Marc Kleine-Budde <mkl@pengutronix.de>
Отправлено: 12 ноября 2020 г. 1:44
Кому: Дунаев Дмитрий Михайлович; linux-can
Копия: dunaich@mail.ru
Тема: Re: [PATCH] fixup! can: mscan: mscan_rx_poll(): fix rx path lockup when returning from polling to irq mode

On 7/30/20 10:40 AM, Dmitry Dunaev wrote:
> can: mscan: mscan_rx_poll(): fix void function return result check
>
> Last operation in mscan_rx_poll() check result of calling napi_complete_done()
> function which has void type. So some compilers (like riscv32-unknown-linux-gnu-gcc)
> raises error on this line.

Since commit:

    364b6055738b net: busy-poll:
                 return busypolling status to drivers

the function napi_complete_done() is bool, that was in v4.10-rc1~202^2~255^2~2.

> According to 'likely' compiler option and network api usage this check is removed.
>
> Signed-off-by: Dmitry Dunaev <dunaev@tecon.ru>
> ---
>  drivers/net/can/mscan/mscan.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/can/mscan/mscan.c b/drivers/net/can/mscan/mscan.c
> index 99101d7027a8..e06ae5888358 100644
> --- a/drivers/net/can/mscan/mscan.c
> +++ b/drivers/net/can/mscan/mscan.c
> @@ -412,11 +412,10 @@ static int mscan_rx_poll(struct napi_struct *napi, int quota)
>          }
>
>          if (work_done < quota) {
> -               if (likely(napi_complete_done(&priv->napi, work_done))) {

This "likely(napi_complete_done())" was introduced in:

    2d77bd61a292 can: mscan: mscan_rx_poll():
    fix rx path lockup when returning from polling to irq mode

which is v5.5-rc6~23^2~35^2.

Are you using a kernel older than v4.10?

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

end of thread, other threads:[~2020-11-12  6:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4365eab9aee7f907c5b62fc71a79ccc4c56312fa.camel@tecon.ru>
2020-11-11 22:44 ` [PATCH] fixup! can: mscan: mscan_rx_poll(): fix rx path lockup when returning from polling to irq mode Marc Kleine-Budde
2020-11-12  6:13   ` Дунаев Дмитрий Михайлович

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.