From patchwork Wed Jan 18 10:01:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 4163 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2267894wrn; Wed, 18 Jan 2023 02:57:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXu4hMKGoLx7gT7Ox6xX/+gtiob72cTOcKuQsmjxc1PsX2EMmPTXBfKJUgMYRSA9asxu4luC X-Received: by 2002:a05:6402:5296:b0:49c:3cf4:d9ed with SMTP id en22-20020a056402529600b0049c3cf4d9edmr7542822edb.23.1674039479073; Wed, 18 Jan 2023 02:57:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674039479; cv=none; d=google.com; s=arc-20160816; b=jRLQFWysnocQRannwIB1tprVVTPSd9M1oEuJkLdZgiLJrVwBnPjw4734+KAOBNrxzz OTiyl0l3ZxBIn+dxu99GZ5EoGExAQBi/4+LBXmNUMn2pTGTua2RQoCVzGVeuNRNokQ58 CxygmQirbOrjhZyorQhA2TqmQCrCHtGwd1bcn7PifTucxCzSyRr/kVOx/NXoAp9Di8Rx wVdU+CqRfZj4mv/jt2grIjCm8kxVw/bNHeIjJLzhWxYOv5uHIAXQZbDA+c33Mj8RqIk2 8gNEE9y2eTzUrwdRVkeYL44wJpFD8pQG/5pPxGjfvzpsOe2aGKYIbWNP0AM9D4dbuSX1 tM3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=mJlXAa/qkylSd69OPqPPuscGxs/BZYHJRgJ6yHTXKPg=; b=XWD24l5G1MBwmrIvh8KRraxRM37KIOFasOyU7pGUfrKx3xeHUrPJQIuRZTICmApx6A XA9PEvS5ij+Lwf9SssvNku93NZE0xJ3PmViIxLskDeawdNA3HR4iYJy/pL3NHBLpAFDd rxbH8nZ+jU9ZRcYy5YUeYPav0V7VjJK60viuPb2kbahDCco1vCJn+oejBqDHq/IK1xY6 ObJaaUBojI6J8ylZsZgTo3UdpcckN9P0E6+9FutpKiXqoaaPu3EZ4fo/WWEViI27TPp6 1DqOJ30mdnkJ42UZmOzq9/BPkL4ZVzAjp35c0CH64vjaml1JSF8d3WS3gHdyHpvMKCbX mmdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=VaR2ztJS; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r19-20020a05640251d300b0049e36afc510si5912731edd.176.2023.01.18.02.57.33; Wed, 18 Jan 2023 02:57:59 -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=pass header.i=@walle.cc header.s=mail2022082101 header.b=VaR2ztJS; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230119AbjARK4a (ORCPT + 99 others); Wed, 18 Jan 2023 05:56:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229993AbjARKxB (ORCPT ); Wed, 18 Jan 2023 05:53:01 -0500 Received: from mail.3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 498CF8100B; Wed, 18 Jan 2023 02:01:46 -0800 (PST) Received: from mwalle01.sab.local (unknown [213.135.10.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id A0F67125C; Wed, 18 Jan 2023 11:01:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1674036104; 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; bh=mJlXAa/qkylSd69OPqPPuscGxs/BZYHJRgJ6yHTXKPg=; b=VaR2ztJS25J2+GUfFLOhG2pduVTooXBz0fDVkqPYjDtmtBuK8u3CKFU+dCFUgrwrNcpZSS xqxvsR7Bk6WX3t/v1YyPzUaJSNzLOehrazKHtwxm7ZTv7aDkl0d7N4xUWWFqUHqWRHM2oS xMI1F4W0V9wL9zlAu21aClmH7pWuPublyh4GOjk2/y6nhEVHh87g7j83e6KZQVieB98SmY SkKV4IIXSBo5J5r/tD0/deEP7t51oHQLSPm5AF3F5jiKOhyJ/xqaAEywzt0PNyp6kWDAOt oc4njm15cQ4lf/w51vdgNUpIjVDItdFirWL0zQGTyS+rjWAhT+PJY6pew2RICQ== From: Michael Walle Subject: [PATCH net-next v2 0/6] net: phy: Remove probe_capabilities Date: Wed, 18 Jan 2023 11:01:35 +0100 Message-Id: <20230116-net-next-remove-probe-capabilities-v2-0-15513b05e1f4@walle.cc> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAH/Dx2MC/5WOQQ6CMBBFr0Jm7ZiWIoor72FYTMsgTaCQtkEM4 e4WEg/gYhY/L//NXyGwtxzgnq3gebbBji6F/JSB6ci9GG2TMuQiV0LKEh3HdEtEz8M4M05+1IyG JtK2tzG5UKimELJQVWtKSCJNgVF7cqbbVQOFyH4Hk+fWLsf3J/zEUCfS2RBH/zlmzfLg/yyYJQq 8EOXVVd0oFR9v6ns+GwP1tm1f2oxXifYAAAA= To: Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , Matthias Brugger , Bryan Whitehead , UNGLinuxDriver@microchip.com, Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Joel Stanley , Andrew Jeffery Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-aspeed@lists.ozlabs.org, Andrew Lunn , Michael Walle , Jesse Brandeburg X-Mailer: b4 0.11.1 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_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755357547788099856?= X-GMAIL-MSGID: =?utf-8?q?1755357621021846864?= With all the drivers which used .probe_capabilities converted to the new c45 MDIO access methods, we can now decide based upon these whether a bus driver supports c45 and we can get rid of the not widely used probe_capabilites. Unfortunately, due to a now broader support of c45 scans, this will trigger a bug on some boards with a (c22-only) Micrel PHY. These PHYs don't ignore c45 accesses correctly, thinking they are addressed themselves and distrupt the MDIO access. To avoid this, a blacklist for c45 scans is introduced. To: Heiner Kallweit To: Russell King To: "David S. Miller" To: Eric Dumazet To: Jakub Kicinski To: Paolo Abeni To: Felix Fietkau To: John Crispin To: Sean Wang To: Mark Lee To: Lorenzo Bianconi To: Matthias Brugger To: Bryan Whitehead To: UNGLinuxDriver@microchip.com To: Giuseppe Cavallaro To: Alexandre Torgue To: Jose Abreu To: Maxime Coquelin To: Joel Stanley To: Andrew Jeffery Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-aspeed@lists.ozlabs.org Cc: Andrew Lunn Signed-off-by: Michael Walle --- - Link to v1: https://lore.kernel.org/r/20230116-net-next-remove-probe-capabilities-v1-0-5aa29738a023@walle.cc --- Andrew Lunn (6): net: mdio: Move mdiobus_scan() within file net: mdio: Rework scanning of bus ready for quirks net: mdio: Add workaround for Micrel PHYs which are not C45 compatible net: mdio: scan bus based on bus capabilities for C22 and C45 net: phy: Decide on C45 capabilities based on presence of method net: phy: Remove probe_capabilities drivers/net/ethernet/adi/adin1110.c | 1 - drivers/net/ethernet/freescale/xgmac_mdio.c | 1 - drivers/net/ethernet/marvell/pxa168_eth.c | 2 +- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 - drivers/net/ethernet/microchip/lan743x_main.c | 2 - drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 3 - drivers/net/mdio/mdio-aspeed.c | 1 - drivers/net/phy/mdio_bus.c | 197 +++++++++++++++------- drivers/net/phy/phy_device.c | 2 +- include/linux/micrel_phy.h | 2 + include/linux/phy.h | 10 +- 11 files changed, 140 insertions(+), 82 deletions(-) --- base-commit: c12e2e5b76b2e739ccdf196bee960412b45d5f85 change-id: 20230116-net-next-remove-probe-capabilities-03d401439fc6 Best regards,