From 94737ef56b610d94a24fadfb8386fc17dbd79ddd Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 9 May 2022 16:02:59 +0200 Subject: can: ctucanfd: Let users select instead of depend on CAN_CTUCANFD The CTU CAN-FD IP core is only useful when used with one of the corresponding PCI/PCIe or platform (FPGA, SoC) drivers, which depend on PCI resp. OF. Hence make the users select the core driver code, instead of letting then depend on it. Keep the core code config option visible when compile-testing, to maintain compile-coverage. Link: https://lore.kernel.org/all/887b7440446b6244a20a503cc6e8dc9258846706.1652104941.git.geert+renesas@glider.be Signed-off-by: Geert Uytterhoeven Acked-by: Pavel Pisa Signed-off-by: Marc Kleine-Budde --- drivers/net/can/ctucanfd/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/net/can/ctucanfd/Kconfig b/drivers/net/can/ctucanfd/Kconfig index 48963efc7f19..3c383612eb17 100644 --- a/drivers/net/can/ctucanfd/Kconfig +++ b/drivers/net/can/ctucanfd/Kconfig @@ -1,5 +1,5 @@ config CAN_CTUCANFD - tristate "CTU CAN-FD IP core" + tristate "CTU CAN-FD IP core" if COMPILE_TEST help This driver adds support for the CTU CAN FD open-source IP core. More documentation and core sources at project page @@ -13,8 +13,8 @@ config CAN_CTUCANFD config CAN_CTUCANFD_PCI tristate "CTU CAN-FD IP core PCI/PCIe driver" - depends on CAN_CTUCANFD depends on PCI + select CAN_CTUCANFD help This driver adds PCI/PCIe support for CTU CAN-FD IP core. The project providing FPGA design for Intel EP4CGX15 based DB4CGX15 @@ -23,8 +23,8 @@ config CAN_CTUCANFD_PCI config CAN_CTUCANFD_PLATFORM tristate "CTU CAN-FD IP core platform (FPGA, SoC) driver" - depends on CAN_CTUCANFD depends on OF || COMPILE_TEST + select CAN_CTUCANFD help The core has been tested together with OpenCores SJA1000 modified to be CAN FD frames tolerant on MicroZed Zynq based -- cgit v1.2.3 From 30abc929132929b52fa7203c35e60335c500bd17 Mon Sep 17 00:00:00 2001 From: Vincent Mailhol Date: Sat, 14 May 2022 23:16:47 +0900 Subject: can: slcan: slc_xmit(): use can_dropped_invalid_skb() instead of manual check slcan does a manual check in slc_xmit() to verify if the skb is valid. This check is incomplete, use instead can_dropped_invalid_skb(). Link: https://lore.kernel.org/all/20220514141650.1109542-2-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde --- drivers/net/can/slcan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c index ec294d0c5722..64a3aee8a7da 100644 --- a/drivers/net/can/slcan.c +++ b/drivers/net/can/slcan.c @@ -359,8 +359,8 @@ static netdev_tx_t slc_xmit(struct sk_buff *skb, struct net_device *dev) { struct slcan *sl = netdev_priv(dev); - if (skb->len != CAN_MTU) - goto out; + if (can_dropped_invalid_skb(dev, skb)) + return NETDEV_TX_OK; spin_lock(&sl->lock); if (!netif_running(dev)) { -- cgit v1.2.3