Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1292758pxj; Fri, 18 Jun 2021 04:04:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPT7XJ0TyM/kRJoiFpseorHhvQbRgWzgDRQeX/In9CHaxCaQroWrKB/MBBA9gRo32iSFGF X-Received: by 2002:aa7:ca50:: with SMTP id j16mr4152817edt.158.1624014278415; Fri, 18 Jun 2021 04:04:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624014278; cv=none; d=google.com; s=arc-20160816; b=Opj8de24UObULz6+z9K87wigmIAL3CB6u6TPwsJ7Qndh9l1VF/arOq+IgcSl/3jVSA HZlXlZfRV28Ob1jX/Yw33eVKxAeYAEUExbyJ/hrngttxsyxiVe07R8Dz/3P+yaGrxNxY tFKc8K5w2txPbwc8dKEyp0bRo5Ar9TAHP3uPBL5mcmCj8SN1yFCksxFE+ghVvrrphVg7 fbItUf6KdHlQb1QyDx9MibvTlD2oOeE1IXDkGsXryPZIpUTVN86kUgjhFYfdKBADC76a Zh2/Kv4yFoLW6yD4heqfpLpVNNE+Ue9L0kutk2+WS/UmEDX4MjaeAK4UFY7stmvbm9Ui tgcA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ZuYsiPfql2v35fFHHhqVAE+lBQ1tHbPOfjs8gCWG8LY=; b=ME6nMIm6cCTmrgFOEXNq42dISM53WjR0dbYP+MoGG+YhIlSVRE5yGbIuK0RWeTj9xU k0d+qACmoPlvB8VocM67QwoLzh3T4G8AnoL7iK45+OWbUV+P1dip06Tk5BFHUXdCPaM1 YrJL+eq3cWfu3iTy5jtE2PEkpIfzmaBJnbghMYbK6eaQsvcsZqbG+VzFuLXApKChVdLt yQfIoti4MIPfoNsNVWb+3AoozcokIMfd5JFhumg7zzO16GZE5a2F0VFE0XvAvf/5FC4N DYbyl712Pge/EZQIgNqmr9NZ8ZSX1gVg7cE3gbL4Jmo3I/HuK7hlM/IjjSz5qsX1isCI NtuQ== 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 c6si2186456ejc.409.2021.06.18.04.04.13; Fri, 18 Jun 2021 04:04:38 -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 S232431AbhFRIzy (ORCPT + 99 others); Fri, 18 Jun 2021 04:55:54 -0400 Received: from smtp05.smtpout.orange.fr ([80.12.242.127]:22145 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231319AbhFRIzx (ORCPT ); Fri, 18 Jun 2021 04:55:53 -0400 Received: from localhost.localdomain ([114.149.34.46]) by mwinf5d28 with ME id JYtR2500E0zjR6y03Ythcp; Fri, 18 Jun 2021 10:53:43 +0200 X-ME-Helo: localhost.localdomain X-ME-Auth: bWFpbGhvbC52aW5jZW50QHdhbmFkb28uZnI= X-ME-Date: Fri, 18 Jun 2021 10:53:43 +0200 X-ME-IP: 114.149.34.46 From: Vincent Mailhol To: Marc Kleine-Budde , Stephen Hemminger , linux-can@vger.kernel.org Cc: Oliver Hartkopp , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Mailhol Subject: [PATCH v3 1/4] iplink_can: fix configuration ranges in print_usage() Date: Fri, 18 Jun 2021 17:53:19 +0900 Message-Id: <20210618085322.147462-2-mailhol.vincent@wanadoo.fr> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210618085322.147462-1-mailhol.vincent@wanadoo.fr> References: <20210618085322.147462-1-mailhol.vincent@wanadoo.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The configuration ranges in print_usage() are taken from "Table 8 - Time segments' minimum configuration ranges" in section 11.3.1.2 "Configuration of the bit time parameters" of ISO 11898-1. The standard clearly specifies that "implementations may allow time segments that exceed the minimum required configuration ranges specified in Table 8". Because no maximum ranges are given, all given ranges { a..b } are simply replaced with { NUMBER }. The actual ranges are specific to earch device and should be confirmed doing: $ ip --details link show can0 1: can0: mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10 link/can promiscuity 0 minmtu 0 maxmtu 0 can state STOPPED restart-ms 0 ES582.1/ES584.1: tseg1 2..256 tseg2 2..128 sjw 1..128 brp 1..512 brp-inc 1 ES582.1/ES584.1: dtseg1 2..32 dtseg2 1..16 dsjw 1..8 dbrp 1..32 dbrp-inc 1 clock 80000000 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 Signed-off-by: Vincent Mailhol --- ip/iplink_can.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ip/iplink_can.c b/ip/iplink_can.c index 6a26f3ff..2736f3ab 100644 --- a/ip/iplink_can.c +++ b/ip/iplink_can.c @@ -44,13 +44,13 @@ static void print_usage(FILE *f) "\n" "\t[ termination { 0..65535 } ]\n" "\n" - "\tWhere: BITRATE := { 1..1000000 }\n" + "\tWhere: BITRATE := { NUMBER }\n" "\t SAMPLE-POINT := { 0.000..0.999 }\n" "\t TQ := { NUMBER }\n" - "\t PROP-SEG := { 1..8 }\n" - "\t PHASE-SEG1 := { 1..8 }\n" - "\t PHASE-SEG2 := { 1..8 }\n" - "\t SJW := { 1..4 }\n" + "\t PROP-SEG := { NUMBER }\n" + "\t PHASE-SEG1 := { NUMBER }\n" + "\t PHASE-SEG2 := { NUMBER }\n" + "\t SJW := { NUMBER }\n" "\t RESTART-MS := { 0 | NUMBER }\n" ); } -- 2.31.1