Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4062323pxj; Mon, 24 May 2021 22:57:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdff9t7LQPRdi+ysffxbIuEC4Q9YZbbMA+yQ0hNy/J8LxyJwNtQs68SC0OTbx+XOfPmZzP X-Received: by 2002:a05:6402:5241:: with SMTP id t1mr20713380edd.161.1621922249486; Mon, 24 May 2021 22:57:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621922249; cv=none; d=google.com; s=arc-20160816; b=PyNBJGkHpC9bhvY09h8Sbneta70w+5PnmIgY5Lp6GdPLM3ZNfi7SHfqpwPbHgNEIgv EJbWrO8LCpkpdodbCUW89VClkh+N8YOAHZFRsE201WaTfwCdlxxO82wc1HQbhjy0g4Fv o0WqYnreL5JZJ7mbLgO+y+v2dsp43pFF83KukXEtg4w9Rt8+QgFgduAQmv868oNmLOjM Vihbzuass1UcEYUo0x4PfKf3l6Iyb53rCauX+XrHmZeS2DkqBjw6LIxFz+DE9zlIYC+v 2jZN84cv+9tUBH7+8SD3t3HSJgbsyLl/ylLDbsUxt75dwXxGseGDUisQcgsi2N3W8w5h OwpQ== 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 :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=UzQoBfmRz8slEAWu+Fo4W70eltEW2gF7bgsLeFCTvps=; b=W48PnmpA39PV7dDuIsJng0Zj4eImtmk4aElGBCm9jcSkB/3xhwREQ0/d9PaJSp5BIL vNuM63pEeILxOGA79eLuTCm1VI1pVosCxabIY8eMH8Gr7h3tVVvG2fRBegDpGg0REEkl u7F46a8YDgjDr6P5Ig5KPVyKaef1nyBlfywMFaQprLf5MJgu03SELNnsiCX/d1fc9deG q9YBUjxKWMoql8deB09jIuD7u0E29nwaDiNRK8EtOhpXKrvd5RAI11ILi8BqYuvIR9VI Rqd6H4oIqf2kBJtwUSyPm4S8zaMIq1TMSyb6ueScBmOEVMSnKdewUK5ZyubxK2uXl39H rPhg== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hh21si15352984ejb.473.2021.05.24.22.57.06; Mon, 24 May 2021 22:57:29 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231134AbhEYFzG (ORCPT + 99 others); Tue, 25 May 2021 01:55:06 -0400 Received: from mga11.intel.com ([192.55.52.93]:41319 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231129AbhEYFzE (ORCPT ); Tue, 25 May 2021 01:55:04 -0400 IronPort-SDR: 3OF4ZyI511mDX3CY/vFGoJtBf4+Whie1eQTO2i+BJui1wuCt5oObtcmxQ1zgr62x6gvkaiP5/Z n0d1BX8/eHBw== X-IronPort-AV: E=McAfee;i="6200,9189,9994"; a="199054945" X-IronPort-AV: E=Sophos;i="5.82,327,1613462400"; d="scan'208";a="199054945" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 May 2021 22:53:35 -0700 IronPort-SDR: FQFDVxQH/mNCmeuQsNTjlXQgMuMhyhQOHUKStNhrOZ3WSAWkgYVk3/7uSALCGTk4q6ECA90YAt TJO24//DTcnA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,327,1613462400"; d="scan'208";a="471110393" Received: from linux.intel.com ([10.54.29.200]) by FMSMGA003.fm.intel.com with ESMTP; 24 May 2021 22:53:35 -0700 Received: from glass.png.intel.com (glass.png.intel.com [10.158.65.59]) by linux.intel.com (Postfix) with ESMTP id 239C3580911; Mon, 24 May 2021 22:53:33 -0700 (PDT) From: Wong Vee Khee To: Andrew Lunn , Heiner Kallweit , Russell King Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC net-next 1/2] net: phy: allow mdio bus to probe for c45 devices before c22 Date: Tue, 25 May 2021 13:58:39 +0800 Message-Id: <20210525055839.22496-1-vee.khee.wong@linux.intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 */ -- 2.25.1