Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2200070pxb; Fri, 25 Mar 2022 12:55:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCT1JpJYJYghIowvgV8LcE8ro/iR9mIBtNkFM2ZDuq5Rmbd+K4BB0+N76Ghs3XtukYyzlz X-Received: by 2002:a17:90b:4d08:b0:1c7:7567:9f6b with SMTP id mw8-20020a17090b4d0800b001c775679f6bmr22711309pjb.134.1648238113413; Fri, 25 Mar 2022 12:55:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648238113; cv=none; d=google.com; s=arc-20160816; b=GrWpgh3GvCwnz1Q7T759S6lZiY/797tpUd0JLA8BUIRT6CivNNqJLKdgt+EBASX+em m2SjY1gm84lZee4YS7LOSauT2x5qczRg9VmYswObik/KKt1gfPbxH5n7U5Kom5OYlYIp hsAUXLC0A9aIveD1YkBCfoikfAsNLTqLu5UfF/yTtStEVdhIHvd0nZtEYHfKEaTBmsaX W7g7mp97ko4Xsk6M0hRYmQn1HXKygGWNTCcpVVhXC7yNsJIN7K5vFrqGVip+Uja1D5ZU VylRZhga6WJ1i9z+ebjr9YFmqbltlAGr2X2+/vmfIbhToY5jMhxrdZagxQlGlmvri4fi KS1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=CBauyiCRbelJs5M6LU0K3cCy/cSfRgKin2pevcyzRb4=; b=b1E7IVB0paGERaeLBQHYLJ/FI6S14jCLp5FoPQHhBtwebtwYMvZgapekpoIBypH0MR cly2yRKL4O8aIMQNeiA+gY/8Wa5iaCrRc0Qju5oVyM3MF+1kGz8UnSrQzxLwnKuiyHdr SJqOHfJ7gJ/7tWRTRxXB0lRVNg7KdUuk/5cTHkx2oEi6fpy+2hXA32NpWYGniV0LSba1 NNKMEZLUJWhnYPnpUcz9r8i5InJ5L/TKOPop9KQ+592cVxUNdgKorSrLe0EE2t7WY8UC u2jBpk4ePaiyd4Ci3Xp6hfuI2NpxSXBEC7VHBYNZyjjpcjgSc+YDCX3P7bAYEilW3fUv IJoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=eimmWwIC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id f31-20020a631f1f000000b003816043ee99si3203181pgf.142.2022.03.25.12.55.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 12:55:13 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=eimmWwIC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DDA292D1C3; Fri, 25 Mar 2022 11:44:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350956AbiCXOaY (ORCPT + 99 others); Thu, 24 Mar 2022 10:30:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350953AbiCXOaW (ORCPT ); Thu, 24 Mar 2022 10:30:22 -0400 Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E173F0F; Thu, 24 Mar 2022 07:28:45 -0700 (PDT) Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id F0F652222E; Thu, 24 Mar 2022 15:28:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1648132124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CBauyiCRbelJs5M6LU0K3cCy/cSfRgKin2pevcyzRb4=; b=eimmWwICoNdsg2Ak75/cFZM+H2sWdTGDxWJY9k976hk2Qew2mjAex7c5BVbkgImJEHMwfC vOVK6m3vmkxnFnszIy8/K437HFu9UtbQTMKk7t2sU+xiwUsM4zxsDFkzc00P+0ZrqmjH2X lOh/A9vhQGxNtsdTSieWbe/A6ev0p5g= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 24 Mar 2022 15:28:43 +0100 From: Michael Walle To: Andrew Lunn Cc: Heiner Kallweit , Russell King , Jakub Kicinski , Paolo Abeni , "David S . Miller" , Xu Liang , Alexandre Belloni , Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC net-next 2/5] net: phy: support indirect c45 access in get_phy_c45_ids() In-Reply-To: References: <20220323183419.2278676-1-michael@walle.cc> <20220323183419.2278676-3-michael@walle.cc> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <7503a496e1456fa65e4317bbe7590d9d@walle.cc> X-Sender: michael@walle.cc X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Am 2022-03-23 20:39, schrieb Andrew Lunn: >> +static int mdiobus_probe_mmd_read(struct mii_bus *bus, int prtad, int >> devad, >> + u16 regnum) >> +{ >> + int ret; >> + >> + /* For backwards compatibility, treat MDIOBUS_NO_CAP as c45 capable >> */ >> + if (bus->probe_capabilities == MDIOBUS_NO_CAP || >> + bus->probe_capabilities >= MDIOBUS_C45) > > Maybe we should do the work and mark up those that are C45 capable. At > a quick count, see 16 of them. I guess you grepped for MII_ADDR_C45 and had a look who actually handled it correctly. Correct? Let's say we mark these as either MDIOBUS_C45 or MDIOBUS_C45_C22, can we then drop MDIOBUS_NO_CAP and make MDIOBUS_C22 the default value (i.e. value 0) or do we have to go through all the mdio drivers and add bus->probe_capabilities = MDIOBUS_C22 ? Grepping for {of_,}mdiobus_register lists quite a few of them. -michael