On 3/8/21 10:11 AM, Torin Cooper-Bennun wrote: > On Fri, Mar 05, 2021 at 11:29:57PM +0100, Marc Kleine-Budde wrote: >> On 05.03.2021 17:20:15, Torin Cooper-Bennun wrote: >>> For peripheral devices, m_can sent skbs directly from a threaded irq >>> instead of from a softirq context. This patch transitions the driver to >>> use the rx-offload helper, ensuring the skbs are sent from the correct >>> context, with h/w timestamping to ensure correct ordering. >> >> I think you beak the non-peripheral drivers here. They already have a >> NAPI function m_can_poll(). It makes no sense and doesn't work, if you >> do the RX in NAPI and then queue to rx-offload, which then needs to run >> from NAPI again. But it cannot as m_can_poll is the NAPI function. >> >> For peripherals it works, as you do the RX in the threaded IRQ, queue to >> rx-offload, which then schedules a NAPI, to push the CAN frames into the >> networking stack. > > Understood, I will make the skb handling conditional on > cdev->is_peripheral and retain netif_receive_skb and can_get_echo_skb > usage for non-peripherals as before. Not beautify, but should make the tcan driver work at least. 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: OpenPGP digital signature