Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1733956pxu; Tue, 24 Nov 2020 07:41:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIbJf/xFJlSSxyxXKO9VVThDnvXEYhjavZYDuPa9HaB0xbgIAt1JjC7pynzdWkVIpP2hrb X-Received: by 2002:a17:906:cc8c:: with SMTP id oq12mr4940876ejb.177.1606232509792; Tue, 24 Nov 2020 07:41:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606232509; cv=none; d=google.com; s=arc-20160816; b=vMf8ISXIxUuU/6ISugZ643xDWl1oXDF2DJcLPQc5oq7LNKyMybqWBho2YNbJJ7d+LQ EXUqJoO0M9pBGpbL3jEShV/I1OMQWioIDcyMGWoCLfZ1MlC3f/hGW+8Qljs/6Eeepnut Jernbc7OgufET9UK6dHDVCdTemht0lCDAUM6LmE+obUnZB5tBY4k0Pjv4rMHBtFP5V/p ovLEiQzSpyGf42QXSXKDfOxr+oGTcM6gg8LcnfBmPlEoWH1fMqPnIw4/rcyRoewlZUzN CPvTBQ1L1QJiKn1Ctafwch+OvNlBYFvN5OVi6KOzCf8N6C3x4nCBbJ0e4GQo8KG/l0hC kDAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gemFyzpNjNLon40XFhSL9X2QjE/xiw9/g4FNTnG3Ym4=; b=sMxc8+bx6Jo0RBg7HqzdWU5k62sE9+HuDuBtI1GZLoo1s1wWgV5L+IjcJpgQyMvFPx ZwL8TBlva6XtWYpbvEBY5BcBCZlGa6Y14vK9QNjUaakwYcx7WsGVSAJpxMyvXaJ96ZOE TRKIrDQMnNGc1zuXvJCdezLCOG9g8Om4ONZCO3cSOV0SKf8Wen+iuAMKqCHf5ViINdjL 6pANqK4rJ9kYcTlz2aUTYub1S9a7xXfZmu5hJGY08wW18izSLEsBOoK5TY018bk9b2nx qwNjfzfm2P5bWGmPe4zMuZ/LR/yeSTM1OJfv2i7L+jyHRaui8kAAPlDGxZsTmeSVbe8g neLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=D8CkwFXX; 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=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n10si3151528edo.182.2020.11.24.07.41.21; Tue, 24 Nov 2020 07:41:49 -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; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=D8CkwFXX; 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=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389785AbgKXPiE (ORCPT + 99 others); Tue, 24 Nov 2020 10:38:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389277AbgKXPiE (ORCPT ); Tue, 24 Nov 2020 10:38:04 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D18A1C0613D6; Tue, 24 Nov 2020 07:38:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=gemFyzpNjNLon40XFhSL9X2QjE/xiw9/g4FNTnG3Ym4=; b=D8CkwFXXZblYfDir5fESdil6h NJyGgTiXqzqCcZfxLA8A8+baS9eDHlGG1kk8H9YaehBBDfvIICFz31qIDxAeTVL4fJ50/QDIv3Aul xaA2bie40QhHP5Y6iQKZuO9ESIwZBYCb55pFpbPEEWFSytwA1c1oEZzD+Uoo64odChsrldM4fURpV YmsVpGK0Vv+RZWqdcBW+znGKeLK6Em3GxajInaLTTbft1RKaJUmeKbsc7gcAWLPXtKqy5ZPpCGJhu UqKRl51EIlxSR6R0s8ohVoP8Nx7V+6Api/6lE/zcji2uszEmAUpEmPcvevOwkOs8T4sbYRxMSOUan Dvo0U0w4w==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:35544) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1khaOC-0007tb-AP; Tue, 24 Nov 2020 15:37:56 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1khaO6-0007S6-L7; Tue, 24 Nov 2020 15:37:50 +0000 Date: Tue, 24 Nov 2020 15:37:50 +0000 From: Russell King - ARM Linux admin To: Antonio Borneo Cc: Andrew Lunn , Heiner Kallweit , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, Yonglong Liu , stable@vger.kernel.org, linuxarm@huawei.com, Salil Mehta , linux-stm32@st-md-mailman.stormreply.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: phy: fix auto-negotiation in case of 'down-shift' Message-ID: <20201124153750.GH1551@shell.armlinux.org.uk> References: <20201124143848.874894-1-antonio.borneo@st.com> <20201124145647.GF1551@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: Russell King - ARM Linux admin Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 24, 2020 at 04:17:42PM +0100, Antonio Borneo wrote: > On Tue, 2020-11-24 at 14:56 +0000, Russell King - ARM Linux admin wrote: > > Userspace doesn't expect the advertising mask to change beneath it. > > Since updates from userspace are done using a read-modify-write of > > the ksettings, this can have the undesired effect of removing 1G > > from the configured advertising mask. > > > > We've had other PHYs have this behaviour; the correct solution is for > > the PHY driver to implement reading the resolution from the PHY rather > > than relying on the generic implementation if it can down-shift > > If it's already upstream, could you please point to one of the phy driver > that already implements this properly? Reading the resolved information is PHY specific as it isn't standardised. Marvell PHYs have read the resolved information for a very long time. I added support for it to at803x.c: 06d5f3441b2e net: phy: at803x: use operating parameters from PHY-specific status after it broke for exactly the reason you're reporting for your PHY. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!