Skip to content

Commit

Permalink
Merge tag 'linux-can-fixes-for-5.12-20210320' of git://git.kernel.org…
Browse files Browse the repository at this point in the history
…/pub/scm/linux/kernel/git/mkl/linux-can

Marc Kleine-Budde says:

====================
pull-request: can 2021-03-20

this is a pull request of 2 patches for net/master.

The first patch is by Oliver Hartkopp. He fixes the TX-path in the
ISO-TP protocol by properly initializing the outgoing CAN frames.

The second patch is by me and reverts a patch from my previous pull
request which added MODULE_SUPPORTED_DEVICE to the peak_usb driver. In
the mean time in Linus's tree the entirely MODULE_SUPPORTED_DEVICE was
removed. So this reverts the adding of the new MODULE_SUPPORTED_DEVICE
to avoid the merge conflict.

If you prefer to resolve the merge conflict by hand, I'll send a new
pull request without that patch.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Mar 21, 2021
2 parents a05b0c8 + 5d7047e commit 49371a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions drivers/net/can/usb/peak_usb/pcan_usb_fd.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

MODULE_SUPPORTED_DEVICE("PEAK-System PCAN-USB FD adapter");
MODULE_SUPPORTED_DEVICE("PEAK-System PCAN-USB Pro FD adapter");
MODULE_SUPPORTED_DEVICE("PEAK-System PCAN-Chip USB");
MODULE_SUPPORTED_DEVICE("PEAK-System PCAN-USB X6 adapter");

#define PCAN_USBPROFD_CHANNEL_COUNT 2
#define PCAN_USBFD_CHANNEL_COUNT 1
Expand Down
6 changes: 3 additions & 3 deletions net/can/isotp.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ static int isotp_send_fc(struct sock *sk, int ae, u8 flowstatus)
nskb->dev = dev;
can_skb_set_owner(nskb, sk);
ncf = (struct canfd_frame *)nskb->data;
skb_put(nskb, so->ll.mtu);
skb_put_zero(nskb, so->ll.mtu);

/* create & send flow control reply */
ncf->can_id = so->txid;
Expand Down Expand Up @@ -779,7 +779,7 @@ static enum hrtimer_restart isotp_tx_timer_handler(struct hrtimer *hrtimer)
can_skb_prv(skb)->skbcnt = 0;

cf = (struct canfd_frame *)skb->data;
skb_put(skb, so->ll.mtu);
skb_put_zero(skb, so->ll.mtu);

/* create consecutive frame */
isotp_fill_dataframe(cf, so, ae, 0);
Expand Down Expand Up @@ -895,7 +895,7 @@ static int isotp_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
so->tx.idx = 0;

cf = (struct canfd_frame *)skb->data;
skb_put(skb, so->ll.mtu);
skb_put_zero(skb, so->ll.mtu);

/* check for single frame transmission depending on TX_DL */
if (size <= so->tx.ll_dl - SF_PCI_SZ4 - ae - off) {
Expand Down

0 comments on commit 49371a8

Please sign in to comment.