Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1593564imw; Sat, 16 Jul 2022 10:02:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vDbtaQkxS3UnCmrIpdXLPJyRwpa5/04WgIk1WC6z2mLUg7vJgNEhT+Ra9PUZxE/bg8G3ak X-Received: by 2002:a17:907:3f02:b0:6f3:5c42:321a with SMTP id hq2-20020a1709073f0200b006f35c42321amr18516102ejc.521.1657990922231; Sat, 16 Jul 2022 10:02:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657990922; cv=none; d=google.com; s=arc-20160816; b=DAJ90Io4c05EYDgRcXUgNYb9vho9gQ9skozL76nsJe1u4H9gy9Aqn0fhrvxeaDMr34 FI9SxsfuoT9TigTqs8HfQmMilZFUatfq7RFLNsejJUb8NcFeSdKHZcTOtJQ5Z56VIMGr uoLC0bUSsBiRf61WSj20m0B7fkdbhOu/YzwIhG0iEB6zTlW8/E2eq6NJIl2HDQuiXoqj ohsPA7E9zKMhFoWIUhKZfMpypddJnvlarDrFqIDQKka6Rh/F1/+AfuPx0l9WvvFwFrz0 616FcT0PMczqe3reMkFsAZh46ixmwhih3YmJZ6vtSXjM3LhVIfH9oHeMadZRlhFTn+Wk 1LwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=nlL1rfSKI0VufnuFia5XzM700DvI42sQqODIGzcOV3g=; b=QZ1Pi0iFbr7YS7Ln9w360v1MBs5uNf1eXPypkkyKRqMhUyhZZzTL9gCumwKH5CGXcP tS5ycKByN9AvpFPE5jEbmkGeNeqW+N3P13AYPVfDiHTf5NbdQBLuMZ5XUff+vkHSiH+7 zixV79XqKS6m+pT1iyx0ouJMV3L8PJmW1AHfQOGF08vhtLedd5WDDkUSqJn/JGiTYPO9 RLPRLcYKCjCnpv8/pvEMaz4esJKY7jikrXtjICdQABDJ4LGZNJp02xG5aFpmsEU6xJ7f /vscReu1eVG370cSSJER+IV08Grrl053eZ4ElR1+fUpc8wQKtsDPqXYTi0xPoRWCVYgr WdWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Ke9bp0sU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd18-20020a1709076e1200b0072e56bd2bbbsi3626638ejc.570.2022.07.16.10.01.37; Sat, 16 Jul 2022 10:02:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Ke9bp0sU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231985AbiGPRAQ (ORCPT + 99 others); Sat, 16 Jul 2022 13:00:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231918AbiGPRAP (ORCPT ); Sat, 16 Jul 2022 13:00:15 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D60D31F621 for ; Sat, 16 Jul 2022 10:00:13 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id ez10so14001020ejc.13 for ; Sat, 16 Jul 2022 10:00:13 -0700 (PDT) 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 :content-transfer-encoding; bh=nlL1rfSKI0VufnuFia5XzM700DvI42sQqODIGzcOV3g=; b=Ke9bp0sUSuPEIDm0LtBj8Yoo6Pr1BExYCtWeEgwK15DD2jj1LrH8Ex65+G+6Mc7TWo 9LI2TAdrTxAHt6cw4cHGHEZo0BUT5YLhxN49rWZMQ2UpbNHeT60Bio4egn4me/uGRZwg L1hH3WDXE3SDr0lknjXKyu835PNThnwnt4y5c= 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 :content-transfer-encoding; bh=nlL1rfSKI0VufnuFia5XzM700DvI42sQqODIGzcOV3g=; b=wOUNDe7xdEDGBtgzy6O7/uR9rDcM8RrfybtKVIitb5eFvPCgAb7+Hr8x4l/Xuq7gCm GnmqWUC7w1pHSvosvQVQuWYSGDrnsz38suc4YRtBCV4Zn7MnTjn7w/wCOizYN8pSr7Ho KMFeBngAe2xry4/VFsz6kh3wriQxe2Xrm4gGnL/q/djfVenCmR8FJhgZoMCR1Zl1Grza g4zyTzQmAzpE2vFnDAjc85mSPPOCAIaOsopZcm4RTvcgXQUF7b/p5RXMu59S906PzUdM T/9IDlOfYk4Ec57dWX+r6tugL/WMnzbHdnwzXPf/JyO7lb6D5CCjNnsJTzAFvAP6cY75 qSrg== X-Gm-Message-State: AJIora+bNys3OwjC0SETfDU/Ou5qjvb3xR5Z9qxaxNBUngbQe6X79tul HvL6+rEKWcf/Aioc06xT0MGnKIQdTyMa0A== X-Received: by 2002:a17:907:c27:b0:72b:8118:b899 with SMTP id ga39-20020a1709070c2700b0072b8118b899mr19143718ejc.739.1657990812172; Sat, 16 Jul 2022 10:00:12 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-80-182-13-224.pool80182.interbusiness.it. [80.182.13.224]) by smtp.gmail.com with ESMTPSA id g3-20020a170906538300b0072b14836087sm3363135ejo.103.2022.07.16.10.00.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Jul 2022 10:00:11 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Jeroen Hofstee , michael@amarulasolutions.com, Amarula patchwork , Dario Binacchi , "David S. Miller" , Eric Dumazet , Greg Kroah-Hartman , Jakub Kicinski , Jiri Slaby , Marc Kleine-Budde , Paolo Abeni , Vincent Mailhol , Wolfgang Grandegger , linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: [RFC PATCH 0/5] can: slcan: extend supported features (step 2) Date: Sat, 16 Jul 2022 19:00:02 +0200 Message-Id: <20220716170007.2020037-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/ Dario Binacchi (5): 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: send the listen-only command to the adapter drivers/net/can/slcan/slcan-core.c | 465 +++++++++-------------------- 1 file changed, 134 insertions(+), 331 deletions(-) -- 2.32.0