linux-can-fixes-for-6.18-20251020

-----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEEn/sM2K9nqF/8FWzzDHRl3/mQkZwFAmj2U4QTHG1rbEBwZW5n
 dXRyb25peC5kZQAKCRAMdGXf+ZCRnKwFCACThbt7TvfZHBVRFTLsXT72orU6KdjU
 Id2ahTBsDcvdoSPqihAp/+Crp+hX/7oynvB8qwVm1HVcmrcCPfZa9W+AAF6SnY5W
 Y8T22wqBqJWEP7OwLEfhQQbrnezbQGmaVGKlf5kxdx/MULYZ5Kq9AUl/R/Q7eCzs
 hxBV59BIE7DBuVwaJQ/XlGQWly7uiO9YyWjeZ4WlTY41VRcAl3QK3UWidVPA7G7C
 vrnM2UnHyTqRNDl0GvcORsVF9E4oJIm+hT91O3OdX1C3qqwQT+5fMuUXcbB4L2jQ
 dB3XLUFSD0Yd3NKiRBG9SRxKtBvYWRyawfTwKjjHEPTLJatYbbPX9jv8
 =wCYS
 -----END PGP SIGNATURE-----

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>
This commit is contained in:
Jakub Kicinski 2025-10-21 17:42:54 -07:00
commit 2653e9c5dd
4 changed files with 7 additions and 5 deletions

View File

@ -842,7 +842,7 @@ static netdev_tx_t bxcan_start_xmit(struct sk_buff *skb,
u32 id;
int i, j;
if (can_dropped_invalid_skb(ndev, skb))
if (can_dev_dropped_skb(ndev, skb))
return NETDEV_TX_OK;
if (bxcan_tx_busy(priv))

View File

@ -452,7 +452,9 @@ static int can_changelink(struct net_device *dev, struct nlattr *tb[],
}
if (data[IFLA_CAN_RESTART_MS]) {
if (!priv->do_set_mode) {
unsigned int restart_ms = nla_get_u32(data[IFLA_CAN_RESTART_MS]);
if (restart_ms != 0 && !priv->do_set_mode) {
NL_SET_ERR_MSG(extack,
"Device doesn't support restart from Bus Off");
return -EOPNOTSUPP;
@ -461,7 +463,7 @@ static int can_changelink(struct net_device *dev, struct nlattr *tb[],
/* Do not allow changing restart delay while running */
if (dev->flags & IFF_UP)
return -EBUSY;
priv->restart_ms = nla_get_u32(data[IFLA_CAN_RESTART_MS]);
priv->restart_ms = restart_ms;
}
if (data[IFLA_CAN_RESTART]) {

View File

@ -254,7 +254,7 @@ netdev_tx_t acc_start_xmit(struct sk_buff *skb, struct net_device *netdev)
u32 acc_id;
u32 acc_dlc;
if (can_dropped_invalid_skb(netdev, skb))
if (can_dev_dropped_skb(netdev, skb))
return NETDEV_TX_OK;
/* Access core->tx_fifo_tail only once because it may be changed

View File

@ -72,7 +72,7 @@ netdev_tx_t rkcanfd_start_xmit(struct sk_buff *skb, struct net_device *ndev)
int err;
u8 i;
if (can_dropped_invalid_skb(ndev, skb))
if (can_dev_dropped_skb(ndev, skb))
return NETDEV_TX_OK;
if (!netif_subqueue_maybe_stop(priv->ndev, 0,