Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp409680pxb; Thu, 19 Aug 2021 02:26:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfhWJS9iNzAnb36PXNwbTdbkekVMbT7WQa+SFQFVEiL4h10FnPIqnMyLajeKCEVBCrzu31 X-Received: by 2002:a50:fd0c:: with SMTP id i12mr15373128eds.7.1629365182930; Thu, 19 Aug 2021 02:26:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629365182; cv=none; d=google.com; s=arc-20160816; b=YnzV2jSZYH+qtVqjTWG91LR4fjzg4xjlRwx67rpVlULw9ryv7V5LXuU5oxcbIfA+lY Vct/RALF+bwgZig01fTiKsg5CCcw96CnetncjqCQPetuBJ9mDkxgQ6x0BYrvCBCfXps+ gkrRsu5Fjk5VCB1b9pI1nHiGjfn7OtS8IPiblQqN3o8Xe23h8tMuHQJQDCdFuFj2oxXH 6oImO1ySdYK7MApF+FR1teLXPxUk+Rtz0lnx7d/PPjp1xkML/x6RbtjGuZp1fLF1a1j8 U+czbHN7Rj/SQF4WoTjryY7jG/2S7N7y7RspkkKNXMHOZj0godTDU64R0HeQgq3+/TN3 KJtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=ILYDCppuvFZoKFobc82YakJdHXPK2hb0yUNeKSxvHzo=; b=iIs3dB/COO7rV861fKfmWWOCFf9gTP7H5NP/zID0bJAGds5VXQzN+kOrSG+ZtsGnWG 6yLcW56baai23KZtSWnpKZpIX+EyeO7ZabmZtUOtBiNK3+ZMH/MhlXteZyCqV/GKdZOT c0aBcX6OwiFAYf5Zl0m7jH0NHv2wbED4rtdmTwm6k6m788NPivTQT2g1WkFj/YO2r85e peAZMKey9CdaHZHyNPVy6Xsgv+1a9NwnHaXZwIUjdIMvy2LOOAbDmNVLqhZ4Ue2PsXiH o9xY3LRRx71+IGRY2tH279ZubmbEZjWA9S57D/bo/yec66cNsN/Y+gLfRoCG46/v+ORE 9uRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m26si2734083edq.156.2021.08.19.02.26.00; Thu, 19 Aug 2021 02:26:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233367AbhHSJZQ (ORCPT + 99 others); Thu, 19 Aug 2021 05:25:16 -0400 Received: from mail-lf1-f46.google.com ([209.85.167.46]:36603 "EHLO mail-lf1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbhHSJZQ (ORCPT ); Thu, 19 Aug 2021 05:25:16 -0400 Received: by mail-lf1-f46.google.com with SMTP id r9so11475552lfn.3; Thu, 19 Aug 2021 02:24:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ILYDCppuvFZoKFobc82YakJdHXPK2hb0yUNeKSxvHzo=; b=N76JFLUtC2/HHO9Rxxkoxri46r0j4GUjLSa1Xlq4cLqOqnNl864gBi9Ra6A3RyWdHO WToSI8wyCEaJaNLkXetVwsxZPZQf3kP8xnGVmucRbFG3G86rOibHzGmzUUlGgHnPh4Ax itaq5bFLdDMZQDvw86138YsNDarnsrh1L43wa32cmSOb15WseA8aHN7jVP7lZn/UU+5r nz7XUnPZxkKk83ypeL9XxKZzcq06DIy0Ix92KTdINIyHP7PWQCy+7poIti3+O82PrpC7 ATR2sG71d8QPs+QNLvSpRNTQh53H9POOh+No8iOTKyHIHabxTpjejV1QXOOxl1n1AiWG oaNw== X-Gm-Message-State: AOAM5304xotFbE9afFbkX2uqa4iVA9XrYLG1/7+/W4uOrPo+twDIH9Aq ddUfNV+PaIly7PP6IJol8t0+CjJNQKER4BUl7LRzJpuuumo3Vw== X-Received: by 2002:a05:6512:3aa:: with SMTP id v10mr9936420lfp.393.1629365078821; Thu, 19 Aug 2021 02:24:38 -0700 (PDT) MIME-Version: 1.0 References: <20210815033248.98111-1-mailhol.vincent@wanadoo.fr> <20210815033248.98111-2-mailhol.vincent@wanadoo.fr> <20210819074514.jkg7fwztzpxecrwb@pengutronix.de> In-Reply-To: <20210819074514.jkg7fwztzpxecrwb@pengutronix.de> From: Vincent MAILHOL Date: Thu, 19 Aug 2021 18:24:27 +0900 Message-ID: Subject: Re: [PATCH v5 1/7] can: netlink: allow user to turn off unsupported features To: Marc Kleine-Budde Cc: linux-can , =?UTF-8?Q?Stefan_M=C3=A4tje?= , netdev , open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu. 19 Aug 2021 at 16:45, Marc Kleine-Budde wrote: > On 15.08.2021 12:32:42, Vincent Mailhol wrote: > > The sanity checks on the control modes will reject any request related > > to an unsupported features, even turning it off. > > > > Example on an interface which does not support CAN-FD: > > > > $ ip link set can0 type can bitrate 500000 fd off > > RTNETLINK answers: Operation not supported > > > > This patch lets such command go through (but requests to turn on an > > unsupported feature are, of course, still denied). > > > > Signed-off-by: Vincent Mailhol > > I'm planing to send a pull request to net-next today. I want to do some > more tests with this series Ack, I am also preparing a new version. But first, I am just waiting for your reply on the tdc-mode {auto, manual, off}. :) > but this patch is more or less unrelated, > so I can take it in this PR, should I? FYI, the reason to add it to the series is that when setting TDC to off, the ip tool sets both CAN_CTRLMODE_TDC_AUTO and CAN_CTRLMODE_TDC_MANUAL to zero (which the corresponding bits in can_ctrlmode::mask set to 1). Without this patch, netlink would return -ENOTSUPP if the driver only supported one of CAN_CTRLMODE_TDC_{AUTO,MANUAL}. Regardless, this patch makes sense as a standalone, I am fine if you include it in your PR. Also, if you want, you can include the latest patch of the series as well: https://lore.kernel.org/linux-can/20210815033248.98111-8-mailhol.vincent@wanadoo.fr/ It's a comment fix, it should be pretty harmless. Yours sincerely, Vincent