From patchwork Tue Jul 26 21:02:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2251 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 63F1E3F081 for ; Tue, 26 Jul 2022 23:03:25 +0200 (CEST) Received: by mail-ed1-f72.google.com with SMTP id m20-20020a056402431400b0043be03aa310sf5835441edc.23 for ; Tue, 26 Jul 2022 14:03:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658869405; cv=pass; d=google.com; s=arc-20160816; b=mAalfA9q5uvI3it42nZr6rTiweJTmShBj+GzS6iqByvDzKVxapdh4bPOZPjuJ7IaLt MmDfDQCx1OtCev5Ga976+L9KyqB7CNb6d4U1a0U0/MPlKf1l4jZthYux96olrGapsBgr LH3ncHav7iWz09ldCwTaGWUytrNFs/IerYqLstg6tHKAqe0G5v1nznCPWL7JYm/JDq7M 7apZ5cIRuk5Ox30nIbcI8beSgRK6FaMhzHp3WDGcFJ4XRhcimqXh0T6TdIz77yr162xC Zxkh/AbW8qz9CF5y13xFzyWs1XaHXo9YERKNYqXZ4VLCi9OZa4WuEX9q3OdMQPRIeAvQ 3WYA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=AnLrWFvl9L8CmTUO6sFapUAH0jPrDJkWMZ9MGmkcfMU=; b=XYeV9ZTAaOkSnCqFSKcs0HdWB6mzPqdmQixOGMDXjZQnJH9lugYsr/8T27FcMShFG5 gO0a15L6HfE0wWX4UbmD1PMTnXR+DlZBrZXNVrgRTXoMtfSSlW0b1F+BaoxTufwvtG9k TgCn8TUCKQzLKlHgnjsSg3ytu2A27NYSWamBbcRAEWNxSlBwlyIzXsKc4j02nknnNAJZ xUEzjpURj/vVzhyxChDRHsthKpEIZymqdjTds5W+fbK2imxslqGWOdFAl0AShhI7gkAu CGoDuSEYlJq+NCr8HbG3sCG3cU3ixdiEXgj7o3jUWGaZWiNVyoA9bBNNLOppMDOR0gZE eaHw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FTfM21nX; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=AnLrWFvl9L8CmTUO6sFapUAH0jPrDJkWMZ9MGmkcfMU=; b=W6QpPRClHk7TMKohDJ0H2Ym6jwMINWI8hbEw8nIa+ZhFmP9epmIcE75RB1MNodegXh bjayElM9iy8K8Hl5biS6Ffhq9fS+2EMhgBWo6lkqqIGz/OYyxUk+jzSBPUYfTagZ6L23 tJ0Q3iXo3NdRk+y+q+SmokohImeyIm0kBtD1c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-unsubscribe; bh=AnLrWFvl9L8CmTUO6sFapUAH0jPrDJkWMZ9MGmkcfMU=; b=hOZcw6LtnGRJgoL/5Mejks2sdgomBZt/w7s3FF2d69Gsq6dfuuZPQxQIbMvdJr5RKF 5m6TnNnb2n6OIzsbfBNhrH5vP9uA1jFZQ9TYW4sR9mpiSHMCL1P83Fj7/l2Ov8s/zAf5 6Xm688sSOqgluIG4vX97ErSubqS4GbCIbvboVtdts2pCpDAHzMuCBn12bZmEn0PyoBcy n3n8V8WbNYTL6FKIiAX5dDRcEchlMEZKMA6hGDDihlfMkPTl3/uYngQu4Wu5OnPR5jpI waln3wljUJQTfNU/qScwf6MDTox+jctQu4hOzUYfRIMc8ov+Pxz0M+XshyXKdh7DSU4G pMWg== X-Gm-Message-State: AJIora8wsdRG2969jCB2yost0/wBEOjDIHl48m9x1b1aGn1hPBhcTQnJ d1EGVswOmZLUpn8E+82T2byrqK/K X-Google-Smtp-Source: AGRyM1uDJZJm7Pjp8kd3WaP1XetJCoINsLMgDJ3kI4tIGLHST0byjFweZrAyeOaNzpTic2ZVK+5XLg== X-Received: by 2002:a17:907:2808:b0:72b:57c2:5e1e with SMTP id eb8-20020a170907280800b0072b57c25e1emr14989854ejc.577.1658869405123; Tue, 26 Jul 2022 14:03:25 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:af86:b0:72b:41fa:b554 with SMTP id mj6-20020a170906af8600b0072b41fab554ls1355388ejb.10.-pod-prod-gmail; Tue, 26 Jul 2022 14:03:24 -0700 (PDT) X-Received: by 2002:a17:906:8a63:b0:72b:3796:9d0b with SMTP id hy3-20020a1709068a6300b0072b37969d0bmr15249008ejc.573.1658869403949; Tue, 26 Jul 2022 14:03:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658869403; cv=none; d=google.com; s=arc-20160816; b=f3+L6w3vkF2uUzU+ITTHs9RjN/ZzXZe90kSrKsx7YIak22OqyPkFZwY990GWnU3iQ2 BOQWz1SRX4HkkDVmFUQmuwqSf6aTch7db2vC+mC+oWxDwTscoPwFSaA/HABjemYVJp/O zcmsUPh6u9cbzQ2eDXbyce5kcH0/fZIezV0+oQPCch4qrPxlgghXNM1iHT/VR554D5UJ Fz3ERJl5IXhfS1m6kL8kKRekcfvbSdXxxo0nZZnBrmhCF4OjVO88avs4mwq0eI3w73gw Wwf5dGQBeP/Vfrdm38y2jlzy7OLGO9OWxLgErcQYeHePvOEKykYl060QwdBENzn8ni0w HsIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=/Fix0ZZRTMX4dxRXPKnOmcw0/YjyjkpPTfrxJEvmQ4k=; b=Xv8zQ2Flc8TjhmtJCOEtIQx4Po18T5T5gphXG+HSU6sP2kCUY8ZQ3J3PF4Y5TWThOY 3EqhzO+4I4uOkuQqe3OfOPh865mri84R/ALjBvRDOGhm8BBoLThbzdn5X92va8VLc6JR 9RGUttnyJhmD0KBTsKPeaobuT+wb48HOVpMzHFCBZPscx9sBXZSYZz+NZB68RqSYNwMp 48XFH4i4yqfH5326FwXWuanT5Mase+DdtxkNxiDE3KdYonweQCZNAVe4ie6mz7UGcKX5 Ohss3w1UwHgH7uAcfXa1djxk75/Z5AZBmXrNJ4HHoBqdV7Ne/sZY874QBg+37wgMaPgr MB2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FTfM21nX; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id fy3-20020a170906b7c300b007263150e3a6sor5756477ejb.51.2022.07.26.14.03.23 for (Google Transport Security); Tue, 26 Jul 2022 14:03:23 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:907:6890:b0:72e:dc8f:ad42 with SMTP id qy16-20020a170907689000b0072edc8fad42mr14787713ejc.683.1658869403619; Tue, 26 Jul 2022 14:03:23 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-14-98-67.retail.telecomitalia.it. [87.14.98.67]) by smtp.gmail.com with ESMTPSA id y19-20020aa7d513000000b0043a7293a03dsm9092849edq.7.2022.07.26.14.03.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 14:03:22 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-can@vger.kernel.org, Marc Kleine-Budde , Oliver Hartkopp , michael@amarulasolutions.com, Amarula patchwork , Jeroen Hofstee , Dario Binacchi , Alexandru Tachici , Andrew Lunn , Arnd Bergmann , "David S. Miller" , Eric Dumazet , Guangbin Huang , "Gustavo A. R. Silva" , Hao Chen , Heiner Kallweit , Ido Schimmel , Jakub Kicinski , Leon Romanovsky , Oleksij Rempel , Paolo Abeni , Sean Anderson , Tom Rix , Wolfgang Grandegger , Yufeng Mo , netdev@vger.kernel.org Subject: [RFC PATCH v3 0/9] can: slcan: extend supported features (step 2) Date: Tue, 26 Jul 2022 23:02:08 +0200 Message-Id: <20220726210217.3368497-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FTfM21nX; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , With this series I try to finish the task, started with the series [1], of completely removing the dependency of the slcan driver from the userspace slcand/slcan_attach applications. The series also contains patches that remove the legacy stuff (slcan_devs, SLCAN_MAGIC, ...) and do some module cleanup. The series has been created on top of the patches: can: slcan: convert comments to network style comments can: slcan: slcan_init() convert printk(LEVEL ...) to pr_level() can: slcan: fix whitespace issues can: slcan: convert comparison to NULL into !val can: slcan: clean up if/else can: slcan: use scnprintf() as a hardening measure can: slcan: do not report txerr and rxerr during bus-off can: slcan: do not sleep with a spin lock held applied to linux-next. [1] https://lore.kernel.org/all/20220628163137.413025-1-dario.binacchi@amarulasolutions.com/ Changes in v3: - Update the commit message. - Use 1 space in front of the =. - Put the series as RFC again. - Pick up the patch "can: slcan: use KBUILD_MODNAME and define pr_fmt to replace hardcoded names". - Add the patch "ethtool: add support to get/set CAN bit time register" to the series. - Add the patch "can: slcan: add support to set bit time register (btr)" to the series. - Replace the link https://marc.info/?l=linux-can&m=165806705927851&w=2 with https://lore.kernel.org/all/507b5973-d673-4755-3b64-b41cb9a13b6f@hartkopp.net. - Add the `Suggested-by' tag. Changes in v2: - Re-add headers that export at least one symbol used by the module. - Update the commit description. - Drop the old "slcan" name to use the standard canX interface naming. - Remove comment on listen-only command. - Update the commit subject and description. - Add the patch "MAINTAINERS: Add myself as maintainer of the SLCAN driver" to the series. Dario Binacchi (8): can: slcan: remove useless header inclusions can: slcan: remove legacy infrastructure can: slcan: change every `slc' occurrence in `slcan' can: slcan: use the generic can_change_mtu() can: slcan: add support for listen-only mode ethtool: add support to get/set CAN bit time register can: slcan: add support to set bit time register (btr) MAINTAINERS: Add maintainer for the slcan driver Vincent Mailhol (1): can: slcan: use KBUILD_MODNAME and define pr_fmt to replace hardcoded names MAINTAINERS | 6 + drivers/net/can/slcan/slcan-core.c | 515 +++++++++----------------- drivers/net/can/slcan/slcan-ethtool.c | 13 + drivers/net/can/slcan/slcan.h | 1 + include/uapi/linux/ethtool.h | 1 + net/ethtool/common.c | 1 + net/ethtool/ioctl.c | 1 + 7 files changed, 204 insertions(+), 334 deletions(-)