Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp792225pxb; Tue, 19 Oct 2021 13:08:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGYhkL6sY7Rw7ySc7hCi4giVMRMkVoiEexdoreQgJusjuymTjpvRu2OZ33F0RMr0XkrNJ3 X-Received: by 2002:a17:906:e098:: with SMTP id gh24mr39584315ejb.79.1634674088878; Tue, 19 Oct 2021 13:08:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634674088; cv=none; d=google.com; s=arc-20160816; b=jizJOPLeXDWcRQfMEh82i9ImV/IXP9B6052MJtd6wQb4+Epz0nwFFcI8WqtOCR6xc4 6oZ9jznlJ9QVTsM+0kdUqDIdykLjqR9pbBSyMUC3XrwZvNDWTp4lTMqKo6L1wqKXwKZU GyANOEhk6JCJVDrY5kn8aGg5IcOWutPwjbuGlPOiQgBuhNCX9yiMvz8gjojWg9WalB97 IOm61uMi1sS85r3W+A8ntvR1UWY0G56D1f394SJ2awSLh4ogkTsNozTcvGwstN9cMPVk ogIazuuQhcagQcKMe/hY3efEteqSx1k0emzCKKykmY+4l8nbVeoOcufwsvzylYs9XxOb DJMA== 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=OJuwtmxpS0dVu0QSLCNxBq3CqaxqLtoYSRoUqyl67fo=; b=YLa03iKacbW6gO5ygd9czodC1ASPkyxqwPB5wOQvZKXTkEINr6vSzPO2D47m7hqWJj PhLjF56LHPhiV92pC4cnP1BujMvhmq/+Lp1F/bwyQstfPskyTh4vz8IRvsvEN5InJFjb 8QSmSQUNJ57t2u8tDFwUNm33cesbev7ge2tWuPx7/sotGplmxAkKn3HEnirWsPdKdIO/ dGVTy/5QU6Vv8NkijLDvxQAuen408JaQPrVhCt4evGPF9BkTIiFWqqVvb6/++fFTk+hG xSZVDZBPDRm0vQN3vuW25EHJ217tTfDBAeUmPT+0v2UY6q2YYF8aJuENFUhIj/Lbi1yB rJ9g== 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 y1si27503017ejk.130.2021.10.19.13.07.44; Tue, 19 Oct 2021 13:08:08 -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 S234054AbhJSUIK (ORCPT + 99 others); Tue, 19 Oct 2021 16:08:10 -0400 Received: from mail-ua1-f52.google.com ([209.85.222.52]:46691 "EHLO mail-ua1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231355AbhJSUIH (ORCPT ); Tue, 19 Oct 2021 16:08:07 -0400 Received: by mail-ua1-f52.google.com with SMTP id u5so2259400uao.13; Tue, 19 Oct 2021 13:05:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OJuwtmxpS0dVu0QSLCNxBq3CqaxqLtoYSRoUqyl67fo=; b=tmeSgCmhPYAoqDRCUb0cP6zJf5uQzfIsxq5XnA1y13HfLdVXlVu+B+Yqxce8I3YGM3 VLTamKipmNeL6jpLeRmNjVOWc7vz4lVmk7mNmftpSgHhADlbH72tjGg9PohEbNgk+Jh1 WYHXGPN3JAMrrRRcGsLiGInwh5X4M97JI8mui93+k7DCDm1NgfVCUoEl4gvwjM9fr0YE h2I8vEUKeCg9BY2x3vaFJK29rfDtzRmKHg6GVLYo1A4HGR3dk3G+qcvvzm53dfDNfocp PO7RMTNoKExDqEgROkqGPt9QLACv351qRDjtBQpymDrMzOrTskV4FMe06X0Z4E4vy+Mx 5s5Q== X-Gm-Message-State: AOAM531ak48J1ZnGp+xRn78CWjBoEjPAOfexuwC8G4dpLAiKROwNTXW8 RQg3EsKo0cO1AT5sjXi4x4nrwOB8iO9epg== X-Received: by 2002:a67:e04c:: with SMTP id n12mr38271362vsl.9.1634673953781; Tue, 19 Oct 2021 13:05:53 -0700 (PDT) Received: from mail-ua1-f43.google.com (mail-ua1-f43.google.com. [209.85.222.43]) by smtp.gmail.com with ESMTPSA id z4sm11913049vsk.15.2021.10.19.13.05.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Oct 2021 13:05:53 -0700 (PDT) Received: by mail-ua1-f43.google.com with SMTP id h19so2335631uax.5; Tue, 19 Oct 2021 13:05:52 -0700 (PDT) X-Received: by 2002:a67:d111:: with SMTP id u17mr38534586vsi.37.1634673952603; Tue, 19 Oct 2021 13:05:52 -0700 (PDT) MIME-Version: 1.0 References: <20211019145719.122751-1-kory.maincent@bootlin.com> <20211019173520.0154a8cb@kmaincent-XPS-13-7390> <20211019175746.11b388ce@windsurf> In-Reply-To: <20211019175746.11b388ce@windsurf> From: Geert Uytterhoeven Date: Tue, 19 Oct 2021 22:05:41 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] net: renesas: Fix rgmii-id delays To: Thomas Petazzoni Cc: Andrew Lunn , =?UTF-8?Q?K=C3=B6ry_Maincent?= , netdev , Linux-Renesas , Linux Kernel Mailing List , Sergey Shtylyov , "David S. Miller" , Jakub Kicinski , Lad Prabhakar , Biju Das , Sergei Shtylyov , Adam Ford , Yoshihiro Shimoda , Yang Yingliang Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, On Tue, Oct 19, 2021 at 5:57 PM Thomas Petazzoni wrote: > On Tue, 19 Oct 2021 17:41:49 +0200 > Andrew Lunn wrote: > > > When people update the kernel version don't they update also the devicetree? > > > > DT is ABI. Driver writers should not break old blobs running on new > > kernels. Often the DT blob is updated with the kernel, but it is not > > required. It could be stored in a hard to reach place, shared with > > u-boot etc. > > Right, but conversely if someone reads the DT bindings that exists > today, specifies phy-mode = "rgmii-rxid" or phy-mmode = "rmgii-txid", Today == v5.10-rc1 and later? > this person will get incorrect behavior. Sure a behavior that is > backward compatible with older DTs, but a terribly wrong one when you > write a new DT and read the DT binding documentation. This is exactly > the problem that happened to us. If you write a new DT, you read the DT binding documentation, and "make dtbs_check" will inform you politely if you use the legacy/wrong DT (i.e. lacking "[rt]x-internal-delay-ps")? > I know that those properties are considered obsolete, but even though > they are considered as such, they are still supported, but for this > particular MAC driver, with an inverted meaning compared to what the DT > binding documentation says. > > What wins: DT ABI backward compatibility, or correctness of the DT > binding ? :-) Both ;-) The current driver is backwards-compatible with the legacy/wrong DTB. The current DT bindings (as of v5.10-rc1), using "[rt]x-internal-delay-ps" are correct. Or am I missing something here? BTW, it's still not clear to me why the inversion would be needed. Cfr. Andrew's comment: | So with rgmii-rxid, what is actually passed to the PHY? Is your | problem you get twice the delay in one direction, and no delay in the | other? We know the ravb driver misbehaved in the past by applying the rgmii-*id values to the MAC, while they are meant for the PHY, thus causing bad interaction with PHY drivers. But that was fixed by commit 9b23203c32ee02cd ("ravb: Mask PHY mode to avoid inserting delays twice") and a6f51f2efa742df0 ("ravb: Add support for explicit internal clock delay configuration"). Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds