From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71F11C282C6 for ; Thu, 24 Jan 2019 19:54:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 41BC321726 for ; Thu, 24 Jan 2019 19:54:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nic.cz header.i=@nic.cz header.b="gPvlXxLW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732425AbfAXTyY (ORCPT ); Thu, 24 Jan 2019 14:54:24 -0500 Received: from mail.nic.cz ([217.31.204.67]:36397 "EHLO mail.nic.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732096AbfAXTh3 (ORCPT ); Thu, 24 Jan 2019 14:37:29 -0500 Received: from localhost (unknown [172.20.6.218]) by mail.nic.cz (Postfix) with ESMTPS id 58B1D600E2; Thu, 24 Jan 2019 20:37:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1548358647; bh=HL5b0fpJQ/311cv7WOVNXBMI0gTpysfdDl26yUi3W3U=; h=Date:From:To; b=gPvlXxLW/tg7D22LWZHZCBei9voMUuTtKMQtUgViSzx9Lbg+DHFMDt8not4bNe3gp fkHVqg/5SJNP9ihgYsx5qPS5s45F49nS/asL+BurWcJfIELiioICGA1poDsvQ0LsB7 nGJbOQWtYFD+rXTf5wiO/DkfnhthCrTD7ODV0iEE= Date: Thu, 24 Jan 2019 20:37:14 +0100 From: Marek Behun To: Florian Fainelli Cc: Andrew Lunn , netdev@vger.kernel.org, David Miller Subject: Re: [PATCH net-next v1 1/2] net: dsa: mv88e6xxx: Default CMODE to 1000BaseX only on 6390X Message-ID: <20190124203714.19e07cbb@nic.cz> In-Reply-To: <3c81ed78-4f0e-37b1-710c-6d96c3e76577@gmail.com> References: <20190124154309.24987-1-marek.behun@nic.cz> <20190124161147.GG482@lunn.ch> <20190124172916.66e15b29@nic.cz> <20190124164805.GJ482@lunn.ch> <20190124190451.40af3127@nic.cz> <20190124181159.GL482@lunn.ch> <20190124202403.0d15ec6f@nic.cz> <3c81ed78-4f0e-37b1-710c-6d96c3e76577@gmail.com> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.99.2 at mail X-Virus-Status: Clean Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 24 Jan 2019 11:27:54 -0800 Florian Fainelli wrote: > On 1/24/19 11:24 AM, Marek Behun wrote: > > On Thu, 24 Jan 2019 19:11:59 +0100 > > Andrew Lunn wrote: > > > >> On Thu, Jan 24, 2019 at 07:04:51PM +0100, Marek Behun wrote: > >>> What properties does the cpu port node need to contain to force > >>> it? phy-mode = "2500base-x"; is not enough. > >> > >> Hi Marek > >> > >> For DSA ports we have: > >> > >> phy-mode = > >> "rgmii-txid"; fixed-link { > >> speed = > >> <1000>; full-duplex; > >> }; > >> > >> See dsa_port_fixed_link_register_of() > >> > >> Andrew > > > > Hi Andrew, > > the configuration > > phy-mode = "2500base-x"; > > fixed-link { > > speed = <2500>; > > full-duplex; > > }; > > does not work, because swphy does not support speed=2500 (only 10, > > 100 and 1000). > > managed = "in-band-status"; > > does not work either. > > > > If I use speed = <1000>, then the swphy is created correctly, cmode > > is set correctly to 2500base-x, but speed register on the port is > > set to 1000, and the connection does not work. > > > > The easiest way would probably be to implement swphy to support > > speed 2500. But I don't know what values should the simulated PHY > > registers contain... > > > > The function dsa_port_fixed_link_register_of creates this phy > > device, adjusts the link and then calls > > put_device(&phydev->mdio.dev); Does this mean that the phy device > > is immediately destroyed? > > Yes, we should actually migrate that code over to PHYLINK, because in > PHYLINK the fixed links don't require creating a phy_device instance. > This is something that has a potential of breaking a lot of people, > so I have not really started doing it just yet :) phylink_create requires a net_device as first argument. what should be the device for cpu/dsa ports? Marek