Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1560477imn; Sun, 31 Jul 2022 11:59:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR7sgwS0l+Up4RLKEWkA5Fg4IRzU1Or/6lnMk0tq6HaM+mlokO+KA634cZZ+ySxlU+nMxqBy X-Received: by 2002:a63:e10e:0:b0:41c:26f4:15b7 with SMTP id z14-20020a63e10e000000b0041c26f415b7mr571908pgh.402.1659293982661; Sun, 31 Jul 2022 11:59:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659293982; cv=none; d=google.com; s=arc-20160816; b=Fhh9HE4Gt7IElrJj0BuWUpCppHEGpyiMj/S+bh1aEShgfiZPUmHGERiMAecyLGE1fS 9vRt3ObgWc1/iz5ndD35bRDdrn/BWdoYcENWIRIoGOronWoHkY9dt35vtI2K+12cUSDI h8+Ok5qlpynGiIkwJDDOazYJDak1TjHWD1UDfscSr1XK8nNGSkv8vtFm9QdsVt5fufi3 W4d3fgNLXup2fI07nFXTKIFix4yFN7v2bsTYEFp/x1VUi2fpwfHCCWqnawmnc8U981ix F3HT73lyV+OGpQpMsFaU78sThck/1kT19cw2o4E33gcuBORFoDsEnoXApDWu2T/42G3a arMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Wz5ZTHa522Wi5grqFm/CLQ7E1VSMSHOzeqnEFfkJLjY=; b=HVU/noykZt6IbgeStaDUL1V9GzvYR+3hMgmRkVDD8VNweT2NQCMaYha00/fIMd9zgu A9yg+wsMFvp43rRnRCKngHZyqxG7By3mYf4HplIbB3mz6f4gsckCf9+gREvmAWbgSczz BtLnsRUsUl5cKGpJxr5/XqqrljAx4z7pu3u0ca0ER51Ik9bw8e0d3Uz4EugfF6q0jJYL xRedbXEZnfT3261N50xJ80pGcoZ/jPno1npDRcwz9r3uK6e8yWLj7FrSvviqqenHcbuB A8UFV5d4sYqawPY+426gcSmUvlEj7Z6BdEQQTTKxvLVoAER1gooIZMo8gkgXcZS3eILW XQ6g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a656944000000b00419a4c68b7esi10282389pgq.872.2022.07.31.11.59.27; Sun, 31 Jul 2022 11:59:42 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237673AbiGaS6W (ORCPT + 99 others); Sun, 31 Jul 2022 14:58:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230114AbiGaS6V (ORCPT ); Sun, 31 Jul 2022 14:58:21 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C85E2DFEE for ; Sun, 31 Jul 2022 11:58:20 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oIE8f-0004uc-1G; Sun, 31 Jul 2022 20:58:09 +0200 Received: from pengutronix.de (unknown [IPv6:2a01:4f8:1c1c:29e9:22:41ff:fe00:1400]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 39135BEBD0; Sun, 31 Jul 2022 18:58:05 +0000 (UTC) Date: Sun, 31 Jul 2022 20:58:03 +0200 From: Marc Kleine-Budde To: Dario Binacchi Cc: Max Staudt , linux-kernel@vger.kernel.org, linux-can@vger.kernel.org, Oliver Hartkopp , michael@amarulasolutions.com, Amarula patchwork , Jeroen Hofstee , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Wolfgang Grandegger , netdev@vger.kernel.org Subject: Re: [RFC PATCH v3 8/9] can: slcan: add support to set bit time register (btr) Message-ID: <20220731185803.bdg4dugwf4dv2owk@pengutronix.de> References: <20220727192839.707a3453.max@enpas.org> <20220727182414.3mysdeam7mtnqyfx@pengutronix.de> <20220728090228.nckgpmfe7rpnfcyr@pengutronix.de> <20220728105049.43gbjuctezxzmm4j@pengutronix.de> <20220728125734.1c380d25.max@enpas.org> <20220729073352.rfxdyjvttjp7rnfk@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="46pf6oluekbhoi4p" Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 --46pf6oluekbhoi4p Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 31.07.2022 17:54:01, Dario Binacchi wrote: > > If an adapter follows 100% the official firmware doc the BTR registers > > are interpreted as SJA1000 with 8 MHz CAN clock. >=20 > I checked the sources and documentation of the usb adapter I used (i. > e. Https://www.fischl.de/usbtin/): > ... > sxxyyzz[CR] Set can bitrate registers of MCP2515. You > can set non-standard baudrates which are not supported by the "Sx" > command. I hope the effective clock speed is documented somewhere, as you need this information to set the registers. > xx: CNF1 as hexadecimal value (00-FF) > yy: CNF2 as hexadecimal value (00-FF) > zz: CNF3 as hexadecimal value > ... >=20 > Different from what is reported by can232_ver3_Manual.pdf : >=20 > sxxyy[CR] Setup with BTR0/BTR1 CAN bit-rates where xx and yy is a= hex > value. This command is only active if the CAN >=20 > And here is the type of control carried out by the slcan_attach for > the btr parameter: > https://github.com/linux-can/can-utils/blob/master/slcan_attach.c#L144 > When I would have expected a different check (i. e. if (strlen(btr) > 4). > Therefore it is possible that each adapter uses these bytes in its own > way as well as > in the content and also in the number of bytes. I expected something like that. regards, Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --46pf6oluekbhoi4p Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEBsvAIBsPu6mG7thcrX5LkNig010FAmLm0LkACgkQrX5LkNig 013AQwf/eh8bIF53PTKoQPbikvqT6o6izoKdHiIuQetbs61GRgGpOo2jXKUjRrLu l6BiXmM7OvXDW26Y1+Wqu/DgTkL90vyy7UOyKjGQ+NnwDVYHUvwDfLTSBXXO4DKH rMhQ1imz68YcRUfd9EMyLOKKOux7sim1a1Xtksgy1C6hLmpiKhLwpNqe/4xA1KxM N3rLrliHOdxYNIlYzFXXuyrtNXD6CsSpAjq9DANHQ/kfLmWGwj6ijXGknP7KR2Rz rYU1dEQjNaDOtNwpnGpDPVrbOIFZDb30b/OOvUrJ1HpkjeuttOX7Mw/OnDLE1ReJ DSODRfUZWnK2LSQkf4TEvUkCpHw7fw== =aL16 -----END PGP SIGNATURE----- --46pf6oluekbhoi4p--