]> git.baikalelectronics.ru Git - kernel.git/commit
can: flexcan: move rx_offload_add() from flexcan_probe() to flexcan_open()
authorPankaj Bansal <pankaj.bansal@nxp.com>
Mon, 13 Aug 2018 18:20:49 +0000 (23:50 +0530)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 28 Nov 2018 15:51:44 +0000 (16:51 +0100)
commit8a511d699e5d559c595f12a7b03f8ae6e3d9577d
tree692330cbfe9171fb5ca973e3d97d82ada932caaf
parent8fbe5f49f7bcd12482f365225ab7d6bb2f013dad
can: flexcan: move rx_offload_add() from flexcan_probe() to flexcan_open()

rx offload depends on number of message buffers, which in turn depends
on messgae buffer size. with the upcoming LX2160A SOC the message buffer
size can be configured to 72 bytes if it were to be used in CAN FD mode.

The current mode in which the flexcan is being operated is known at the
time of flexcan_open() but not at the time of flexcan_probe().

Therefore, move the rx_offload_add() from flexcan_probe() to
flexcan_open(). correspondingly, move rx_offload_delete() from
flexcan_remove() to flexcan_close().

Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/flexcan.c