Received: by 10.192.165.156 with SMTP id m28csp917264imm; Wed, 11 Apr 2018 09:13:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Ge337ye+azMErCy1P6ajUjXGPv1mJwPhlTjz6LNjg8zDhxcAbrvekNJryihz1RS1HdIET X-Received: by 10.99.54.75 with SMTP id d72mr3879862pga.96.1523463223390; Wed, 11 Apr 2018 09:13:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523463223; cv=none; d=google.com; s=arc-20160816; b=co1wD4g79lH+h4OECp2vmf7B1nYogG3ywKXmOJj8A7A1ROjSzvxzaC8J4ZmVV1ucHv I043Eejgw11xzRea1IrRYQ9HXPwTR0fqygxJyUyKfRHylmlznRLQuF7Ah7YxNucsS9j1 LUESnngIaSAJKyqYUI0sjTSm0SBaZbnrZvSYo/6HlR5t5T4zjVLmiCGZ5vy2mkhfn7yl 3LT6XefNx5vG6Zg4Z11dz1cb/Y5mRXIizyr6z6BADVXmT+wOoqgYMHfM45WGUCEyLPk6 8gaDBCSzGo3LpgV4lEwPbZz54eXZWuV77L+0Bzh05DR1ieFjRKIm6DkaBRLzuFSbADTY bi/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:arc-authentication-results; bh=AFg/Gxu1xc6PkFSuK9I1lhhDWXFSPaLKRCO1BNCKPoQ=; b=mqqUVLGyHf5kOMhFCANwa1XM2MDcnpfwgeihHPxT03EAj4/KH15TkxzzAT10pt+j8w cisoLRULZI3H13zC+Kr2FTelIsWsNkpVLgeXet5q7T8YoWzm+j6b6MHKVR/rLjYmR9S/ ixwp/aZUcIIclNVeiHN+mcGcy6r/Piw1ZO0T7Aoo33Fjz0PWRAl87Bnao/oEJE8Oq2+0 WcMgoxswpXg51W5oz5ipURZqUDhPinpXWw8hsduxx4QEr4anDBCESP26iOec9rchBvvL GMXP1O7XsHYylGMipUuOk35iG5sBMd09f7F5cHREt3kyGV0RWYZZGDIPpeRHnTkM12ka aioQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 71-v6si1487470plf.244.2018.04.11.09.13.07; Wed, 11 Apr 2018 09:13:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753463AbeDKQGz (ORCPT + 99 others); Wed, 11 Apr 2018 12:06:55 -0400 Received: from vegas.theobroma-systems.com ([144.76.126.164]:45332 "EHLO mail.theobroma-systems.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753169AbeDKQGx (ORCPT ); Wed, 11 Apr 2018 12:06:53 -0400 Received: from [86.59.122.178] (port=46760 helo=blau.lan) by mail.theobroma-systems.com with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1f6IGn-0007S9-A4; Wed, 11 Apr 2018 18:06:49 +0200 From: Jakob Unterwurzacher To: jakob.unterwurzacher@theobroma-systems.com Cc: Martin Elshuber , Philipp Tomsich , Wolfgang Grandegger , Marc Kleine-Budde , linux-can@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 0/1] can: ucan: add driver for Theobroma Systems UCAN devices Date: Wed, 11 Apr 2018 18:06:41 +0200 Message-Id: <20180411160642.18383-1-jakob.unterwurzacher@theobroma-systems.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is v5 of the Theobroma Systems CAN/USB "UCAN" adapter driver upstreaming effort. v4 -> v5 changes: * describe bus-off handling in rst documentation * fix inverted if in tx_complete * try to fit overlong strings in 80 chars * use early returns instead of goto where possible * add spinlock around can_put/get/free_echo skb * remove BUS-OFF printk * fix missing true path in ucan_release_context * add ACK from Wolfgang Grandegger v3 -> v4 changes: * get rid of a few repeated le16_to_cpu casts by storing the value once * fix canid masking logic * drop __func__ from log messages. Use netdev_* where possible, use UCAN_DRIVER_NAME where not. * drop device report log output (data is available via ip) * fix issues catched by sparse v2 -> v3 changes: * count error frames as data packets * use canid_t for all can ids * use BIT(x) instead of (1 << x) * use __le16 / __le32 for little-endian fields * add spinlock around context allocation (fixes a possible race) * fix comment style * use WARN_ON return value * fix state logic bug that did not allow return to ERROR_ACTIVE * drop echo_index from context_array (not needed) * rename "tx_contexts" -> "context_array" to prevent confusion * add __func__ to all errors and warnings, and to info where it made sense Jakob Unterwurzacher (1): can: ucan: add driver for Theobroma Systems UCAN devices Documentation/networking/can_ucan_protocol.rst | 332 +++++ Documentation/networking/index.rst | 1 + drivers/net/can/usb/Kconfig | 10 + drivers/net/can/usb/Makefile | 1 + drivers/net/can/usb/ucan.c | 1613 ++++++++++++++++++++++++ 5 files changed, 1957 insertions(+) create mode 100644 Documentation/networking/can_ucan_protocol.rst create mode 100644 drivers/net/can/usb/ucan.c -- 2.11.0 Cc: Martin Elshuber Cc: Philipp Tomsich Cc: Wolfgang Grandegger Cc: Marc Kleine-Budde Cc: linux-can@vger.kernel.org Cc: linux-kernel@vger.kernel.org