Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp582332pxb; Tue, 19 Oct 2021 08:49:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTJtNmx2n/tBw3GdPB4cwHM54FiP8BYbytVnnCPK35r/pPnFjJKv6AYAE5f9M6hrAEAjff X-Received: by 2002:a62:ed01:0:b0:44d:6aa6:30eb with SMTP id u1-20020a62ed01000000b0044d6aa630ebmr615823pfh.53.1634658566632; Tue, 19 Oct 2021 08:49:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634658566; cv=none; d=google.com; s=arc-20160816; b=mkGnLfis52Ck7BEtVv+U2lLaRrag/4tQ/RTYW2PJk9x7tftteGml6yW2YzJ/bSQsSj 437rQFxzjAzqlWzp82Q24tqg1R17fyBISo03tKvEmXuuT/pQ508L0gHUeGY8QCvrzX/A GsdjneR255Ck3n/xT1yQedHsN0duxkX8/yJ6kOCqf+seAAtgQiShaz9zcvDk0YzsKOZn 4fed/Jyog/yVPuO8jK0UGZaSczTHfdOlRnU4fhAT5h5qPUdQaFlMOwT1VM0VEp9eEnYd dUROVaRRVJmZmHpol5fZmjCq4DSFD7uP4AiCuTIey0OV+T3a7K34Z4ImcA7S/x1XpF9t sfrA== 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=eCMIR821Ir/fH4hzT4BkFjEc5OrliT5YIEJJG4FQBlc=; b=VUtmFAlFYgSNC93JYE5gNHvzDvVS8koNMLw3V8TtfHdh7y54zMEC1q5ea8a6ofrqdh rT6XT8mx0IAECZ3Fc2+DhQ+TJAgNnbxihnSdGdcG+7iLgVdYNdBXLQA8IZrUhoTz8Ffz zOvDV0BNhPCTBSYJQoCUArO8Okc+NOlm0QN8bVPFFsbxiCGbMIDp0Nx4MOvm6JZasCVR WCUJjn7bxNEoKDkbl4uuhHwF0970Qs9ajbMhmTXvX7LWLbxZTqBt3V0gmWDiPWhQ93Y7 b9AASLGpPV0wwpELeqXGgPvb4xyNwURCa+f2pDU0SpRZj0ZvqWrNKTzOX5uWMf651+gQ 9KoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=aXSnLUoj; 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 y16si26631734pgl.251.2021.10.19.08.49.12; Tue, 19 Oct 2021 08:49:26 -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=aXSnLUoj; 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 S232221AbhJSPto (ORCPT + 99 others); Tue, 19 Oct 2021 11:49:44 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:46932 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229774AbhJSPtn (ORCPT ); Tue, 19 Oct 2021 11:49:43 -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=eCMIR821Ir/fH4hzT4BkFjEc5OrliT5YIEJJG4FQBlc=; b=aXSnLUojGURbEtjpD0kfWiISRg 7Vcz4+8voOrPpNW9UXPDv+5uuHP2+VwpPur02txJFiIhsZLrsFCwsJJ7tb25o+MomcBQOFg2qt0pn ucqs55BZ4vavl2aGFbzjy3Bbejx2YKsslMtqP65nwPRoOk4o5rRpZ15l5+vnEJ8YZynI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1mcrKq-00B5j3-9Y; Tue, 19 Oct 2021 17:47:28 +0200 Date: Tue, 19 Oct 2021 17:47:28 +0200 From: Andrew Lunn To: Kory Maincent Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Sergey Shtylyov , "David S. Miller" , Jakub Kicinski , Lad Prabhakar , Biju Das , Sergei Shtylyov , Adam Ford , Yoshihiro Shimoda , Geert Uytterhoeven , Yang Yingliang Subject: Re: [PATCH] net: renesas: Fix rgmii-id delays Message-ID: References: <20211019145719.122751-1-kory.maincent@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211019145719.122751-1-kory.maincent@bootlin.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 19, 2021 at 04:57:17PM +0200, Kory Maincent wrote: > Invert the configuration of the RGMII delay selected by RGMII_RXID and > RGMII_TXID. > > The ravb MAC is adding RX delay if RGMII_RXID is selected and TX delay > if RGMII_TXID but that behavior is wrong. > Indeed according to the ethernet.txt documentation the ravb configuration > should be inverted: > * "rgmii-rxid" (RGMII with internal RX delay provided by the PHY, the MAC > should not add an RX delay in this case) > * "rgmii-txid" (RGMII with internal TX delay provided by the PHY, the MAC > should not add an TX delay in this case) > > This patch inverts the behavior, i.e adds TX delay when RGMII_RXID is > selected and RX delay when RGMII_TXID is selected. This gets messy. As a general rule of thumb, the MAC should not be adding delays, the PHY should. ravb has historically ignored that, and it adds delays. It then needs to be careful with what it passes to the PHY. 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? Andrew