Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2927191pxu; Sun, 29 Nov 2020 09:12:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxeLI4XwRMVlWaxt6OgBY0FcU8pJQMr95pF2Qjc3iiG+fc0lUNtybWN1Rje0GesKCjbrgbh X-Received: by 2002:a17:906:4d8d:: with SMTP id s13mr9473495eju.305.1606669925875; Sun, 29 Nov 2020 09:12:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606669925; cv=none; d=google.com; s=arc-20160816; b=BM3P2l0aUx6nvWeqWqhJJ+JHWR3iDDtKk0xPkGUT19E9ih3VhuaWcbbAn5+MKI62G5 Fh/cgQa75DiG4CxirfSVroT36cGKQpyZbdb0CehzbqQaKgr+qV05do4n0rbLgdvKVZMG WaYvfa4vE+lQAcNI6gN/tI5ZAdpICb/1iWxDXWCKPNJ8ubvvH4R4xAf/pjcLP0/ktLF8 /2RA0Q0WZmKPluiHWBBmKIyGtokMed9A1a1mLCf8yjfUH2JiHxxWSyl3A4/hTKYQmphq SPBmY3edqZj8/HFK2D9CgzxFVvx7ItDIMBKYMOk8I/qQvXQVWE7+BIBcuZR8/ibMayU6 a90g== 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; bh=B6/Itvduxim5CKuaAim34D2B2uq6aEcCjT5ny7GfnbQ=; b=GlGkDflu9YpkQ9Gr1kSAMZ42Do1jQuGcmpnrpBRe9XlYnv23hrqteQ6INOzdey6M12 cGzao9FcS8RSgQhtOP4n/JuxupssEjeXHWnSmS0+b1XS0pf8y2lSv4+b5bz3dzIj2JEg 6zkrmNHfYsZkoCfyU3jPh14B4LhvWg2W3iYqb5Hq3ZyYZEQ406oRMmpZzvX0QBY63MRd jRZcZFtmAtq1+HyJ5u2xYKVrEgedFKjWJLc05yq3RiupjmR0lOHNZPAjWozLyRCk16UQ WiQnpmSp9kgdgZiT/5wHYzexeK85LN0Kq3GH4jU7LzDAaX6DIJhdzQ5E3s1YqljD4YWg S63w== ARC-Authentication-Results: i=1; mx.google.com; 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 h1si374847ejx.358.2020.11.29.09.11.27; Sun, 29 Nov 2020 09:12:05 -0800 (PST) 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; 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 S1727556AbgK2RIG (ORCPT + 99 others); Sun, 29 Nov 2020 12:08:06 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:55484 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725830AbgK2RIF (ORCPT ); Sun, 29 Nov 2020 12:08:05 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kjQAU-009NIn-Bf; Sun, 29 Nov 2020 18:07:22 +0100 Date: Sun, 29 Nov 2020 18:07:22 +0100 From: Andrew Lunn To: Jean Pihet Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ryan Barnett , Conrad Ratschan , Hugo Cornelis , Arnout Vandecappelle Subject: Re: [PATCH 2/2] net: dsa: ksz8795: adjust CPU link to host interface Message-ID: <20201129170722.GC2234159@lunn.ch> References: <20201129102400.157786-1-jean.pihet@newoldbits.com> <20201129102400.157786-2-jean.pihet@newoldbits.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201129102400.157786-2-jean.pihet@newoldbits.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 29, 2020 at 11:24:00AM +0100, Jean Pihet wrote: > Add support for RGMII in 100 and 1000 Mbps. > > Adjust the CPU port based on the host interface settings: interface > MII type, speed, duplex. Please could you add some extra information here why this is needed. I suspect you have back to back PHYs on the CPU port? > +void ksz8795_adjust_link(struct dsa_switch *ds, int port, > + struct phy_device *phydev) > +{ > + struct ksz_device *dev = ds->priv; > + struct ksz_port *p = &dev->ports[port]; > + > + /* Adjust the link interface mode and speed for the CPU port */ > + if (port == dev->cpu_port) dsa_is_cpu_port(ds, port) Andrew