From ddf1eb68ba6324022b95103994b11bedb615f608 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Mon, 4 Apr 2022 18:03:12 -0700 Subject: [PATCH] socketcan: fix for new kernels (#907) --- .github/workflows/drivers.yaml | 4 ++++ drivers/linux/panda.c | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/drivers.yaml b/.github/workflows/drivers.yaml index 38fa42c1d..c425d4c67 100644 --- a/.github/workflows/drivers.yaml +++ b/.github/workflows/drivers.yaml @@ -17,3 +17,7 @@ jobs: make link make build make install + - name: Print make log + if: always() + continue-on-error: true + run: cat /var/lib/dkms/panda/*/build/make.log diff --git a/drivers/linux/panda.c b/drivers/linux/panda.c index a6af7bee3..f63b4b282 100644 --- a/drivers/linux/panda.c +++ b/drivers/linux/panda.c @@ -182,7 +182,7 @@ static void panda_usb_write_bulk_callback(struct urb *urb) netdev->stats.tx_packets++; netdev->stats.tx_bytes += ctx->dlc; - can_get_echo_skb(netdev, ctx->ndx); + can_get_echo_skb(netdev, ctx->ndx, NULL); if (urb->status) netdev_info(netdev, "Tx URB aborted (%d)\n", urb->status); @@ -459,7 +459,7 @@ static netdev_tx_t panda_usb_start_xmit(struct sk_buff *skb, //Warning: cargo cult. Can't tell what this is for, but it is //everywhere and encouraged in the documentation. - can_put_echo_skb(skb, priv_inf->netdev, ctx->ndx); + can_put_echo_skb(skb, priv_inf->netdev, ctx->ndx, NULL); if(cf->can_id & CAN_EFF_FLAG){ usb_msg.rir = cpu_to_le32(((cf->can_id & 0x1FFFFFFF) << 3) | @@ -484,9 +484,9 @@ static netdev_tx_t panda_usb_start_xmit(struct sk_buff *skb, return NETDEV_TX_OK; xmit_failed: - can_free_echo_skb(priv_inf->netdev, ctx->ndx); + can_free_echo_skb(priv_inf->netdev, ctx->ndx, NULL); panda_usb_free_ctx(ctx); - dev_kfree_skb(skb); + dev_kfree_skb_any(skb); stats->tx_dropped++; return NETDEV_TX_OK;