From patchwork Mon Jul 25 06:54:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2244 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id BE81A3F046 for ; Mon, 25 Jul 2022 08:54:25 +0200 (CEST) Received: by mail-ej1-f71.google.com with SMTP id ga9-20020a1709070c0900b0072b4d787f5dsf2810277ejc.21 for ; Sun, 24 Jul 2022 23:54:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658732065; cv=pass; d=google.com; s=arc-20160816; b=1Gq10zwQfUlt4QytB6ILJFh1Q9p2/7RWvVPNsJqZ1wujqpQye+1LeNjZCQO539x6jE BIfR6dbtY8ZovJTiBMY95Ru9gx11DrMAhJmelglANXcYhXvcJDjTN3V+IKXr6IOIY4yO 5rmXi6TgopUtUF1xpdv7qQwelkfwKskRaXpeqK7qXXi/R6psWORznERoz+p1xFShcSBW PSoCAkn4Jm89pSH7H8PG+rq7qu1DavN0M2DEhjitEue3EqS4UX5Nrax3Fcx5gM0CcZCs lc/Oz99LfF7HxlOuMEWJYSWwuO6zJ+0vm1bWIbFxidBEDDJBDoh3VX1e6PVfRl3xb8p6 1qYA== 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=s7mF7LAA0lF1LfsD3W8kfHYMTxJ/a8FbJs0eQXCKAKU=; b=GlTOGTJ9SkhulGTo4IxnrQKW25/u3lO2STVxI0TZJGdv786GKXeUFt75GdgBgc/5S0 FhmNQjkPgIHZ7Km6tO/fejb+pnmA/QeaRbslHRGNtgqwDqfXsmL0pbrQ9oM8pynA7Z3T tyjZJ9dZrv/2fnYCB15YKQul9581FGdZk5f47At28+SNDHhh2omlNNGQ5xGA4+xj8pYH Ip8Ncum2jOSNgWnx4ziPY+opJC1HtKFJavB+uA7/Lkou4KaGP9MMokGRfF0KRuemrodE ASYuf+FWNpfpclrNTQA+BQ+1TEgvTRU9F/I1nEbW47XMKuKfI7BK5V2Dg1bwt9yDDp/e FDSA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FAeAVr6Q; 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=s7mF7LAA0lF1LfsD3W8kfHYMTxJ/a8FbJs0eQXCKAKU=; b=TcT1U83VjeeV3WNc2DKBKaZSp5ZiU1dT7+wmB9nMMumEt8PCAKNEiDQSS3WBiAoWs1 O9PdpAQMej0XOjemtMNBRmR4zjLz+g6N59udg3U6TVYZtVIVepHAkEZM0L/oi4uyXpsT pAS8dVk7s/TKmFVGgEd1EGTmjux6n36fyJP6U= 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=s7mF7LAA0lF1LfsD3W8kfHYMTxJ/a8FbJs0eQXCKAKU=; b=qlhnkXaQ80D2hpeHuD6RfINhTDc6GzE0gz3nKbKADidtbirUWjzCkZyjkjkPULQ3sm /1E1fH8IQmU08MVn0voQE+ZDxuGiK8kLBpOJcDLUjTx0da+THG6gHCNnhzfBNnEU95dN YhqrfRnF2KkMSnaZfz/OGf2TomwU/Tri/bTgi7S1jGaYccduVLrE9OevzRqidiP82mdR X+GPMUkqUFgeQbNjZ1s2VszpnkR4Z2BPAPhnhQyFs68VzYVCmYQK/LWs9S0cZpE/Cxba iLQtlGEzxOCojeaX4SOWYSPvTUYIxWARX0UwVWWU/yRRuU8W4D+WH7FHKpP1g7AgwW/I kRCA== X-Gm-Message-State: AJIora9JrDrAoUt2r5e8EmeawxRtvJmTPUxreeQsbijEAsNwbekJkKPD OI9wanP/FGQxRil9PJBlWuthCYA+ X-Google-Smtp-Source: AGRyM1tavDR8PX09JGJM7mqt2v2ac7/hvLvY0pLKReWXdSyOfsWrtX1kxQ/yJZMNA29uKzy81WYqcQ== X-Received: by 2002:a17:907:3e03:b0:722:e694:438 with SMTP id hp3-20020a1709073e0300b00722e6940438mr8926566ejc.755.1658732065398; Sun, 24 Jul 2022 23:54:25 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a50:d0d7:0:b0:43a:6e16:5059 with SMTP id g23-20020a50d0d7000000b0043a6e165059ls3518478edf.2.-pod-prod-gmail; Sun, 24 Jul 2022 23:54:24 -0700 (PDT) X-Received: by 2002:a05:6402:5384:b0:431:6d84:b451 with SMTP id ew4-20020a056402538400b004316d84b451mr11650383edb.46.1658732064201; Sun, 24 Jul 2022 23:54:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658732064; cv=none; d=google.com; s=arc-20160816; b=SRrxzp8RW9w6MbAk4RbOV7eq5OLVVUnANXcR18rOkNEl7MjYXGVM1HZE5kFw5dbEzh tIYXX61K6k0Xx6WPizC4Qwh12yGrVjdFUVchlRLquIhVSnPYPzu0Jr/cONQuxG6KfPLN PJGZ555YqmztszGsUgowBL4F3SqxB4QifbXKh4Fk4ugUbQAiJsWbHLxZj7hfRAbc7L00 hmVnmRm4lMf2eTiMvAFKJglvWPpxlX/8Q8/DAv8nZYcEWezJE+bgCfpfDfRp5w0hZJPt 8N2Ga+2Bz5hs+KPSxqBP0oxp9zJ/VFmTlaiNUgvGT9AbxXRXXxP3xB9F0t1UojlNwLlm z6Sw== 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=WmGhl/O8vO8ecgOB3iZcnGm9OSQetL5QifZHl1Y9Jtw=; b=y40KYIyxgUcfqnCjuxZpzWuNhvz6T0JywhHYSHpOK3BuJYatVwgrCOuxTaIxdJ/OC8 xtjsyAXnCuA22/tbZxnZrVF4duaaWEb+iDSuu2V+/+VysR0hnnA+sm/HdGcc2XvexEyT oHDrHEpZR26rLbrvDaVohcWQ/Hm9hKiXIoyEFHp3h6loAsKO35bKfqLqv8+mZRxBOPAB tlkOzDj7eRZCNJe1a5K/RQG5Xa225KHbHSHGAw2tAAbhXX12jnJj+oncLskaWXq66cJZ jlh0mbdjtbQZvrwoBFko3czLPVhOAMWGvrJRC+XJK0lUCQJVjAeFHk2YQiEKyyQk5BWY OHlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FAeAVr6Q; 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 b98-20020a509f6b000000b004357254db69sor5008874edf.13.2022.07.24.23.54.24 for (Google Transport Security); Sun, 24 Jul 2022 23:54:24 -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:a05:6402:5415:b0:43b:a888:fefe with SMTP id ev21-20020a056402541500b0043ba888fefemr11538643edb.302.1658732063862; Sun, 24 Jul 2022 23:54: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 r2-20020a1709060d4200b00722e57fa051sm4967711ejh.90.2022.07.24.23.54.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jul 2022 23:54:23 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Amarula patchwork , Jeroen Hofstee , Oliver Hartkopp , Dario Binacchi , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Marc Kleine-Budde , Paolo Abeni , Wolfgang Grandegger , linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 0/6] can: slcan: extend supported features (step 2) Date: Mon, 25 Jul 2022 08:54:13 +0200 Message-Id: <20220725065419.3005015-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=FAeAVr6Q; 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, however, still lacks a patch for sending the bitrate setting command to the adapter: slcan_attach -b Without at least this patch the task cannot be considered truly completed. The idea I got is that this can only happen through the ethtool API. Among the various operations made available by this interface I would have used the set_regs (but only the get_regs has been developed), or, the set_eeprom, even if the setting would not be stored in an eeprom. IMHO it would take a set_regs operation with a `struct ethtool_wregs' parameter similar to `struct ethtool_eeprom' without the magic field: struct ethtool_wregs { __u32 cmd; __u32 offset; __u32 len; __u8 data[0]; }; But I am not the expert and if there was an alternative solution already usable, it would be welcome. 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 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 (6): 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 MAINTAINERS: Add maintainer for the slcan driver MAINTAINERS | 6 + drivers/net/can/slcan/slcan-core.c | 451 +++++++++-------------------- 2 files changed, 139 insertions(+), 318 deletions(-)