Received: by 10.213.65.68 with SMTP id h4csp3592977imn; Tue, 3 Apr 2018 07:37:05 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/SqG4dhzcBGtIx+ePUWHiRn1HfuThJBXHY0yAlx+mYaBk3pUEOlQexJm/VWQVHRfVbe8DB X-Received: by 2002:a17:902:3e5:: with SMTP id d92-v6mr14779539pld.104.1522766225759; Tue, 03 Apr 2018 07:37:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522766225; cv=none; d=google.com; s=arc-20160816; b=08lcQ/0M9TuI+WkNmp+LG28l0jJSK7zV96yGFfmcssJ3rBcqyMuqQe+cMkvOyZcZBh U7cAcShrVGgQbM1JrRZn3ajHBMPcot7V0NNzfguFi8JUivf6UcG7vkNFUs8maGlEeE42 p8W9wI8LLJ5hFjJrNAed9h+k3yj4JSFNQF3J2SiJkPpc6jGgXZfoidGg+YGotN1ZvoFV v9V0uPc1Qia2vkXkg77OXxOhFOyhctdMhuYx0ySpZEQX08x61Fp3WFRGOcfyOKqyqrUF HsAl/PuBIwd4UIRpZTSF6JVV8ohpFr0BVTS0iDDcGtuFmGe42CAPAx2a44Qq1ABnqCsE TFuA== 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=rgZRFQHS1OXfdz+jVpKfs9aG/tEMaE96t6TCNdikveE=; b=ENrFzNYhotuS1C4/3RAq6vUcZkoyXemhJHu5auEJLPAxFtSyL9rQbSP6g+vHv6rvxG qYYatLMs2ptK/ZBNc6+ytJd8OggJIHjpfy5KUE1PnDmk3kDGvjfn9SxBNoM3FlC3oY90 t7uOHetuRX0jbBM/d8OVl7/7WM9/gdvDq/C29uFBB9DWcDPBwHI/artiR+O3/R4qJzUY R2BWKuNmMiuQEdyRO1XbHPong/Z/RyWmzaCFu53HBDDaPpxOyesUUNeZCTUmbB5MgPJb wQwNH6/QQWv1LdGMBUQGOO5T8XT/MCNVu70LSK2qUVYlUEBcU7UIGL67sVzxmJswKohQ l9iQ== 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 k78si2347841pfb.250.2018.04.03.07.36.51; Tue, 03 Apr 2018 07:37:05 -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 S1751447AbeDCOfi (ORCPT + 99 others); Tue, 3 Apr 2018 10:35:38 -0400 Received: from vegas.theobroma-systems.com ([144.76.126.164]:58135 "EHLO mail.theobroma-systems.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751233AbeDCOfh (ORCPT ); Tue, 3 Apr 2018 10:35:37 -0400 Received: from [86.59.122.178] (port=45662 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 1f3N25-0003zu-2M; Tue, 03 Apr 2018 16:35:33 +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 v4 0/1] can: ucan: add driver for Theobroma Systems UCAN devices Date: Tue, 3 Apr 2018 16:35:13 +0200 Message-Id: <20180403143514.24200-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 v4 of the Theobroma Systems CAN/USB "UCAN" adapter driver upstreaming effort. 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 | 315 +++++ Documentation/networking/index.rst | 1 + drivers/net/can/usb/Kconfig | 10 + drivers/net/can/usb/Makefile | 1 + drivers/net/can/usb/ucan.c | 1596 ++++++++++++++++++++++++ 5 files changed, 1923 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