Commit adf6b730 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge tag 'linux-can-fixes-for-6.15-20250415' of...

Merge tag 'linux-can-fixes-for-6.15-20250415' of git://git.kernel.org/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: default avatarJakub Kicinski <kuba@kernel.org>
parents 10a77965 6315d935
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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);
+1 −0
Original line number Diff line number Diff line
@@ -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;