lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190215152356.GP708@lunn.ch>
Date:   Fri, 15 Feb 2019 16:23:56 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Michal Vokáč <michal.vokac@...ft.com>
Cc:     Vinod Koul <vkoul@...nel.org>,
        "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Florian Fainelli <f.fainelli@...il.com>
Subject: Re: [RFC] net: dsa: qca8k: implement rgmii-id mode

On Fri, Feb 15, 2019 at 04:01:08PM +0100, Michal Vokáč wrote:
> Hi,
> 
> networking on my boards [1], which are currently in linux-next, suddently
> stopped working. I tracked it down to this commit 5ecdd77c61c8 ("net: dsa:
> qca8k: disable delay for RGMII mode") [2].
> 
> So I think the rgmii-id mode is obviously needed in my case.
> I was able to find a couple drivers that read tx/rx-delay or
> tx/rx-internal-delay from device tree. Namely:
> 
>   drivers/net/ethernet/apm/xgene/xgene_enet_main.c
>   drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
>   drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
>   drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
>   drivers/net/phy/dp83867.c
> 
> I would appreciate any hints how to add similar function to qca8k driver
> if that is the correct way to go. Can I take some of the above mentioned
> drivers as a good example for that? How should the binding look like?
> 
> I would expect something like this:
> 
> 	switch@0 {
> 		compatible = "qca,qca8334";
> 		reg = <0>;
> 
> 		switch_ports: ports {
> 			#address-cells = <1>;
> 			#size-cells = <0>;
> 
> 			ethphy0: port@0 {
> 				reg = <0>;
> 				label = "cpu";
> 				phy-mode = "rgmii-id";
> 				qca,tx-delay = <3>;
> 				qca,rx-delay = <3>;
> 				ethernet = <&fec>;
> 		};

Hi Michal

Your submission used:

+				ethphy0: port@0 {
+					reg = <0>;
+					label = "cpu";
+					phy-mode = "rgmii";
+					ethernet = <&fec>;
+
+					fixed-link {
+						speed = <1000>;
+						full-duplex;
+					};
+				};

This is good. If you have a fixed-link you can pass a phy-mode.

The comment that was removed was:

-               /* According to the datasheet, RGMII delay is enabled through
-                * PORT5_PAD_CTRL for all ports, rather than individual port
-                * registers
-                */

Is it possible to enable delays per port? Ideally, you want to enable
delays for just selected ports. Add another case for
PHY_INTERFACE_MODE_RGMII_ID to enable the delays.

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ