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=-5.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 4A1EBC63798 for ; Tue, 24 Nov 2020 15:38:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BDD42206FB for ; Tue, 24 Nov 2020 15:38:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="D8CkwFXX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389787AbgKXPiE (ORCPT ); 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: netdev@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!