]> asedeno.scripts.mit.edu Git - linux.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)
commit5156c7b11f35bf305b809dd381d7842f7e078a37
tree692330cbfe9171fb5ca973e3d97d82ada932caaf
parent7ad0f53a394ba829e45682c2e21175791e36b649
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