Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3547903img; Mon, 25 Mar 2019 12:32:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWy27+C0sBmAmVs1AECw4wfNC9SDx8cvYl+lODQBmyJyixTpk4mkFu5AeIZuAVSlzmpmEG X-Received: by 2002:a62:305:: with SMTP id 5mr4178546pfd.65.1553542357121; Mon, 25 Mar 2019 12:32:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553542357; cv=none; d=google.com; s=arc-20160816; b=XL1gYA1Z+XOOver2tUFBiAWX5jvvGnf5m4g4tA/7i9EVwKJIAB1W+x5jAoo6ZXQ/3I lBHFTmCAEdl6ATJl3YIQQsI7c/l+nxAvLgK5RhLI44bmnYFqkwRoBcwPkoizXHlYodLk Iy8hUypfX0oc2LweSQcXJSRtxcVdy3x0MpqVStgFC2lLwbQZnsK+reM2UuTLOxAzWkdy JV6hdTheIlIJvNs11oO4/wYIM6mhx/RBUTIfwxiMmeZcegLQojG2tvVbgpDhxhlPEVNx d/AurxrVLvPpATe35yU6C6yDFryMmW0qqWTvxJZ5+NCRqdMqmb41/FegHpmIJJcHIPMr HdAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=M8c/QJQtdRxUxcbMD5p9cpFH3j+LpmDPT4vEZCalRwg=; b=lPUuyQ6Qy/MSyDpXlvG+FS6CltjR6ADfBpCxwp1I+DbKyqMRkDRMZZFPQ37BJqc86P qldgAqI6DIKmeIU2SWNzsn+uOFBPyTdzgCAvBtchs6tfRdVxmsjU35N27U4HlRiBk/Oc 3bq15Ni7TA8+LmxnVuFIUKHQjCh5U6e1b/K1S50Vmf52LdfcYfSgU48IGymDU7ZZThKB /SbwyCvEX4MylbUWJhXjislENvwR2ctT7P+e0DJ6oXfDmS7+2feeo3qwYimnSX8eeG6/ /iM+0PBmu5GUMHPiHXu2b7zsweJpNsDPwUkDep5hK0h1a8I7uHHZjs3mI8KWJiTfxa9I CLag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gn6si3915609plb.167.2019.03.25.12.32.20; Mon, 25 Mar 2019 12:32:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=iki.fi Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730209AbfCYTaM (ORCPT + 99 others); Mon, 25 Mar 2019 15:30:12 -0400 Received: from emh03.mail.saunalahti.fi ([62.142.5.109]:34238 "EHLO emh03.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730149AbfCYTaL (ORCPT ); Mon, 25 Mar 2019 15:30:11 -0400 Received: from darkstar.musicnaut.iki.fi (85-76-115-194-nat.elisa-mobile.fi [85.76.115.194]) by emh03.mail.saunalahti.fi (Postfix) with ESMTP id 6A9CC40057; Mon, 25 Mar 2019 21:30:06 +0200 (EET) Date: Mon, 25 Mar 2019 21:30:06 +0200 From: Aaro Koskinen To: Andrew Lunn Cc: Vinod Koul , "David S. Miller" , netdev@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [BISECTED, REGRESSION] Broken networking on MIPS/OCTEON EdgeRouter Lite Message-ID: <20190325193006.GA16484@darkstar.musicnaut.iki.fi> References: <20190322002125.GD7872@darkstar.musicnaut.iki.fi> <20190322064506.GB5348@vkoul-mobl> <20190322205059.GA29013@darkstar.musicnaut.iki.fi> <20190322212557.GF16623@lunn.ch> <20190322214120.GB29013@darkstar.musicnaut.iki.fi> <20190324201734.GC7782@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190324201734.GC7782@lunn.ch> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Sun, Mar 24, 2019 at 09:17:34PM +0100, Andrew Lunn wrote: > On Fri, Mar 22, 2019 at 11:41:20PM +0200, Aaro Koskinen wrote: > > On Fri, Mar 22, 2019 at 10:25:57PM +0100, Andrew Lunn wrote: > > > > The OCTEON HW code knows only about RGMII. And looking at > > > > octeon ethernet staging driver it does phy connect always with > > > > PHY_INTERFACE_MODE_GMII. I did some experimentation, and it seems that > > > > with PHY_INTERFACE_MODE_RGMII_RXID it starts to work.. In the DT we have > > > > for ethernet for this board: > > > > > > > > rx-delay = <0>; > > > > tx-delay = <0x10>; > > > > > > These are not PHY properties. > > > > > > Looking at the code, it looks like these control delays the MAC > > > inserts. I don't see a binding document for these properties, so i've > > > no idea what 0x10 means. Before this driver moves out of staging, > > > these values should be changed to be in ns. > > > > Documentation/devicetree/bindings/net/cavium-pip.txt > > Hi Aaro > > Ah, sorry, missed that. > > - rx-delay: Delay value for RGMII receive clock. Optional. Disabled if 0. > Value range is 1-31, and mapping to the actual delay varies depending on HW. > > - tx-delay: Delay value for RGMII transmit clock. Optional. Disabled if 0. > Value range is 1-31, and mapping to the actual delay varies depending on HW. > > I'm surprised this made it passed review. We try to avoid having DT > poke magic values into registers. That is what this appears to be, > since it is unclear what the value actually means. It's probably not too late to improve this since those are likely used only in-tree. Vendor GPL bundles provide some more documentation for this setting, as does the FreeBSD source tree: https://github.com/freebsd/freebsd/blob/master/sys/contrib/octeon-sdk/cvmx-asxx-defs.h#L911 But reading that, I think it could be still difficult to change it to rx-delay-ps as it seems to be too coarse/unreliable. > It is also good to state what happens if the property is not > present. It often means it defaults to zero. But this implementation > just leaves the value alone. So to be on the safe side, the DT blob > should probably have these properties, so the behaviour is well > defined. The default is to set both to 16 on CN50XX and 24 on other chips. A.