Commit 8bed3d02 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge tag 'linux-can-next-for-5.18-20220310' of...

Merge tag 'linux-can-next-for-5.18-20220310' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next

Marc Kleine-Budde says:

====================
pull-request: can-next 2022-03-10

The first 3 patches are by Oliver Hartkopp, target the CAN ISOTP
protocol and update the CAN frame sending behavior, and increases the
max PDU size to 64 kByte.

The next 2 patches are also by Oliver Hartkopp and update the virtual
VXCAN driver so that CAN frames send into the peer name space show up
as RX'ed CAN frames.

Vincent Mailhol contributes a patch for the etas_es58x driver to fix a
false positive dereference uninitialized variable warning.

2 patches by Ulrich Hecht add r8a779a0 SoC support to the rcar_canfd
driver.

The remaining 21 patches target the gs_usb driver and are by Peter
Fink, Ben Evans, Eric Evenchick and me. This series cleans up the
gs-usb driver, documents some bits of the USB ABI used by the widely
used open source firmware candleLight, adds support for up to 3 CAN
interfaces per USB device, adds CAN-FD support, adds quirks for some
hardware and software workarounds and finally adds support for 2 new
devices.

* tag 'linux-can-next-for-5.18-20220310' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: (29 commits)
  can: gs_usb: add VID/PID for ABE CAN Debugger devices
  can: gs_usb: add VID/PID for CES CANext FD devices
  can: gs_usb: add extended bt_const feature
  can: gs_usb: activate quirks for CANtact Pro unconditionally
  can: gs_usb: add quirk for CANtact Pro overlapping GS_USB_BREQ value
  can: gs_usb: add usb quirk for NXP LPC546xx controllers
  can: gs_usb: add CAN-FD support
  can: gs_usb: use union and FLEX_ARRAY for data in struct gs_host_frame
  can: gs_usb: support up to 3 channels per device
  can: gs_usb: gs_usb_probe(): introduce udev and make use of it
  can: gs_usb: document the PAD_PKTS_TO_MAX_PKT_SIZE feature
  can: gs_usb: document the USER_ID feature
  can: gs_usb: update GS_CAN_FEATURE_IDENTIFY documentation
  can: gs_usb: add HW timestamp mode bit
  can: gs_usb: gs_make_candev(): call SET_NETDEV_DEV() after handling all bt_const->feature
  can: gs_usb: rewrap usb_control_msg() and usb_fill_bulk_urb()
  can: gs_usb: rewrap error messages
  can: gs_usb: GS_CAN_FLAG_OVERFLOW: make use of BIT()
  can: gs_usb: sort include files alphabetically
  can: gs_usb: fix checkpatch warning
  ...
====================

Link: https://lore.kernel.org/r/20220310142903.341658-1-mkl@pengutronix.de


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 1e8a3f0d 0691a4b5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ properties:
              - renesas,r9a07g044-canfd    # RZ/G2{L,LC}
          - const: renesas,rzg2l-canfd     # RZ/G2L family

      - const: renesas,r8a779a0-canfd      # R-Car V3U

  reg:
    maxItems: 1

+217 −136

File changed.

Preview size limit exceeded, changes collapsed.

+1 −2
Original line number Diff line number Diff line
@@ -173,12 +173,11 @@ static int es58x_fd_rx_event_msg(struct net_device *netdev,
	const struct es58x_fd_rx_event_msg *rx_event_msg;
	int ret;

	rx_event_msg = &es58x_fd_urb_cmd->rx_event_msg;
	ret = es58x_check_msg_len(es58x_dev->dev, *rx_event_msg, msg_len);
	if (ret)
		return ret;

	rx_event_msg = &es58x_fd_urb_cmd->rx_event_msg;

	return es58x_rx_err_msg(netdev, rx_event_msg->error_code,
				rx_event_msg->event_code,
				get_unaligned_le64(&rx_event_msg->timestamp));
+326 −120

File changed.

Preview size limit exceeded, changes collapsed.

+12 −7
Original line number Diff line number Diff line
@@ -33,28 +33,33 @@ struct vxcan_priv {
	struct net_device __rcu	*peer;
};

static netdev_tx_t vxcan_xmit(struct sk_buff *skb, struct net_device *dev)
static netdev_tx_t vxcan_xmit(struct sk_buff *oskb, struct net_device *dev)
{
	struct vxcan_priv *priv = netdev_priv(dev);
	struct net_device *peer;
	struct canfd_frame *cfd = (struct canfd_frame *)skb->data;
	struct canfd_frame *cfd = (struct canfd_frame *)oskb->data;
	struct net_device_stats *peerstats, *srcstats = &dev->stats;
	struct sk_buff *skb;
	u8 len;

	if (can_dropped_invalid_skb(dev, skb))
	if (can_dropped_invalid_skb(dev, oskb))
		return NETDEV_TX_OK;

	rcu_read_lock();
	peer = rcu_dereference(priv->peer);
	if (unlikely(!peer)) {
		kfree_skb(skb);
		kfree_skb(oskb);
		dev->stats.tx_dropped++;
		goto out_unlock;
	}

	skb = can_create_echo_skb(skb);
	if (!skb)
	skb = skb_clone(oskb, GFP_ATOMIC);
	if (skb) {
		consume_skb(oskb);
	} else {
		kfree(oskb);
		goto out_unlock;
	}

	/* reset CAN GW hop counter */
	skb->csum_start = 0;
@@ -148,7 +153,7 @@ static void vxcan_setup(struct net_device *dev)
	dev->hard_header_len	= 0;
	dev->addr_len		= 0;
	dev->tx_queue_len	= 0;
	dev->flags		= (IFF_NOARP|IFF_ECHO);
	dev->flags		= IFF_NOARP;
	dev->netdev_ops		= &vxcan_netdev_ops;
	dev->needs_free_netdev	= true;

Loading