Skip to content

Commit 2653e9c

Browse files
committed
Merge tag 'linux-can-fixes-for-6.18-20251020' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
Marc Kleine-Budde says: ==================== pull-request: can 2025-10-20 All patches are by me. The first 3 update the bxcan, esd and rockchip driver to drop skbs in xmit of the device is in listen only mode. The last patch targets the CAN netlink implementation to allow the disabling of automatic restart after Bus-Off, even if the a driver doesn't implement that callback. * tag 'linux-can-fixes-for-6.18-20251020' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: netlink: can_changelink(): allow disabling of automatic restart can: rockchip-canfd: rkcanfd_start_xmit(): use can_dev_dropped_skb() instead of can_dropped_invalid_skb() can: esd: acc_start_xmit(): use can_dev_dropped_skb() instead of can_dropped_invalid_skb() can: bxcan: bxcan_start_xmit(): use can_dev_dropped_skb() instead of can_dropped_invalid_skb() ==================== Link: https://patch.msgid.link/20251020152516.1590553-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents 86c48f5 + 8e93ac5 commit 2653e9c

4 files changed

Lines changed: 7 additions & 5 deletions

File tree

drivers/net/can/bxcan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ static netdev_tx_t bxcan_start_xmit(struct sk_buff *skb,
842842
u32 id;
843843
int i, j;
844844

845-
if (can_dropped_invalid_skb(ndev, skb))
845+
if (can_dev_dropped_skb(ndev, skb))
846846
return NETDEV_TX_OK;
847847

848848
if (bxcan_tx_busy(priv))

drivers/net/can/dev/netlink.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,9 @@ static int can_changelink(struct net_device *dev, struct nlattr *tb[],
452452
}
453453

454454
if (data[IFLA_CAN_RESTART_MS]) {
455-
if (!priv->do_set_mode) {
455+
unsigned int restart_ms = nla_get_u32(data[IFLA_CAN_RESTART_MS]);
456+
457+
if (restart_ms != 0 && !priv->do_set_mode) {
456458
NL_SET_ERR_MSG(extack,
457459
"Device doesn't support restart from Bus Off");
458460
return -EOPNOTSUPP;
@@ -461,7 +463,7 @@ static int can_changelink(struct net_device *dev, struct nlattr *tb[],
461463
/* Do not allow changing restart delay while running */
462464
if (dev->flags & IFF_UP)
463465
return -EBUSY;
464-
priv->restart_ms = nla_get_u32(data[IFLA_CAN_RESTART_MS]);
466+
priv->restart_ms = restart_ms;
465467
}
466468

467469
if (data[IFLA_CAN_RESTART]) {

drivers/net/can/esd/esdacc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ netdev_tx_t acc_start_xmit(struct sk_buff *skb, struct net_device *netdev)
254254
u32 acc_id;
255255
u32 acc_dlc;
256256

257-
if (can_dropped_invalid_skb(netdev, skb))
257+
if (can_dev_dropped_skb(netdev, skb))
258258
return NETDEV_TX_OK;
259259

260260
/* Access core->tx_fifo_tail only once because it may be changed

drivers/net/can/rockchip/rockchip_canfd-tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ netdev_tx_t rkcanfd_start_xmit(struct sk_buff *skb, struct net_device *ndev)
7272
int err;
7373
u8 i;
7474

75-
if (can_dropped_invalid_skb(ndev, skb))
75+
if (can_dev_dropped_skb(ndev, skb))
7676
return NETDEV_TX_OK;
7777

7878
if (!netif_subqueue_maybe_stop(priv->ndev, 0,

0 commit comments

Comments
 (0)