Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5105070pxv; Tue, 6 Jul 2021 17:58:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/L1yHPMPOh1gNFM3gl4LiNAGvtE4iCgkxKcTH97gvIe4HSFEBwygpendN9qw6Eo+rsgce X-Received: by 2002:a05:6402:2813:: with SMTP id h19mr26231311ede.39.1625619519176; Tue, 06 Jul 2021 17:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625619519; cv=none; d=google.com; s=arc-20160816; b=n0T+OU5k8AK/3wzzD12pfPam12Zx68eZEGdxIipgppzQMdwS41b+qVwYCdSa4W0gCc FtdfzD+m/JbhtjZKLe/SLsFzDL1PdMHooLJUlCUvncZgunO0OI/i1qDtged24jOyArtY MDMdklMVNVRxHO2eapIfNj0Y2haBeqjGD8yIIvoWmDveZOFeybhkVuIhP2LagMqr3eEq ehdNXT3GfiDrt2R4Pu+pGDs1K1pFy2IBBbZf+K8bzztcwrCet9FvQLNTmaESvZprL/PM 58stpvzNaAccSJZ9RazwZEiCTFCIr4Hgc2gao7JO5ZBtoUIXzlWLt3R9kc9NHW3BmL1E D/oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PFdO1IFb7nHREoIMKuJxQUnPYfqQhmKfdkJlDTPz+ZQ=; b=Z9twKvBpO3htkODhpiHaQXCOdlcj2H8SWs2wLoaADeBWyWEvDXnSDMi6eAKumrnzUO pIgCr0eYa6ecZCnduJrUZm/ztDXCFUdMLKC2+7bfgp9k8gpSf5vV5ih9zHWcXqW7eXc/ 9tiEjT9MVi5IhZ7VIEVlW6f4rmW6hCXdciLacxM722maDIkQbJDcoBZxi0hwdjSiHgKX v8W1iM7HpZys8UehhkzmCKxRQo1jwESQGPcbP2PBlyJV1oBNAqyOR9www38rjIBpfZW/ 1+BbOHVhkpF1HehDT2r07jBBsDsXDU58xdCzWOEuOPB38zpbhzHWqYqfr0NJVRiu5P8E zJuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=tz9Wkcgc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hw7si16932819ejc.479.2021.07.06.17.58.14; Tue, 06 Jul 2021 17:58:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=tz9Wkcgc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229956AbhGGA77 (ORCPT + 99 others); Tue, 6 Jul 2021 20:59:59 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:43500 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229834AbhGGA76 (ORCPT ); Tue, 6 Jul 2021 20:59:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=PFdO1IFb7nHREoIMKuJxQUnPYfqQhmKfdkJlDTPz+ZQ=; b=tz9WkcgcRhBbek65RGv/T9WCEu hNwvIC6w94JsukHcQsCPX4aTw7ceYwS6/p3qF8h3pOaKZeQl+EsRN4cd6V5fC4o8WPAEc0RtidtDd EMQK9dRiaOhLD1BcicR85FQYS/tMCF+1V7NyIOZDuuklSbxZu71f3lOmv3SMlns0NBuo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1m0vsD-00CRuE-C5; Wed, 07 Jul 2021 02:57:09 +0200 Date: Wed, 7 Jul 2021 02:57:09 +0200 From: Andrew Lunn To: "Ismail, Mohammad Athari" Cc: "Ling, Pei Lee" , Heiner Kallweit , Russell King , "davem@davemloft.net" , Jakub Kicinski , Ioana Ciornei , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Voon, Weifeng" , "vee.khee.wong@linux.intel.com" , "Wong, Vee Khee" Subject: Re: [PATCH net] net: phy: skip disabling interrupt when WOL is enabled in shutdown Message-ID: References: <20210706090209.1897027-1-pei.lee.ling@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 07, 2021 at 12:36:30AM +0000, Ismail, Mohammad Athari wrote: > > > > -----Original Message----- > > From: Andrew Lunn > > Sent: Tuesday, July 6, 2021 9:14 PM > > To: Ling, Pei Lee > > Cc: Heiner Kallweit ; Russell King > > ; davem@davemloft.net; Jakub Kicinski > > ; Ioana Ciornei ; > > netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Voon, Weifeng > > ; vee.khee.wong@linux.intel.com; Wong, Vee Khee > > ; Ismail, Mohammad Athari > > > > Subject: Re: [PATCH net] net: phy: skip disabling interrupt when WOL is enabled > > in shutdown > > > > On Tue, Jul 06, 2021 at 05:02:09PM +0800, Ling Pei Lee wrote: > > > From: Mohammad Athari Bin Ismail > > > > > > PHY WOL requires WOL interrupt event to trigger the WOL signal in > > > order to wake up the system. Hence, the PHY driver should not disable > > > the interrupt during shutdown if PHY WOL is enabled. > > > > If the device is being used to wake the system up, why is it being shutdown? > > > > Hi Andrew, > > When the platform goes to S5 state (ex: shutdown -h now), regardless > PHY WOL is enabled or not, phy_shutdown() is called. So, for the > platform that support WOL from S5, we need to make sure the PHY > still can trigger WOL event. Disabling the interrupt through > phy_disable_interrupts() in phy_shutdown() will disable WOL > interrupt as well and cause the PHY WOL not able to trigger. This sounds like a firmware problem. If linux is shutdown, linux is not controlling the hardware, the firmware is. So the firmware should probably be configuring the PHY after Linux powers off. If Linux is suspended, then Linux is still controlling the hardware, and it will not shutdown the PHY. Andrew