Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3418271rwb; Fri, 20 Jan 2023 16:08:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXtSRFsO20GVH0p4nN+4pj65hlXkyRHVC/FzJsnAckoG2Rgx/UnucuUsJ7jTZMm4QExGUekt X-Received: by 2002:a05:6a20:6f07:b0:b0:25ba:1769 with SMTP id gt7-20020a056a206f0700b000b025ba1769mr17242926pzb.58.1674259692527; Fri, 20 Jan 2023 16:08:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674259692; cv=none; d=google.com; s=arc-20160816; b=Y/4iTPfVqHgUj9wTvfODcsYAUQpPCaZ7R9yNUJBB51MkJopGzJKCFb/A2nxgusUYcj yCotlCEYKbxTfqvuWC6Ef8EudHAAP7lpbhuroIA4Hg4S7bYjet9+HX7oJaimXr2he4PL og2+zgBtuyMOALt+B7BZafIt0YBA51VlP1g9qaSIVbbKiIUbNQHrCjr8jdggDQxMuIa0 E3WJngd+eOnzj61YGm6lCuH9AFqDAC9OJJpC5iTyVdg8+ZOCBYbHjdoH4Lu964LXsUyJ jOJGWKKHxs1tVyXjGruBqW+RDS2bhnT8zbkYv+Yev/wZotGMJA9FzJ5OHL0xwocuhV21 4oRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=u8jiZcqJPAm+/Dg5Mao/7VAzjkBNlmo6cpwAQBGJzPU=; b=Vkvc2ryY0DImPFA8JQpTWSDTgBcO0rra5ixPWiFzyUmohA/nBFKX7GATboyribjHuX yip9XgXuVcsPFWZjSQXldyrWqq1DSo2tdXRq/b9y7onVwN5DgQVfg7aFzXXw+nh1T4hX Rl0GbPFSpWrMHXd69COteY2fKwHgpC6LDRCvJYP54AKOkbcdaWXM1uF61Zhri6PNhPmz Xc0Hm6aF+xpXRRVsAiihSS6TTR6i8G30L6a3Sa3QV7YRkj22q6roRYa+fkcTdDkPJ9az HNitfTjWH06FAVORG2WifYQsU7nMyI+nvK5OEo8sYGXQehm1mMQctFoHLSGi7VO95BjB 6ctA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=MqQeq26j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 197-20020a6301ce000000b00478add2c2a6si44036423pgb.653.2023.01.20.16.08.05; Fri, 20 Jan 2023 16:08:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=MqQeq26j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229950AbjATXUp (ORCPT + 50 others); Fri, 20 Jan 2023 18:20:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbjATXUm (ORCPT ); Fri, 20 Jan 2023 18:20:42 -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 46E144216; Fri, 20 Jan 2023 15:20:40 -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=u8jiZcqJPAm+/Dg5Mao/7VAzjkBNlmo6cpwAQBGJzPU=; b=MqQeq26jMORty1lHsiQ4AhqarQ QEskS9k2dgen1Bk/+/QTp90xWA6iERSjCJ2uZiW4y18chQhIigRCP6Vj8mpgOApfaSqBvbMnQaSrf dBNfEFHuFMQAk2wCEWncz/G4SHVBxmyQfPgK3TWiPJ1zR8oNv8e1+KZ7TKROkkEq9gUZ4pTYnOz/0 /u4ilfJ/feK6L4n2VU5kY36h8q4penuhcvKfYJRPLMhMZHYe9427lEczEzCRS5aRMBkb+v7kjtpGo lwvaXcbC9yItTV1TbnJzdP2XSvl/lKe9Uk9v2qA+A/5YmtCcgNNI9Lbu/fyMhJMEpSfqzJDl7ZytI 3PugkzJQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:36238) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pJ0gG-00083t-1v; Fri, 20 Jan 2023 23:20:19 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1pJ0gA-0001qW-Eo; Fri, 20 Jan 2023 23:20:14 +0000 Date: Fri, 20 Jan 2023 23:20:14 +0000 From: "Russell King (Oracle)" To: Michael Walle Cc: Yisen Zhuang , Salil Mehta , "David S . Miller" , Jakub Kicinski , Paolo Abeni , Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Marek =?iso-8859-1?Q?Beh=FAn?= , Xu Liang , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 4/5] phy: net: introduce phy_promote_to_c45() Message-ID: References: <20230120224011.796097-1-michael@walle.cc> <20230120224011.796097-5-michael@walle.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230120224011.796097-5-michael@walle.cc> Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 20, 2023 at 11:40:10PM +0100, Michael Walle wrote: > If not explitly asked to be probed as a C45 PHY, on a bus which is > capable of doing both C22 and C45 transfers, C45 PHYs are first tried to > be probed as C22 PHYs. To be able to promote the PHY to be a C45 one, > the driver can call phy_promote_to_c45() in its probe function. > > This was already done in the mxl-gpy driver by the following snippet: > > if (!phydev->has_c45) { > ret = phy_get_c45_ids(phydev); > if (ret < 0) > return ret; > } > > Move that code into the core by creating a new function > phy_promote_to_c45(). If a PHY is promoted, C45-over-C22 access is used, > regardless if the bus supports C45 or not. That is because there might > be C22 PHYs on the bus which gets confused by C45 accesses. It is my understanding that C45 PHYs do not have to respond to C22 accesses. So, wouldn't this lead to some C45 PHYs not being detected? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!