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 39460C282C3 for ; Thu, 24 Jan 2019 19:51:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D5F1521726 for ; Thu, 24 Jan 2019 19:51:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nic.cz header.i=@nic.cz header.b="IMvjc1Sq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733050AbfAXTjV (ORCPT ); Thu, 24 Jan 2019 14:39:21 -0500 Received: from mail.nic.cz ([217.31.204.67]:36550 "EHLO mail.nic.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733034AbfAXTjU (ORCPT ); Thu, 24 Jan 2019 14:39:20 -0500 Received: from localhost (unknown [172.20.6.218]) by mail.nic.cz (Postfix) with ESMTPS id E7577600E2; Thu, 24 Jan 2019 20:39:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1548358758; bh=EpON0NkC7nzhQ5TPdegMhy69xCSfFGKC/RTKGvA6UZk=; h=Date:From:To; b=IMvjc1SqbueqbnJ9ZMxfPv5P7W3aYyB2M2Uo+yJQHbLdzhBGPf55batBhxhE537sY TE4a53lFq1kQn9Ilvep6pLnygR5u//znSJefGHWKaO7sJjdOsYHDjTv5bBFvYN6fbf kwSH3/jOz4IUZKJQ+2srS/Yxb78gUtx/Pcbz+g2U= Date: Thu, 24 Jan 2019 20:39:05 +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: <20190124203905.2c79602e@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 :) Can't then this patch be applied so that Turris Mox will work again? At least till the cpu/dsa port connection is converted to phylink. Marek