Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6696835rwb; Mon, 12 Dec 2022 05:26:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf4ZJFRaUSS/K6ZJ2LRvja6K1REkJd3QnLx1YZv/+/EqmL5vchgQrd0Ocg+R6OPJaQHRZmXJ X-Received: by 2002:a17:90a:9c15:b0:218:8666:c20e with SMTP id h21-20020a17090a9c1500b002188666c20emr18671342pjp.20.1670851587378; Mon, 12 Dec 2022 05:26:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670851587; cv=none; d=google.com; s=arc-20160816; b=MjKWaGmxLJ5aM2VDiuYTma3mSQtam1M9zDCEZKY+K5cnDB244A5nXALMCYfQQDaaMR UVveFDp5FtbZnKghlo+g2QkTwFDX7zoKTGlDwzwZR6e+pnApBWWpdtWXHwQB9R+sDaVy 2YgZNGXUb+z0gKWc9rMupzyfBMelrtxwGQTgIWRUEQtAHcrL9CO/IywciIlsqn/5+Ge9 JDNjzBqrWDqaS7okhQqB3nmHw6XRhNcfD0RLaZJ7tp8qB1ayADROcmvTogh3QV6DpkHd V5AB+J3i54KJdeBwmMzkx1k5xdSN9ChAH8a5807BaCBIU8XGwwpWPRX0Uth/43VCjs7t qsHw== 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=bnDEDv4cCUbLu4jOeJkF2nvePqKhVNSO7r0+B2yW+J8=; b=1FsDrkJ0XDEO5q4S3yinyxTerj/nKesyCjs8BtA65vBQD0orMDfCNxJ3mAEB0XlyF7 GjU8UzYj71Gwyf66Yhq7k/rbNsCVahN67PkWtpuXcIlA3Xbkt0TOXRyPTs8aDwLuCoS/ zQO30wvvrHAFLaFGxfPAARV4+Tycmgxy2Le2EB8OkVwYnc/f8J+jRzvGUlz0e9ky3jJe H8JsUZYRsvySG9FtJ7c5KZJwyQIibC7578bStECih0h9kXZZnytN5KP7f8qge9jSCb3m ljqBQP6Wuq79XNdK/LU/US9pHLfiDSMyR/PXulkKLobaahrwrqpp7OW46jlJfDbz1oHD r49w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=zblTOoSn; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lp10-20020a17090b4a8a00b002130053cad7si10570708pjb.7.2022.12.12.05.26.17; Mon, 12 Dec 2022 05:26:27 -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=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=zblTOoSn; 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=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232287AbiLLMrd (ORCPT + 75 others); Mon, 12 Dec 2022 07:47:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231462AbiLLMrb (ORCPT ); Mon, 12 Dec 2022 07:47:31 -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 8BDF212084; Mon, 12 Dec 2022 04:47:29 -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=bnDEDv4cCUbLu4jOeJkF2nvePqKhVNSO7r0+B2yW+J8=; b=zblTOoSnDU5imG7LtfiCwQMBeB JjNa1ISzUmSc5+FkwIYHtnKWvBNgnCybwImEB+b4ExzFYJNHH+01/646BHZU0wROeW/Ohs1nLGgxn tAjQTUpGnm2Y0/jU5fV0bdfMe/QzFUYh6HKyEScNqBQvimGBiaLxSFKLEREWOgaatkkIHaxHvYnjm fkmHHWkvqblz/3J8wGb29mYKR4BYXIxUfaAKRVA7donhMa/tJ4aIAAQKt2TNGHT6vXxd111thUTaJ 5jkubZauSdYrVGIpxCHblw9aVO43YOM4wOFk94ETOpu1T09fsPeB9KtHMjHe7CFvMLhLBFDsX3WTH rYFxV6QQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:35676) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1p4iD9-0005a5-LJ; Mon, 12 Dec 2022 12:47:11 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1p4iD7-0005Vm-Bu; Mon, 12 Dec 2022 12:47:09 +0000 Date: Mon, 12 Dec 2022 12:47:09 +0000 From: "Russell King (Oracle)" To: Claudiu Beznea Cc: nicolas.ferre@microchip.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, andrew@lunn.ch, hkallweit1@gmail.com, sergiu.moga@microchip.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] net: phylink: init phydev on phylink_resume() Message-ID: References: <20221212112845.73290-1-claudiu.beznea@microchip.com> <20221212112845.73290-2-claudiu.beznea@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221212112845.73290-2-claudiu.beznea@microchip.com> Sender: Russell King (Oracle) 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_NONE 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 On Mon, Dec 12, 2022 at 01:28:44PM +0200, Claudiu Beznea wrote: > There are scenarios where PHY power is cut off on system suspend. > There are also MAC drivers which handles themselves the PHY on > suspend/resume path. For such drivers the > struct phy_device::mac_managed_phy is set to true and thus the > mdio_bus_phy_suspend()/mdio_bus_phy_resume() wouldn't do the > proper PHY suspend/resume. For such scenarios call phy_init_hw() > from phylink_resume(). > > Suggested-by: Russell King (Oracle) > Signed-off-by: Claudiu Beznea > --- > > Hi, Russel, > > I let phy_init_hw() to execute for all devices. I can restrict it only > for PHYs that has struct phy_device::mac_managed_phy = true. > > Please let me know what you think. I think it would be better to only do this in the path where we call phy_start() - if we do it in the WoL path (where the PHY remains running), then there is no phy_start() call, so phy_init_hw() could result in the PHY not working after a suspend/resume event. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!