Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4482607rdh; Wed, 29 Nov 2023 02:48:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IG0fyh0LGzp7h4gu6ToH5p0wdkyzrxW0j9J8cQptXDq22basPj583fi2SA1EsQ52H3WT4/d X-Received: by 2002:a17:902:cecf:b0:1cc:31c4:3426 with SMTP id d15-20020a170902cecf00b001cc31c43426mr25210538plg.11.1701254881285; Wed, 29 Nov 2023 02:48:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701254881; cv=none; d=google.com; s=arc-20160816; b=oRm1K+cDw4PlgB1DgG86Il6bCSMx9NryhVBPC16gl39z9zJ1qG4LgKt+NSk7C95H/6 BEnTvl3kd+EynJX2XzI3g5fVUmfFEEEIDQPk/t9mg6ZY12Qwxb0AEzgO2i9ohrkA2zhn dD1DVuUVjRBgYMfd5LtwfluKz6d/QJQqO/Fwt3Z0JRlhvCi7Va5pIM4W2ij2MIOpRB9Y 08OaOUSIlMKXCqHIkv8+waQ1sAF3IQ5/j+4i1j6gWPuwGkbaE2aQwvgxQ15KWdB4FWcT viJAkXkKp6kCPabMMKg07DyD4q4JZ+dMDoF45uvCDpQACs/8gKFcwy/oMHl63T+BV0Hm rG7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=YMZbFDkVfTDJmmFleew3bSBW/TgAopadhMfWD+sdhRI=; fh=2M7VhQjoutm7+TLSQk6KyKOMKW2hojhjH1KY0cMqkNA=; b=zu1SN9jgJ0cleKaGorTwJM/L0lmLIOXgzEx19H5pZI1cQ1E86nHHaWuaioUsInkI2z Ztk68HV8+KF3sYYounr2VPj8/btjC9fW3bGgA/pAww8ELVYHlKevvwcIzTK05fCivL7/ Ukkac0oQujyN75JKoMJ28MzBns3qyJf11c1QIVN0OO4yeseixJ4vD2Kx46GHOa99Gzqc biVzpIJRQyhEzBenlBI+cncnkx8TDlPohV9KwBrWCy8hANT9s4i5/I/C3FGndXZzdPE7 BpeaMZ8lgN89fkl1jFYJ/WLPFgORu/3VcnUs/8Jc+wkraODKwgusC+YBEUp6Bp1Gx4Uv 6wkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=H25kcB76; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id h12-20020a170902f54c00b001cc5f51b1ecsi4851649plf.347.2023.11.29.02.48.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 02:48:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=H25kcB76; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 138E4807C85E; Wed, 29 Nov 2023 02:45:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229705AbjK2KpQ (ORCPT + 99 others); Wed, 29 Nov 2023 05:45:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbjK2KpP (ORCPT ); Wed, 29 Nov 2023 05:45:15 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 487FFDC; Wed, 29 Nov 2023 02:45:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=YMZbFDkVfTDJmmFleew3bSBW/TgAopadhMfWD+sdhRI=; b=H25kcB76uRDwpD9uumTQrwD225 oQOhBWUD8B+lalPyUeG3K89C5RvR3/eyoSod6l2OyvYdmq5Qq48N8EsaHtXPyyGGUdhMsOba2zW5B QKrS8SkafmsIvjRdblNjVFqdP2BDjk+odROj3xJ0SHzmWUvnSr4PVekR1/gr2rsdNU5lauajagElV ubswMItB7H6TUq3lbmXL3HXcL/UBPCD3TzxAAitwiSh6MhTPVNDeOf/2JDGhRMvGHLX7KjgSmZI70 2IXAdns5BRdjLeLzz7VXp0jF6QU0pfQyYhDpFLFuf5A4/1rVCs5wtgsFD26Fd8AIySe/ZV6HT71p+ a9a9j54w==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:35654) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1r8I46-0000AU-1E; Wed, 29 Nov 2023 10:45:10 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1r8I47-0003vH-5M; Wed, 29 Nov 2023 10:45:11 +0000 Date: Wed, 29 Nov 2023 10:45:11 +0000 From: "Russell King (Oracle)" To: Christian Marangi Cc: Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andy Gross , Bjorn Andersson , Konrad Dybcio , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [net-next PATCH 02/14] net: phy: at803x: move disable WOL for 8031 from probe to config Message-ID: References: <20231129021219.20914-1-ansuelsmth@gmail.com> <20231129021219.20914-3-ansuelsmth@gmail.com> <65670622.050a0220.4c0d0.3ee9@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <65670622.050a0220.4c0d0.3ee9@mx.google.com> Sender: Russell King (Oracle) X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 29 Nov 2023 02:45:43 -0800 (PST) On Wed, Nov 29, 2023 at 10:36:31AM +0100, Christian Marangi wrote: > On Wed, Nov 29, 2023 at 09:24:32AM +0000, Russell King (Oracle) wrote: > > On Wed, Nov 29, 2023 at 03:12:07AM +0100, Christian Marangi wrote: > > > Probe should be used only for DT parsing and allocate required priv, it > > > shouldn't touch regs, there is config_init for that. > > > > I'm not sure where you get that idea from. PHY driver probe() functions > > are permitted to access registers to do any setup that they wish to. > > > > config_init() is to configure the PHY for use with the network > > interface. > > > > I think this patch is just noise rather than a cleanup. > > > > I got it from here [1] > > Also on every other driver probe was always used for allocation and > parsing so why deviates from this pattern here? Untrue. bcm54140_enable_monitoring() is called from bcm54140_probe_once() which in turn is called from bcm54140_probe(). dp83869_probe() calls dp83869_config_init(), rightly or wrongly. lxt973_probe() fixes up the BMCR. mv3310_probe() configures power-down modes, modifying registers. mt7988_phy_probe() calls mt7988_phy_fix_leds_polarities() which modifies registers. lan8814_probe() calls lan8814_ptp_init() which does a whole load of register writes. lan88xx_probe() configures LEDs via register writes. yt8521_probe() configures clocks via register modification. I'm afraid this means your comment is demonstrably false. > Also I think it was wrong from the start as on reset I think WoL is > not disabled again. (probe is not called) On hardware reset, the 1588 register will re-enable the WoL pin, but that needs a hardware reset of the PHY to happen after probe() is called. However, phy_probe() will only assert the reset signal _if_ an error occured during probing, not if probing was successful. So, a successful probe of this driver will not cause a hardware reset. Also, hardware reset is optional. Do you know whether the platforms that use the separate WoL pin which this 1588 register controls also wire the reset signal such that it can be controlled by Linux? Probably not. So, this register write will not be cleared by a hardware reset after a successful probe. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!