Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1883004rdg; Sat, 12 Aug 2023 23:29:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH+qz2mwZ4KB23wNkfqEe+5Mxh2YbnoBKduc239CDVpa6+0jHGot2Y0EEWzMAeC/j6VZPHY X-Received: by 2002:a05:6a20:729c:b0:138:1c5b:22fc with SMTP id o28-20020a056a20729c00b001381c5b22fcmr7519793pzk.54.1691908144808; Sat, 12 Aug 2023 23:29:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691908144; cv=none; d=google.com; s=arc-20160816; b=wEJJD6ta5WG/ZAJ+J3kl74fT4Rr+sGThzOgEFApS+ZZjWVe1w0KDVTcu7RHidQYVOl bP4iCbF/O+QzEkTDLNf0jiUGkY1Xj9f22KNQL5kSF7VorzqBN/NaAoTlyL1GfQsGIGCz EAJhsh2olP9vy2Qvkzb0sc0OJumeNWpYvKhHYP2aLyLMSvAL7yDLpU/l/row3H7NEL3V hhGUCN73JMRWEdGlo8fXnXOWEulKnoae2npwFZQaUeJZk7BAQ3kcG5xivUCQcckl184d Rs2EMM8RvkfXT0VlZTABz1n1qy0uHouU+Nnk3Jz1TeKqiSrL9htszokb0r+Xr8lyp2n2 P2ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=YbjC+3FrOazwaRftF4CmnAfhxmwPya3F3H22BEeCg/I=; fh=LK2+fLRsW1V//RGwwHIrlpcKala0G7gwihxbuNytZVg=; b=ehWDcNS6D18SbtDu7xRkGqzcK9ZVzTCoGhehlUzSmM/7yXIyiaJ2RUWK2oRbOh4UTS E3rBlBCNZLk7Pgn23kXUoy0bmyowsCOGxuH+rqXoAX2DbXsaajYK74hfQLsGli/NacYd A2VxlmB1zXgMwt32waLnTmTEBBUJzuQhQdjawASr7tyHabhf0SLAKYnTAhxSRHIZidDR oHiWju9M2IL7g/kBYEJMMQESmEQhMEESrLm/vL8DnidcTvITCw4sc2e7Av+YtZRFLpDz ni79+3Ep0GUrqLft+2K0dCOR8EuV1V3dAmZvuX26a3AitqbXJ+mrsN/A2EpoRGNjSrZ0 JY2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=aq3PpKUp; 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=broadcom.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z16-20020a634c10000000b00563faf044e0si5788966pga.840.2023.08.12.23.28.51; Sat, 12 Aug 2023 23:29:04 -0700 (PDT) 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=@broadcom.com header.s=google header.b=aq3PpKUp; 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=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229614AbjHMEmB (ORCPT + 99 others); Sun, 13 Aug 2023 00:42:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbjHMEmA (ORCPT ); Sun, 13 Aug 2023 00:42:00 -0400 Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14094ED for ; Sat, 12 Aug 2023 21:42:03 -0700 (PDT) Received: by mail-qk1-x734.google.com with SMTP id af79cd13be357-76ca7b4782cso228908985a.0 for ; Sat, 12 Aug 2023 21:42:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1691901722; x=1692506522; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YbjC+3FrOazwaRftF4CmnAfhxmwPya3F3H22BEeCg/I=; b=aq3PpKUpcvd15Whwq7svmw9glJwtc5CNr7CuISX0Tmn7BCq/NqHC41iQWeq4NlC7nm l+FRrA5CVksoyaDnY9XZFHHXvCYatT9KDmAacPyTZxXU1zgSpA903yI7qWM6EAsbaZ7W F4CtTzOySFgOIKkw00VsLcSxg04jAAyBsRHuM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691901722; x=1692506522; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YbjC+3FrOazwaRftF4CmnAfhxmwPya3F3H22BEeCg/I=; b=HwhuXQXgHWEotLXyM/oe/4PmQus/Jn0Mrbj3LPzkSyqri56Z9M9YAIdYXvxNIXaCvO izxpg//xKnzDgTkvEd65G+mGCddX3bsGcRGiBygwmTDtt7iobX6SIYj4ojs8j8jzQuDz sJFbt6NyrkHeMOQZdJDL6kAGYxNxlJXdiW6eF+LJot6aqOIOaxtxtaXTVPQnrV6w8cY6 JtOPMgDYGZMwBcnXQmvKIZNpG9K1kqM9OSuFVKwALh6mUugWWZbXJrZ9i3v5AblKBFCm KlHG5oU+U56nXD9r/PkSFJmOQcwBpfuF6/bbkrFXZsoDCDgr5NAheAw9JTgWoz9wcNMh A1Ww== X-Gm-Message-State: AOJu0Yw8PW0wiuW89Yj45WVUCFD4QO+zthpJo2AMHyYYNm80/UEFtnYI WXvLgV4ERwhoDPg9GzexKuyKVA== X-Received: by 2002:a05:620a:1aa5:b0:76c:caa5:4c1d with SMTP id bl37-20020a05620a1aa500b0076ccaa54c1dmr7931584qkb.26.1691901722173; Sat, 12 Aug 2023 21:42:02 -0700 (PDT) Received: from stbirv-lnx-2.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id ou8-20020a05620a620800b00767dc4c539bsm2190661qkn.44.2023.08.12.21.41.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Aug 2023 21:42:01 -0700 (PDT) From: Justin Chen To: netdev@vger.kernel.org Cc: Justin Chen , Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jon Mason , linux-kernel@vger.kernel.org (open list) Subject: [PATCH net v2] net: phy: broadcom: stub c45 read/write for 54810 Date: Sat, 12 Aug 2023 21:41:47 -0700 Message-Id: <1691901708-28650-1-git-send-email-justin.chen@broadcom.com> X-Mailer: git-send-email 2.7.4 Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="0000000000002910510602c691a0" X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, MIME_HEADER_CTYPE_ONLY,MIME_NO_TEXT,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_TVD_MIME_NO_HEADERS 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 --0000000000002910510602c691a0 The 54810 does not support c45. The mmd_phy_indirect accesses return arbirtary values leading to odd behavior like saying it supports EEE when it doesn't. We also see that reading/writing these non-existent MMD registers leads to phy instability in some cases. Fixes: b14995ac2527 ("net: phy: broadcom: Add BCM54810 PHY entry") Signed-off-by: Justin Chen --- v2 - Change EINVAL to EOPNOTSUPP drivers/net/phy/broadcom.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c index 59cae0d808aa..04b2e6eeb195 100644 --- a/drivers/net/phy/broadcom.c +++ b/drivers/net/phy/broadcom.c @@ -542,6 +542,17 @@ static int bcm54xx_resume(struct phy_device *phydev) return bcm54xx_config_init(phydev); } +static int bcm54810_read_mmd(struct phy_device *phydev, int devnum, u16 regnum) +{ + return -EOPNOTSUPP; +} + +static int bcm54810_write_mmd(struct phy_device *phydev, int devnum, u16 regnum, + u16 val) +{ + return -EOPNOTSUPP; +} + static int bcm54811_config_init(struct phy_device *phydev) { int err, reg; @@ -1103,6 +1114,8 @@ static struct phy_driver broadcom_drivers[] = { .get_strings = bcm_phy_get_strings, .get_stats = bcm54xx_get_stats, .probe = bcm54xx_phy_probe, + .read_mmd = bcm54810_read_mmd, + .write_mmd = bcm54810_write_mmd, .config_init = bcm54xx_config_init, .config_aneg = bcm5481_config_aneg, .config_intr = bcm_phy_config_intr, -- 2.7.4 --0000000000002910510602c691a0 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQagYJKoZIhvcNAQcCoIIQWzCCEFcCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg3BMIIFDTCCA/WgAwIBAgIQeEqpED+lv77edQixNJMdADANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA5MTYwMDAwMDBaFw0yODA5MTYwMDAwMDBaMFsxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTEwLwYDVQQDEyhHbG9iYWxTaWduIEdDQyBS MyBQZXJzb25hbFNpZ24gMiBDQSAyMDIwM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