Re: [PATCH] can: m_can: m_can_isr: IR_ERR_ALL_30X

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

 



On 25.02.2022 13:20:22, Michael Anochin wrote:
> For m_can version >3.0 the correct IR_ERR_ALL_31X mask is used.

Without looking at the different register descriptions this sounds
plausible.

> If an error occurs when processing RX status flags, the TX flags are
> processed anyway.

You have basically changed the immediate "goto out_fail" to setting
"err" and doing to "goto out_fail" later. Why?

As far as I can see, the m_can_rx_peripheral() function may return an
error due to an SPI problem only. It unlikely that the TX flags handling
would work. All interrupts are disabled at the end of this function,
i.e. after goto out_fail. So the driver will not work anyways.

> I am not sure, but maybe it is better to save IR to cdev->irqstatus
> immediately before clear IR and not only by RX-Flags handling.
> 
> As far as I have seen, cdev->irqstatus is not accessed by tx-handling,
> therefore it does not matter.
> 
> This is my first patch, sorry if something is not right.

Thanks for your patch. There is a document on how to submit patches:
https://elixir.bootlin.com/linux/v5.12/source/Documentation/process/submitting-patches.rst

Please add your Signed-off-by to the next patch you send. See "Sign your
work" in that document.

Please improve the subject of the patch to describe what this patch
changes. The patch description could be improved and better explain why
the change is done.

This patch supposed to fix 2 different problems, please make one patch
per problem fix.

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: signature.asc
Description: PGP signature


[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