Skip to content

Commit

Permalink
Merge tag 'linux-can-fixes-for-6.15-20250415' of git://git.kernel.org…
Browse files Browse the repository at this point in the history
…/pub/scm/linux/kernel/git/mkl/linux-can

Marc Kleine-Budde says:

====================
pull-request: can 2025-04-15

The first patch is by Davide Caratti and fixes the missing derement in
the protocol inuse counter for the J1939 CAN protocol.

The last patch is by Weizhao Ouyang and fixes a broken quirks check in
the rockchip CAN-FD driver.

* tag 'linux-can-fixes-for-6.15-20250415' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can:
  can: rockchip_canfd: fix broken quirks checks
  can: fix missing decrement of j1939_proto.inuse_idx
====================

Link: https://patch.msgid.link/20250415103401.445981-1-mkl@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jakub Kicinski committed Apr 16, 2025
2 parents 10a7796 + 6315d93 commit adf6b73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/net/can/rockchip/rockchip_canfd-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,15 +902,16 @@ static int rkcanfd_probe(struct platform_device *pdev)
priv->can.data_bittiming_const = &rkcanfd_data_bittiming_const;
priv->can.ctrlmode_supported = CAN_CTRLMODE_LOOPBACK |
CAN_CTRLMODE_BERR_REPORTING;
if (!(priv->devtype_data.quirks & RKCANFD_QUIRK_CANFD_BROKEN))
priv->can.ctrlmode_supported |= CAN_CTRLMODE_FD;
priv->can.do_set_mode = rkcanfd_set_mode;
priv->can.do_get_berr_counter = rkcanfd_get_berr_counter;
priv->ndev = ndev;

match = device_get_match_data(&pdev->dev);
if (match)
if (match) {
priv->devtype_data = *(struct rkcanfd_devtype_data *)match;
if (!(priv->devtype_data.quirks & RKCANFD_QUIRK_CANFD_BROKEN))
priv->can.ctrlmode_supported |= CAN_CTRLMODE_FD;
}

err = can_rx_offload_add_manual(ndev, &priv->offload,
RKCANFD_NAPI_WEIGHT);
Expand Down
1 change: 1 addition & 0 deletions net/can/j1939/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ static int j1939_sk_release(struct socket *sock)
sock->sk = NULL;

release_sock(sk);
sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1);
sock_put(sk);

return 0;
Expand Down

0 comments on commit adf6b73

Please sign in to comment.