Skip to content

Commit

Permalink
can: c_can: add a comment about IF_RX interface's use
Browse files Browse the repository at this point in the history
After reading the commit 640916d ("can: c_can: Make it SMP safe")
it may sound strange to see the IF_RX interface used by the
can_inval_tx_object function. A comment was added to avoid any
misunderstanding.

Link: https://lore.kernel.org/r/20210302215435.18286-4-dariobin@libero.it
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Dario Binacchi authored and Marc Kleine-Budde committed Mar 30, 2021
1 parent c8a6b44 commit eddf671
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/can/c_can/c_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,11 @@ static void c_can_do_tx(struct net_device *dev)
idx--;
pend &= ~(1 << idx);
obj = idx + C_CAN_MSG_OBJ_TX_FIRST;

/* We use IF_RX interface instead of IF_TX because we
* are called from c_can_poll(), which runs inside
* NAPI. We are not trasmitting.
*/
c_can_inval_tx_object(dev, IF_RX, obj);
can_get_echo_skb(dev, idx, NULL);
bytes += priv->dlc[idx];
Expand Down

0 comments on commit eddf671

Please sign in to comment.