Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1441142pxb; Wed, 20 Oct 2021 05:18:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDW7J6k8luDQHzQzLVDx9Hi2Y9HeOFRU7IgbNU9DPbIqq+HTJiJgxX0YQfsN1IolLfjOGh X-Received: by 2002:a17:902:e812:b0:13f:3be8:b15a with SMTP id u18-20020a170902e81200b0013f3be8b15amr38165727plg.49.1634732307493; Wed, 20 Oct 2021 05:18:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634732307; cv=none; d=google.com; s=arc-20160816; b=pRDkiSLR7qMt03dAxwOGbrgVmVB5WbM1KTZv6axLy7uAqs46o3Lr4YcBHdP8d5tKfm OU5gUJPhd/41TqhG0DhM5PhJANm72rP2AbM6beCY+h4kPYpG7sUj7smUng5GrK7cxJy/ S0P1+CeGm/iGA+UZ/7LzQy4CGDudpMe4iL3SZZZmwX1V4jAFabX3d4ub+5Sie+q4af63 jNqctRZp5OWQvkoMEcWj1FU4Mv8UVKczstqaBrRwiMkU9ZVhfgacXGJv+ANrZP6tB+dK qKt3qpBipB3vKDAdBL+Cp6go6cKvc8xUiPBrlm7OHcZgQCaRigy8Hd+vePRHwShICJDn WyqQ== 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:dkim-signature; bh=32GYkFGawk1EHwubKe3VWlQKW04GyjW6olYclX1Tk34=; b=QDQc7J9cniOLzRCwdz2sZJux4IgQq2YMz8Bs6X71a1NCfOJ6INaxm6aLmuFJMRqopQ Axzlk7GwkfBUG2k1ZeVMZfs6rjh2kf2Bg5sksA6Mgv61KdISIRX84ReNYNnck+A9sEOe 5MflfWkmUZ6QEs3Dr2VvEjtc0fUKRmzrtCZ06B2aExsJw6hGzhyWORNtrqaQ2qosvjfM e0+bQPZ4/Rk+m57BDR6pi55peabApugFkO0ilRFnXu/cUo6CdWMc8SwP3nUWTgS3IEl+ sSilk9+rgB2BGCjaEbmhpTHG9ZItiGUl6F0ZZbbLjq4EWRXNhTrvx7iItTAis5jvHDIB CE7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=RtVOIeZ3; 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 q89si2457172pjk.127.2021.10.20.05.18.13; Wed, 20 Oct 2021 05:18:27 -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; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=RtVOIeZ3; 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 S230234AbhJTMTR (ORCPT + 99 others); Wed, 20 Oct 2021 08:19:17 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:48550 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230205AbhJTMTQ (ORCPT ); Wed, 20 Oct 2021 08:19:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=32GYkFGawk1EHwubKe3VWlQKW04GyjW6olYclX1Tk34=; b=RtVOIeZ3PSCRdaK6EFw6Mufldc FCR2wMQvAml1Qlq2OYjJgctYcQ5iMmh7GJmitlPzROfHxV7aBjd2hV9GNCMR/KxBQjSp8DlhClDvf +zi4IBK2/Lm4fk0gkMzLfzztsOGGqA+xRx/ioUUkN7cB284Gh0EsuFEEADsUCUpI7oNM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mdAWd-00BBMp-US; Wed, 20 Oct 2021 14:16:55 +0200 Date: Wed, 20 Oct 2021 14:16:55 +0200 From: Andrew Lunn To: =?iso-8859-1?Q?K=F6ry?= Maincent Cc: Geert Uytterhoeven , Thomas Petazzoni , 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 Subject: Re: [PATCH] net: renesas: Fix rgmii-id delays Message-ID: References: <20211019145719.122751-1-kory.maincent@bootlin.com> <20211019173520.0154a8cb@kmaincent-XPS-13-7390> <20211019175746.11b388ce@windsurf> <20211020105328.411a712f@kmaincent-XPS-13-7390> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211020105328.411a712f@kmaincent-XPS-13-7390> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > 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? > > Yes, it was the problem I got. > The PHY I use have RX delay enabled by default, currently the PHY driver does > not support delay configuration, therefore I let the MAC handle TX delay. I > have stumbling over that legacy/wrong DTS on the old Kernel. This is where we get into the horrible mess of RGMII delays. The real solution is to fix the PHY driver. If it is asked to do rgmii, but is actually doing rgmii-id, the PHY driver is broken. It either should do what it is told, or return -EINVAL/-EOPNOTSUPP etc to indicate it does not support what it is asked to do. But fixing things like this often breaks working systems, because the DT says rgmii, the PHY actually does rgmii-id, the board works, until the PHY is fixed to do what it is told, and all the bugs in the DT suddenly come to light. Now, you said you are using an old kernel. So it could be we have already fixed this, and had the pain of fixing broken DT. Please look at the current kernel PHY driver, and see if all you need to do is back port some PHY fixes, or better still, throw away your old kernel and use a modern one. Andrew