Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4566514pxu; Tue, 20 Oct 2020 22:44:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzETen9x4dW/qdQKOHR4nAmHEffNUJXrNozHBRGdNTIG8wy85qZJl0wRyqNWp1klIo832DX X-Received: by 2002:a17:906:3799:: with SMTP id n25mr1748956ejc.6.1603259076669; Tue, 20 Oct 2020 22:44:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603259076; cv=none; d=google.com; s=arc-20160816; b=dCi87+QaQ8V+RX0SmdGG9CJZ6w4AZ+NlAZvRvigkCLmPoGCU15lJwoswhYLjbP5H69 GUp57gAvsZXoi/Md85t8bcfxQPZEaHeQVnE884Q2zoatmfJ58arJWUn/d6tEs+eqScHm AImMCpS4r6C5tLzlFnsHeWJ1eVCQUKoLsey9nYDSdMgBa22B0sEMi/bFzZ0syO1R2h7X GkKsyziOfnAUydwAvEB8Cnub0Jj6EqKkJLK/NDemz0yhoBxaW3jlYRv8TCplVhtkKaIB Jte63OpRbmRkhcn7wMHpc5WXJh4PRrSO6+sXBUMqWYNJwdpzkWl3CV0inSu7LfvLFCCP XXqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=OkaQ4lW0B5R4htz5ogsFapaGTjw0y0Sqs6ZEyCSleWU=; b=CSgPIYxbUZBpGnXjuNNwhdpJ733i1zrgi2rijGlVkufglcyR2/KejvFzJii2fuMDu6 0mt10WrrQRrb3PrauQfNcy8pRJM75kqzjmG7gsU0YZ4j53pH9LIf3XE/UJ+eQqwtaSsb rQGe+2AeW2ocC9i35u0aQq/rOXQ2WCndU/aXDouv8UfVGg3iwGZZbcTacDCe8LcS/EOz zcCqLY/qvV0E/cErAQCAAVHTvms1HXVNUOiYQaF1+CT2AXNncIF8JY4d/qW7s2fj/lxr ZcS3IlGRxm2oIjQU/+sT1/cpTZFVuOk4dF3uWtzdGAK8hGhK2EEXkZf0LSjX/d7aJ/jB VNNw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nic.cz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qx28si581607ejb.306.2020.10.20.22.44.13; Tue, 20 Oct 2020 22:44:36 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nic.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408429AbgJTOvV (ORCPT + 99 others); Tue, 20 Oct 2020 10:51:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408395AbgJTOvV (ORCPT ); Tue, 20 Oct 2020 10:51:21 -0400 Received: from mail.nic.cz (lists.nic.cz [IPv6:2001:1488:800:400::400]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51FBCC061755; Tue, 20 Oct 2020 07:51:21 -0700 (PDT) Received: from localhost (unknown [IPv6:2a0e:b107:ae1:0:3e97:eff:fe61:c680]) by mail.nic.cz (Postfix) with ESMTPSA id C12121406A6; Tue, 20 Oct 2020 16:51:17 +0200 (CEST) Date: Tue, 20 Oct 2020 16:51:15 +0200 From: Marek Behun To: Russell King - ARM Linux admin Cc: Andrew Lunn , Chris Packham , vivien.didelot@gmail.com, f.fainelli@gmail.com, olteanv@gmail.com, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/3] net: dsa: mv88e6xxx: Don't force link when using in-band-status Message-ID: <20201020165115.3ecfd601@nic.cz> In-Reply-To: <20201020141525.GD1551@shell.armlinux.org.uk> References: <20201020034558.19438-1-chris.packham@alliedtelesis.co.nz> <20201020034558.19438-2-chris.packham@alliedtelesis.co.nz> <20201020101552.GB1551@shell.armlinux.org.uk> <20201020154940.60357b6c@nic.cz> <20201020140535.GE139700@lunn.ch> <20201020141525.GD1551@shell.armlinux.org.uk> X-Mailer: Claws Mail 3.17.6 (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-Spam-Status: No, score=-100.0 required=5.9 tests=SHORTCIRCUIT, USER_IN_WELCOMELIST,USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.nic.cz X-Virus-Scanned: clamav-milter 0.102.2 at mail X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 20 Oct 2020 15:15:25 +0100 Russell King - ARM Linux admin wrote: > On Tue, Oct 20, 2020 at 04:05:35PM +0200, Andrew Lunn wrote: > > On Tue, Oct 20, 2020 at 03:49:40PM +0200, Marek Behun wrote: > > > On Tue, 20 Oct 2020 11:15:52 +0100 > > > Russell King - ARM Linux admin wrote: > > > > > > > On Tue, Oct 20, 2020 at 04:45:56PM +1300, Chris Packham wrote: > > > > > When a port is configured with 'managed = "in-band-status"' don't force > > > > > the link up, the switch MAC will detect the link status correctly. > > > > > > > > > > Signed-off-by: Chris Packham > > > > > Reviewed-by: Andrew Lunn > > > > > > > > I thought we had issues with the 88E6390 where the PCS does not > > > > update the MAC with its results. Isn't this going to break the > > > > 6390? Andrew? > > > > > > > > > > Russell, I tested this patch on Turris MOX with 6390 on port 9 (cpu > > > port) which is configured in devicetree as 2500base-x, in-band-status, > > > and it works... > > > > > > Or will this break on user ports? > > > > User ports is what needs testing, ideally with an SFP. > > > > There used to be explicit code which when the SERDES reported link up, > > the MAC was configured in software with the correct speed etc. With > > the move to pcs APIs, it is less obvious how this works now, does it > > still software configure the MAC, or do we have the right magic so > > that the hardware updates itself. > > It's still there. The speed/duplex etc are read from the serdes PHY > via mv88e6390_serdes_pcs_get_state(). When the link comes up, we > pass the negotiated link parameters read from there to the link_up() > functions. For ports where mv88e6xxx_port_ppu_updates() returns false > (no external PHY) we update the port's speed and duplex setting and > (currently, before this patch) force the link up. > > That was the behaviour before I converted the code, the one that you > referred to. I had assumed the code was correct, and _none_ of the > speed, duplex, nor link state was propagated from the serdes PCS to > the port on the 88E6390 - hence why the code you refer to existed. > Russell, you are right. SFP on 88E6390 does not work with this patch applied. So this patch breaks 88E6390. Marek