From patchwork Sat Jul 16 17:00:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2180 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id F020F3F046 for ; Sat, 16 Jul 2022 19:00:13 +0200 (CEST) Received: by mail-ed1-f69.google.com with SMTP id i9-20020a05640242c900b0043aeffc5cf1sf5410078edc.18 for ; Sat, 16 Jul 2022 10:00:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657990813; cv=pass; d=google.com; s=arc-20160816; b=011QxYVCP/1D4uDRWU0kT7L4O47Ig71E8cgYAKvvrTEt5dRPnIpMIIbfdMz4TWju63 n86YOl7LLU/B10riIEottPX7X4LQNpxYEclEg1cklhjS/xDke2v6jJ6ItOudgtz0tI7G /x/L4ekIYJo7ixOdbLrDG6XDZ7SBsEJcOcr+Y3CB+XsAN+h0VvZqqXlUHlSOvc28gVpo ruRuA/wCd16aaId2GaM0O207bQP97vlLlN/xblB2GMdLzGESHk1H4UfsrMHJR5SKC9hW M1wpZwizmG7ofOrKBH2cmR+2/bMmCyNpfRHcHs5APgKOzk+SHKVQ0DKGbwe+IHvgPBM5 6WMw== 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=ju2c+DqfEutuKkN/fhmhKtclDhx5TXIduKtoYy/4x6Y=; b=SaZVMaHXQxRrHkUCG4sbkZc8i6G0oXd6b/NCOESfE8lNaQPb57YSNwE7l644j9oMU5 FoEjHbJjSorpT0JyIf150hjoJ2tIb+Ax9oB64ryhVqBA4misuJrjgyXVgO4YNi1HRmBx oJYRsjwo6kcYbxJC0TyzzPXfpHI7KdtIhFfTh3cxYjST4nj2XrGLMp6tNfbxG9vLOjCO sfqH3nmv7bCVMv2wl50yHifBfbHcvfimICVQWeRINzDOJpqddBzeaPNMmeiMxPvzVVha dwyMo4bLWugQq/otPCTeHkIP7ZZQq0kU+A11hjtXROoEQQRntLF5xWT3XPFuwjlqk9PR r42w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Ke9bp0sU; 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=ju2c+DqfEutuKkN/fhmhKtclDhx5TXIduKtoYy/4x6Y=; b=nk/9PIaSouozGYVq8IGqeUd5fuqsgAMf1ZUZxkM+yRqKlG0QuId2XY1BrzFmujFO9I T6yyt+3tbduVBgY2uwQz2PlUwrC6DwCZCcRXdNwlJwxeSpL4gcUAzxhbCuouvq+RH2/R uN6UQ63TO/ltp3OBkjh7FXdfyudi9SntAl6+M= 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=ju2c+DqfEutuKkN/fhmhKtclDhx5TXIduKtoYy/4x6Y=; b=pF3GgXK7uUKlz8dt+8lHebqbNMP0it7UnMuQqOTzC3d4oMlWgbkKwEOXce7C0gRzOd RBnU+BOYl3HiJxvk8ih/tJNmDkMFT+fACt6NG3dlKE2fo1/JMBMYI1UIZHGGx6c8KKrA fdAKnrNSlnZ3Xi09KztBjcn/mHWjUWdiI5nNpXeT7wizTySUsSr45VGs2E6KsFT12Bjp q8o8+uAdIr0jN0rK37kCrAAsevENHX28VnNu59yJ2/kMcQYCeI7Cr3wSlhciEFNxsaMY U1fY30v/UpH2XMzKQggS7MzDJ1NTFALr6omYkuoJKjlyaY271F4GXVkUvh96AgygmON0 hi4Q== X-Gm-Message-State: AJIora+PX/JS92Lh/UFQa0WOTidQcM9khWKvwfDNt+QImahK5SSHiksC v3Xoxgy0dnn84oMMipRtC6l52Ka5 X-Google-Smtp-Source: AGRyM1tH0DsNyafneyZW5Fd4pXniuNz0ZE23Z9NYOdsmE7ArjBCvm/6k3JZc+BU97ouPTSSKnNMJjg== X-Received: by 2002:a17:907:60c7:b0:72e:d01f:b884 with SMTP id hv7-20020a17090760c700b0072ed01fb884mr15292795ejc.550.1657990813609; Sat, 16 Jul 2022 10:00:13 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:4357:b0:72b:cf5:145f with SMTP id z23-20020a170906435700b0072b0cf5145fls275850ejm.5.-pod-prod-gmail; Sat, 16 Jul 2022 10:00:12 -0700 (PDT) X-Received: by 2002:a17:906:9b86:b0:6fe:d37f:b29d with SMTP id dd6-20020a1709069b8600b006fed37fb29dmr19078255ejc.327.1657990812410; Sat, 16 Jul 2022 10:00:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657990812; cv=none; d=google.com; s=arc-20160816; b=gIR0sWuHg/DdTzKbN11t+XyymWYWtRn+sUOPC2CHMhQXDd7tww4OahH1G4ZSMojK88 1lgUH9/bZDq4fHKu0pUq/0dj5zbqzfGAGq/7EteHhomk5bvj8gvuEn6/C3joTCTsWB48 i3aVXZQVhy8GdsT/RP5uART1OmCfn+57tTDyOkPAWfk2zrJ52/0bc/dS1Cwp9jW0fBk/ wPTlaDaIoc/mmTBsgqpm13/ZUAekvMrM52L8lnX0VmfnodxY5QKKHspDSm40rjn9xXAh bc4Jthuex7gaGNN5oTRyF6vz4Miv2PAGAeg/qcDKTdZt872lT0qBYaEInWElrjTSixFJ XV+A== 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=nlL1rfSKI0VufnuFia5XzM700DvI42sQqODIGzcOV3g=; b=PUdGUQUvhnEB0ZtgVpjY62LdrtyMkFnlW/yIz4VcN9gHytofAbj9LA+g38vjiUl9Bc vOcYYdbg4m1M6XqKL5izqSUQPrjPHTIovgbwU281uAr4GSgft8OVtPtpKou+D+Gu+yOP UJiD3TD4Pvt85yq48PKZtzq9ztS3gxS3Aa/1MRx/d88Je0mFZ0zRHa7gy2vwDKBfloaS H5gTjDPIlo/5oiaYwXlzhvk6s7AW0prnBDHXZIT3ELO01mMI/FXTHwSu2W7iIWrrWAkl vsCTablllqT26y9m0deLAGN0RpijazTnRX+/bD5bGtFubsjzz4yjseWHYalN8JAyji4i z0Yw== 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 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 gr19-20020a170906e2d300b00722e565b857sor2640433ejb.87.2022.07.16.10.00.12 for (Google Transport Security); Sat, 16 Jul 2022 10:00:12 -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: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 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=Ke9bp0sU; 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/ 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(-)