Re: [PATCH] fixup! can: mscan: mscan_rx_poll(): fix rx path lockup when returning from polling to irq mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
Отправлено: 12 ноября 2020 г. 1:44
Кому: Дунаев Дмитрий Михайлович; linux-can
Копия: dunaich@xxxxxxx
Тема: 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@xxxxxxxx>
> ---
>  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 |




[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux