Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4171319pxj; Tue, 25 May 2021 01:53:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBg+YxTrHuh53QXzYorkv9S1XZmpM0GOoD69SBwAtaxLbq5UUKUTAXJQbJzA/c8L7SE/9j X-Received: by 2002:a02:cf32:: with SMTP id s18mr28719007jar.31.1621932804382; Tue, 25 May 2021 01:53:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621932804; cv=none; d=google.com; s=arc-20160816; b=oyOtf1PaLezAmkYARK4E1FU3/UK0GHmn1vv1h41xqG0F1iJWkwgzDkbYn6ax8e5XVY n7BsTN9TumdS6f9GoJeQscflSJsELFWtWPZF784Tk6QKeDsyDVf1dI/XHIYOjDcpchcL BoEOhFhMOD2E1A0XB1PWrJndvPH1REbNMQ/BOrXVsdjKjM5bEksJC6kcoO+D6VWsCe5z QfWgYefJIgFbdRoiI6uWylKAoXkXTcFMSqBAml3mnl1rS8g/s62IQ29DzW2eHNZiaR+U zB3fjOk8A7s5aurKb9WbpSOxTrlnFEMJ3PlD2mglap7z3ZuWamDXgyUqXsAyHs5TAYSc t3mw== 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=2Tbd9SAdqfznWwtvifNl7ucpqO0NCIjR2dWlrNyfo+U=; b=OEEdIfWuefAJzTYRBA2l7djB2f733MGB7hfkqMk71CCbDeR42FKhyFXVC1emmvaSnL 9V4siH7zTVmAZTNci71WIFgSDypaZRrmLB+UaHLh/gYNF8cJei+PLQYTy8AXHoe5npWC gG9IVUIsWgZbWvYlIZIUAKh6xTjEFvQRFuJiPco4lqCcGMkijvvFf9jBMiqw4gb97hV8 9nPK/Wh93T89l8bNwqjpFVcZZbtEZhYwVJB3YuIS8Kj9aCyJr5qj9ELTaGbB5qK65qvj d5idFsidP64hUjkRIvimwFSP5YIm0Y0URviXDpBM8km28c0iOfSyqSxhPvR3bbYzgQb9 /1dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=1HljjSmp; 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 q186si16529146iof.83.2021.05.25.01.53.10; Tue, 25 May 2021 01:53:24 -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; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=1HljjSmp; 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 S231236AbhEYIdH (ORCPT + 99 others); Tue, 25 May 2021 04:33:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230041AbhEYIdG (ORCPT ); Tue, 25 May 2021 04:33:06 -0400 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 275CDC061574; Tue, 25 May 2021 01:31:31 -0700 (PDT) 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=2Tbd9SAdqfznWwtvifNl7ucpqO0NCIjR2dWlrNyfo+U=; b=1HljjSmp7Ygdz+35kryD2Docd D+Jkj42s/l6RhTS67aeNr7O9w15ay5E2xamcrgUC6u/7EiQEkjtoshXDvBiObzk7QNszRyzxeI/gv 6HZ5kh6aoDeET9BnoqQSk3tS30EkeK+bY6ihjddlQkrlh0AMIghhuX9T+dJjrEhImXFDKYu0UKi+c PmPEROGUtCezv3I7qyDXDDEV8ujMJHQ5OyUvI1FKXiZupqukCaCBVdz/HQq27eUk584g2kqoiX5/G +TzGwFt/PEgpx4rmshMXcr6scf6otQkSKGdYy+0iiaZl4apU2zQcF1d6gQZkUrPytbv9pmscpLAWS JcbkQG1Dg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:44344) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llST8-0003zS-GW; Tue, 25 May 2021 09:31:18 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1llST7-0001kB-IW; Tue, 25 May 2021 09:31:17 +0100 Date: Tue, 25 May 2021 09:31:17 +0100 From: "Russell King (Oracle)" To: Wong Vee Khee Cc: Andrew Lunn , Heiner Kallweit , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC net-next 1/2] net: phy: allow mdio bus to probe for c45 devices before c22 Message-ID: <20210525083117.GC30436@shell.armlinux.org.uk> References: <20210525055839.22496-1-vee.khee.wong@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210525055839.22496-1-vee.khee.wong@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 25, 2021 at 01:58:39PM +0800, Wong Vee Khee wrote: > Some MAC controllers that is able to pair with external PHY devices > such as the Synopsys MAC Controller (STMMAC) support both Clause-22 and > Clause-45 access. > > When paired with PHY devices that only accessible via Clause-45, such as > the Marvell 88E2110, any attempts to access the PHY devices via > Clause-22 will get a PHY ID of all zeroes. > > To fix this, we introduce MDIOBUS_C45_C22 which the MAC controller will > try with Clause-45 access before going to Clause-22. > > Signed-off-by: Wong Vee Khee > --- > include/linux/phy.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/linux/phy.h b/include/linux/phy.h > index 60d2b26026a2..9b0e2c76e19b 100644 > --- a/include/linux/phy.h > +++ b/include/linux/phy.h > @@ -368,6 +368,7 @@ struct mii_bus { > MDIOBUS_C22, > MDIOBUS_C45, > MDIOBUS_C22_C45, > + MDIOBUS_C45_C22, > } probe_capabilities; > > /** @shared_lock: protect access to the shared element */ The new definition doesn't seem to be used anywhere, so this patch merely adds the definition. It doesn't do what it says in the subject line. Any driver that sets the capabilities to MDIOBUS_C45_C22 will end up not doing any probing of the PHY. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!