From patchwork Thu Mar 22 13:53:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakob Unterwurzacher X-Patchwork-Id: 132281 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp876041ljb; Thu, 22 Mar 2018 06:54:40 -0700 (PDT) X-Google-Smtp-Source: AG47ELso1X7k68K4KYXXJLKnDtQLB/386JG2nuEPnijJzrj0dGrlTytSQuwYCrPGB3tO7IX6jBl5 X-Received: by 2002:a17:902:2006:: with SMTP id n6-v6mr25396277pla.150.1521726880015; Thu, 22 Mar 2018 06:54:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521726880; cv=none; d=google.com; s=arc-20160816; b=Tuhmj7nj/McOGciyQmsmgP00/t2pxO09wPNIQ2pgY0qUCwI+0sRnh7ycKIfQVoSa03 TNEFCW1X7PQrz3StlYns95R8qOBrFVTRr/fCRVIkP8myTsroW+4IW07+djD7ScK9/2/U CdlmoCok7EsAkd2IPfthJIWczGXQ8ZEirWtqr+aWZShWAz9cRdfMJtGp+HxESzc8KhLl /3UlcjYU+/FGEwkoegppujxeW1EY3BeOGpw28dLZNlXp7evO1jaKDwNvroIJVPZB51NF bgK6211DZN92dNx+tkWPSGX9JjyA8zZWmEPnjvh1uTfiX6vYoykuKvr0qhX1RGWt3Fwm LZ6w== 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=Jv8spZ5+eM5heE2gjs3FkGOOmV6kdx62U/OIrlwFw1A=; b=hDbL4gDcDzTAsk8Y0fv0c5a026O+VJ3WsD383qtHtkPgWl301yIbPRFAQp/zRutcE6 8GUf4+ZzE1rrI9WugXCuPsnZXtVaa1WKQf2flGSSuBvYSN86xAROOIbi7RCW6kRJN8l2 uIfAh1mtOkf6YBfwTlHGQk9aN9slAO6eC42prSLFfNtQA7G+CSQKxFIJ3iTZhBGwk4NS iDiJrfu7h61BbctHJxx53D7/F+2cgbi1NSLjBgRfrV6jS06MR4clM1k0Fs3JFWXOJg7B 4Dbv/p0DS1L66dFTCqN5w0a8nf/yXwM8riq5Qp1v79x9QNmmr/qKieGLQ4IDVpsPZNod MB4Q== 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 e16si5061969pfd.6.2018.03.22.06.54.39; Thu, 22 Mar 2018 06:54:40 -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 S1754976AbeCVNye (ORCPT + 28 others); Thu, 22 Mar 2018 09:54:34 -0400 Received: from vegas.theobroma-systems.com ([144.76.126.164]:49058 "EHLO mail.theobroma-systems.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755408AbeCVNx5 (ORCPT ); Thu, 22 Mar 2018 09:53:57 -0400 Received: from [86.59.122.178] (port=43820 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 1ez0fB-0007pA-Ln; Thu, 22 Mar 2018 14:53:53 +0100 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 v3 0/1] can: ucan: add driver for Theobroma Systems UCAN devices Date: Thu, 22 Mar 2018 14:53:37 +0100 Message-Id: <20180322135338.60923-1-jakob.unterwurzacher@theobroma-systems.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is v3 of the Theobroma Systems CAN/USB adapter driver upstreaming effort. Featured 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 | 315 +++++ Documentation/networking/index.rst | 1 + drivers/net/can/usb/Kconfig | 10 + drivers/net/can/usb/Makefile | 1 + drivers/net/can/usb/ucan.c | 1628 ++++++++++++++++++++++++ 5 files changed, 1955 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