Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935834AbcKDP3O (ORCPT ); Fri, 4 Nov 2016 11:29:14 -0400 Received: from smtpoutz29.laposte.net ([194.117.213.104]:50496 "EHLO smtp.laposte.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935294AbcKDP3N (ORCPT ); Fri, 4 Nov 2016 11:29:13 -0400 Subject: Re: [PATCH 1/2] net: ethernet: nb8800: Do not apply TX delay at MAC level To: Andrew Lunn References: <581CA300.1060609@laposte.net> <20161104151151.GF3600@lunn.ch> Cc: =?UTF-8?B?TcOlbnMgUnVsbGfDpXJk?= , "David S. Miller" , netdev , LKML , Mason From: Sebastian Frias Message-ID: <581CA945.70601@laposte.net> Date: Fri, 4 Nov 2016 16:29:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20161104151151.GF3600@lunn.ch> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-VR-SrcIP: 92.154.11.170 X-VR-FullState: 0 X-VR-Score: -100 X-VR-Cause-1: gggruggvucftvghtrhhoucdtuddrfeelvddrkeelgdejlecutefuodetggdotefrodftvfcurfhrohhf X-VR-Cause-2: ihhlvgemucfntefrqffuvffgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhs X-VR-Cause-3: ucdlqddutddtmdenucfjughrpefuvfhfhffkffgfgggjtgfgsehtjegrtddtfeehnecuhfhrohhmpefu X-VR-Cause-4: vggsrghsthhirghnucfhrhhirghsuceoshhfkeegsehlrghpohhsthgvrdhnvghtqeenucfkphepledv X-VR-Cause-5: rdduheegrdduuddrudejtdenucfrrghrrghmpehmohguvgepshhmthhpohhuthdphhgvlhhopegludej X-VR-Cause-6: vddrvdejrddtrddvudegngdpihhnvghtpeelvddrudehgedruddurddujedtpdhmrghilhhfrhhomhep X-VR-Cause-7: shhfkeegsehlrghpohhsthgvrdhnvghtpdhrtghpthhtoheprghnughrvgifsehluhhnnhdrtghh X-VR-AvState: No X-VR-State: 0 X-VR-State: 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1659 Lines: 50 Hi Andrew, On 11/04/2016 04:11 PM, Andrew Lunn wrote: > On Fri, Nov 04, 2016 at 04:02:24PM +0100, Sebastian Frias wrote: >> The delay can be applied at PHY or MAC level, but since >> PHY drivers will apply the delay at PHY level when using >> one of the "internal delay" declinations of RGMII mode >> (like PHY_INTERFACE_MODE_RGMII_TXID), applying it again >> at MAC level causes issues. >> >> Signed-off-by: Sebastian Frias >> --- >> drivers/net/ethernet/aurora/nb8800.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c >> index b59aa35..d2855c9 100644 >> --- a/drivers/net/ethernet/aurora/nb8800.c >> +++ b/drivers/net/ethernet/aurora/nb8800.c >> @@ -1282,7 +1282,7 @@ static int nb8800_tangox_init(struct net_device *dev) >> break; >> >> case PHY_INTERFACE_MODE_RGMII_TXID: >> - pad_mode = PAD_MODE_RGMII | PAD_MODE_GTX_CLK_DELAY; >> + pad_mode = PAD_MODE_RGMII; >> break; > > How many boards use this Ethernet driver? How many boards are your > potentially breaking, because they need this delay? > This part is specific to the Tango architecture, as noted by the function name "nb8800_tangox_init". Also the register used here is Sigma-specific (i.e.: not related to the Aurora VLSI MAC, "au-nb8800") The thing is that without this patch if we set phy-connection-type="rgmii-txid" on the DT, then both, the PHY and the MAC, will apply the delay. Best regards, Sebastian > I guess it is a small number, because doesn't it require the PHY is > also broken, not adding a delay when it should? > > Andrew >