[PATCH 2/3][SRU][J] UBUNTU: SAUCE: ODM: can: usb: f81604: backport of Fintek F81604
AceLan Kao
acelan.kao at canonical.com
Thu Dec 28 03:29:33 UTC 2023
From: Filippo Copetti <filippo.copetti at eurotech.com>
BugLink: https://bugs.launchpad.net/bugs/2045387
F81604 implements USB to 2xCAN interfaces, this is the backporting to
kernel 5.15
This commit is manually fixed the missing definition CAN_ERR_CNT and the
missing function can_dev_dropped_skb().
Signed-off-by: Filippo Copetti <filippo.copetti at eurotech.com>
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao at canonical.com>
---
drivers/net/can/usb/f81604.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/can/usb/f81604.c b/drivers/net/can/usb/f81604.c
index ec8cef7fd2d53..7b0de76646ef6 100644
--- a/drivers/net/can/usb/f81604.c
+++ b/drivers/net/can/usb/f81604.c
@@ -8,6 +8,8 @@
#include <linux/units.h>
#include <linux/usb.h>
+#include <linux/ethtool.h>
+
#include <linux/can.h>
#include <linux/can/dev.h>
#include <linux/can/error.h>
@@ -114,6 +116,7 @@
/* ALC register */
#define F81604_SJA1000_ALC_MASK 0x1f
+#define CAN_ERR_CNT 0x00000200U
/* table of devices that work with this driver */
static const struct usb_device_id f81604_table[] = {
@@ -906,7 +909,7 @@ static netdev_tx_t f81604_start_xmit(struct sk_buff *skb,
struct urb *write_urb;
int ret;
- if (can_dev_dropped_skb(netdev, skb))
+ if (can_dropped_invalid_skb(netdev, skb))
return NETDEV_TX_OK;
netif_stop_queue(netdev);
--
2.34.1
More information about the kernel-team
mailing list