Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1177961iog; Sat, 25 Jun 2022 03:00:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tfUGa68kVJVRymu/YmL5WsDrOEqCchyikUILNWBGdm/ZEer+vEOYz7vK3S9INsdAXszqS/ X-Received: by 2002:a05:6a00:2490:b0:51b:f709:ebbc with SMTP id c16-20020a056a00249000b0051bf709ebbcmr3764513pfv.43.1656151249230; Sat, 25 Jun 2022 03:00:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656151249; cv=none; d=google.com; s=arc-20160816; b=GHR+gabn2F+xu/Sa6duUCVPY8/svDEbyhWTy7Dt4gKt4HXODjp9GgDR+X4q3D/Rz9J pyaKUFEs//NmHeEY8+4uo5UmGdnNoCHWOZ3rMnlQijbbCpubqUr/yCbinc7Z9rvYmlX8 Zs7pXZCmhl1vUJiTPYCFH+dZj0/+YfhbmcGzjibSehj8OSHEWXLzaS9AJTzf0VB8OFiA ngxzOPnzZ7vWyHpLhZsxK4PQmWdchKr44cu3DJDrQlL2EVOaYRKq99SqNtRC4l9NA7Sg K2wcneVyiYm25IUVVVLHhh4N18lqRlZKdvpK/Gb6Cj+zsyQ9ckZkbOhqkA2peTwxSZNV nj3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=1NfJQ6y8IJRPtneyP0bi0c/IwReapXfD8FIobNalWsM=; b=PEI3YRTvAkwKlJtw1RNFHkrrtM5VslCIGUiqGgICAATrTfDmHs177mqNHTDTYryIEP p03XgqXwQKysmJMeNnUcs/xFyDTOLO66QJ2Mn2QUlGt9jfvi0e1QHsU0PT1lM8cS0vLS s007MEhojma7LajeoXFEmC6wbdnuvWAUopHhCHYVEAtN5y/LTsPG+9WUJ248aLbvrtad lQpDK9l4zVTm/stjxmgqKogkhIyNXOzk1wOHryen6/RvHEK0Ri/E84Mi4mlOMgy5YddU iSyEngt43SreCx7Icp/r40setDVxV+SXc49DJzSbEV6riLqkZCkUBFaCeagT7gylZQGf LsFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kGJDTSrx; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h10-20020a63df4a000000b0040ca228c3ccsi6062352pgj.388.2022.06.25.03.00.36; Sat, 25 Jun 2022 03:00:49 -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=@intel.com header.s=Intel header.b=kGJDTSrx; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232544AbiFYJyu (ORCPT + 99 others); Sat, 25 Jun 2022 05:54:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232553AbiFYJyr (ORCPT ); Sat, 25 Jun 2022 05:54:47 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C329932ED8; Sat, 25 Jun 2022 02:54:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656150885; x=1687686885; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=VKuQVwQN3wupa/wWGwfy2HpIYFCAp6PhOr5/aA9piQw=; b=kGJDTSrxVPlGQ7hvsgNNOWBvyj3C3x0r2F2bKbBjaDgomO/n8M7HcmCb qNawYE6+DMIKXg6yh/P9l2bSdfMIhFfdqmMe+iS+A7+bZ6hJD/L1LiLMn O41D8cWBQ+GKPhY/f2v5pacgm0WsK8Q7cml/2W0wcP2JYhDw0C4TB370k 11qkvUwAEjjD7Ky+Y3G8J6U5cl6+H5VGM349U1YNfEBeysa49Z+/qyDLI iGSD76xfmKRR3UCVjdyw0un3peDrJCHsHY66qcXs9r59GY/My4cnS/iCC ThHZriFFoBZM87cSGfbi+hOrZ8W6PhTrLZQ9IvN1XzTmNxfO/Nj2OOGVA w==; X-IronPort-AV: E=McAfee;i="6400,9594,10388"; a="281214559" X-IronPort-AV: E=Sophos;i="5.92,222,1650956400"; d="scan'208";a="281214559" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2022 02:54:45 -0700 X-IronPort-AV: E=Sophos;i="5.92,222,1650956400"; d="scan'208";a="645644075" Received: from selvaku-mobl.ger.corp.intel.com ([10.252.60.244]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2022 02:54:42 -0700 Date: Sat, 25 Jun 2022 12:54:39 +0300 (EEST) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Lino Sanfilippo cc: Andy Shevchenko , Greg Kroah-Hartman , Jiri Slaby , robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, vz@mleia.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-serial , LKML , lukas@wunner.de, p.rosenberger@kunbus.com, Lino Sanfilippo Subject: Re: [PATCH 5/8] dt_bindings: rs485: Correct delay values In-Reply-To: <6c50fdca-aac4-aaf5-ad34-18a60fcc0aa0@gmx.de> Message-ID: References: <20220622154659.8710-1-LinoSanfilippo@gmx.de> <20220622154659.8710-6-LinoSanfilippo@gmx.de> <6c50fdca-aac4-aaf5-ad34-18a60fcc0aa0@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Thu, 23 Jun 2022, Lino Sanfilippo wrote: > On 23.06.22 at 18:29, Andy Shevchenko wrote: > > On Wed, Jun 22, 2022 at 05:46:56PM +0200, Lino Sanfilippo wrote: > >> From: Lino Sanfilippo > >> > >> The maximum allowed delay for RTS before and RTS after send is 100 ms. > >> Adjust the documentation accordingly. > > > > > > Is it only documentation issue? If the code allows this to be set higher > > than 100, we may not change the documentation since this an ABI (from > > firmware <--> kernel perspective) we need to support old variants. > > > > Well currently the documentation claims that a maximum of 1000 msecs is allowed but > nothing actually checks the values read from device tree/ACPI and so it is possible > to set much higher values (note that the UART drivers dont check the delays read from > DT/ACPI either, the only exception I found is max310x which clamps it to 15 ms). > > We already have a maximum of 100 ms defined for RTS delays set via TIOCSRS485. To be > consistent with TIOCSRS485 the same limit is used for DT/ACPI values in this patch. > > I am aware that this changes the firmware/kernel ABI. But we had a similar situation when > the sanity checks for TIOCSRS485 were introduced > (see https://lore.kernel.org/all/20220410104642.32195-2-LinoSanfilippo@gmx.de/) > since before we did not have those limits for all drivers (some drivers clamped the > values itself but many did not care). > Furthermore 100 ms is already a very high value for RTS delays (which are usually rather > in usecs range). So IMHO the risk is very low to break anything when values are clamped > that are higher than that. Did you see this development direction (from Lukas): https://lore.kernel.org/linux-serial/20220309125908.GA9283@wunner.de/ ? Effectively, he wants to making a compat threshold at 1msec and beyond that the input value would be interpreted as nsecs. -- i.