Message ID | 20230831110427.3551432-1-o.rempel@pengutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c792:0:b0:3f2:4152:657d with SMTP id b18csp324921vqu; Thu, 31 Aug 2023 08:38:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG1WMTqxrztmTfNnImY7nk9AEzO83HZfPA9cnBv5VaDuCwR4e9f1hoQ7VfMwo2ohvn4nF6a X-Received: by 2002:a17:902:f68c:b0:1b8:af7f:6331 with SMTP id l12-20020a170902f68c00b001b8af7f6331mr136210plg.55.1693496318917; Thu, 31 Aug 2023 08:38:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693496318; cv=none; d=google.com; s=arc-20160816; b=W1vYjteNOb2qiRAi2w4MLe0ctfJgdqlg7NVoCksai6e2Xbp842PmRU3kFjC/RDizsC ScTiwuv1G72qYhvtNJvlNnY06OLwFZTIU8IAtm2cE2iVDEQVvIizAlst5EMHWHOnrwTP KFIU90o6CUJ/RJOGMaJActJXphMgckLDt+R/ws3EKFURqVKvK1ypsF7Oe7k8jvLAL7ve rouahPbadrELUYcrQaC/MnZKvgcS/bOhDfuiCRUDwIaJuFrKXU+3ezlt0y8X97lmZys1 kWqOBARRNiMowHPvmR51PeQVZuaWJ+jBayZgpTisnJ3lYRJceM5TCW0ahYpXB1vo0a1s Q+mw== 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; bh=nXik/eoGTPhy6Apm/oq68M99T3MjVaUjDz1fWetN9FE=; fh=F3keG0vf1ZHZ6x9/xUfJAtnTatefVSPxeksQdNAZv+4=; b=DpW9kSM13DGfRhPBVFAoKRgJQQy99UObUfxooxjfI0bMBOqvzmPUKsvcbYDNVoM0W5 B9oyaks6Lkxa3y3+alJU0OP31NxRN6pL5FVqFkEIqbCLQx+e+4mjjWlsKkoS9IxIZH07 SPeNSFwuysgjZyyp2DhT0R1vx4QGavxsRYwr+mjdNLYWcXbLCZpCC78AOZeFd7kMX7PT Ww2M6eFJSN9rJzKgZ7K5XXH49fI6JZv514eBfk9Kzya5x36dcNVkXPoyIBc1UwCXjGlU HHmfFhy8w8vjoRejTfQeA1Y0jmu5Lw01F6c19F0kmmO6c0/bRrvvl2zeZUVdR9IXV1Ds eM6A== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ja5-20020a170902efc500b001bdc664cd5fsi1317797plb.168.2023.08.31.08.38.19; Thu, 31 Aug 2023 08:38:38 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243613AbjHaLEn (ORCPT <rfc822;zouguomin@gmail.com> + 99 others); Thu, 31 Aug 2023 07:04:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229771AbjHaLEm (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 31 Aug 2023 07:04:42 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77CC3CE4 for <linux-kernel@vger.kernel.org>; Thu, 31 Aug 2023 04:04:39 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <ore@pengutronix.de>) id 1qbfTS-00068H-Qw; Thu, 31 Aug 2023 13:04:30 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1qbfTR-002tpE-3Y; Thu, 31 Aug 2023 13:04:29 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from <ore@pengutronix.de>) id 1qbfTQ-00EtyY-11; Thu, 31 Aug 2023 13:04:28 +0200 From: Oleksij Rempel <o.rempel@pengutronix.de> To: Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com> Cc: Oleksij Rempel <o.rempel@pengutronix.de>, kernel@pengutronix.de, linux-kernel@vger.kernel.org, Russell King <linux@armlinux.org.uk>, netdev@vger.kernel.org, Lukasz Majewski <lukma@denx.de> Subject: [PATCH net v1] net: phy: micrel: Correct bit assignment for MICREL_KSZ8_P1_ERRATA flag Date: Thu, 31 Aug 2023 13:04:27 +0200 Message-Id: <20230831110427.3551432-1-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1775744698035648218 X-GMAIL-MSGID: 1775759595670627842 |
Series |
[net,v1] net: phy: micrel: Correct bit assignment for MICREL_KSZ8_P1_ERRATA flag
|
|
Commit Message
Oleksij Rempel
Aug. 31, 2023, 11:04 a.m. UTC
The previous assignment of the phy_device quirk for the
MICREL_KSZ8_P1_ERRATA flag was incorrect, working only due to
coincidental conditions. Specifically:
- The flag MICREL_KSZ8_P1_ERRATA, intended for KSZ88xx switches, was
mistakenly overlapping with the MICREL_PHY_FXEN and
MICREL_PHY_50MHZ_CLK flags.
- MICREL_PHY_FXEN is used by the KSZ8041 PHY, and its related code path
wasn't executed for KSZ88xx PHYs and other way around.
- Additionally, the code path associated with the MICREL_PHY_50MHZ_CLK
flag wasn't executed for KSZ88xx either.
Fixes: 49011e0c1555d ("net: phy: micrel: ksz886x/ksz8081: add cabletest support")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
include/linux/micrel_phy.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Thu, Aug 31, 2023 at 12:20:17PM +0100, Russell King (Oracle) wrote: > On Thu, Aug 31, 2023 at 01:04:27PM +0200, Oleksij Rempel wrote: > > The previous assignment of the phy_device quirk for the > > MICREL_KSZ8_P1_ERRATA flag was incorrect, working only due to > > coincidental conditions. Specifically: > > > > - The flag MICREL_KSZ8_P1_ERRATA, intended for KSZ88xx switches, was > > mistakenly overlapping with the MICREL_PHY_FXEN and > > MICREL_PHY_50MHZ_CLK flags. > > - MICREL_PHY_FXEN is used by the KSZ8041 PHY, and its related code path > > wasn't executed for KSZ88xx PHYs and other way around. > > - Additionally, the code path associated with the MICREL_PHY_50MHZ_CLK > > flag wasn't executed for KSZ88xx either. > > > > Fixes: 49011e0c1555d ("net: phy: micrel: ksz886x/ksz8081: add cabletest support") > > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> > > --- > > include/linux/micrel_phy.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h > > index 8bef1ab62bba3..0cedbeb9167c3 100644 > > --- a/include/linux/micrel_phy.h > > +++ b/include/linux/micrel_phy.h > > @@ -43,7 +43,7 @@ > > /* struct phy_device dev_flags definitions */ > > #define MICREL_PHY_50MHZ_CLK 0x00000001 > > #define MICREL_PHY_FXEN 0x00000002 > > -#define MICREL_KSZ8_P1_ERRATA 0x00000003 > > +#define MICREL_KSZ8_P1_ERRATA BIT(3) > > Please can you also convert the other two flags to use BIT() as well to > make the entire thing explicitly bit-orientated? Thanks. Ack. This patch is for the net. The cleanup will got to the net-next. Except clean up will be accepted for the net too? Regards, Oleksij
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h index 8bef1ab62bba3..0cedbeb9167c3 100644 --- a/include/linux/micrel_phy.h +++ b/include/linux/micrel_phy.h @@ -43,7 +43,7 @@ /* struct phy_device dev_flags definitions */ #define MICREL_PHY_50MHZ_CLK 0x00000001 #define MICREL_PHY_FXEN 0x00000002 -#define MICREL_KSZ8_P1_ERRATA 0x00000003 +#define MICREL_KSZ8_P1_ERRATA BIT(3) #define MICREL_KSZ9021_EXTREG_CTRL 0xB #define MICREL_KSZ9021_EXTREG_DATA_WRITE 0xC