From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F060C07E9B for ; Wed, 7 Jul 2021 00:57:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 204E461CAA for ; Wed, 7 Jul 2021 00:57:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230008AbhGGBAA (ORCPT ); Tue, 6 Jul 2021 21:00:00 -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