Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5949761pxj; Wed, 23 Jun 2021 12:38:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0agzDBKmk40/orlBdmiI7hTMKT2g+JyiO8seIaEodChoYW+Cl9VSmROxsEaBy5ccBMjcu X-Received: by 2002:a17:906:3b13:: with SMTP id g19mr1637924ejf.360.1624477101972; Wed, 23 Jun 2021 12:38:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624477101; cv=none; d=google.com; s=arc-20160816; b=ZMJlKlKNJCAfamPfiaDnbz+UBzPrtpryC7F4LzLo1xkoC+KHrXPhVjspyXqT0EZGnf fdH7MHYhdI4B77NmUJTkZ7cEnSEIi8robk8GLoSN0/cotTFmSJiSL9ZvpR99X2k7BZQK jtldjacPSxFHH1pqexiIH8VsJ+NEBAefcx5qd7dLf9ukzCDWd6bfBZtKscevxkPo42at r3psTuETwRRa6S1x9yXyi8vBOgpzp/tnYB5fFmjEI7ZjLgVorxyOL+KHJ+rAozNdLG/e 8jmFJnodSLrzk7DuE0VEJjRNggcZAE7U4B1ijs9KRSNU0/hRPYnphSz0Ahj+Pjq5w6ZV WpcQ== 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=T13J8AAOzye0vPE72zOkmKwgCqb3X8Y2nKlK460R0cY=; b=cFDApKX1yftYTdttUGSV6zqLfkG/VE2XpwTT2BreTx2I3NwqbgQuKlcrHqK1ubPGML qzYmTTddf1qpDGpt0W/HgWD/w8vyt6MjFyKggLO4ixudS0mdj3fAmPmRBCab24ywRZUb KK2sZseqneAC9mjEFuGGYOCV8bRPE1XfR2gNZL5AS2ZymB5xsWQGtYNEtk5XvPiUbAjz +th0E0y+m05kiX4pOXyi5+3HtGeRiavb04/mc/uZbt3TIlA3Zl2MJbtELeuGqshe80vV vgs8e8Mj0zeA1T4ZQuZlnd/iZfKd2t/dq5huzKME0IFHwOLSNJw3MTr74emtiHLtJOPg ctdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=l4RlYytU; 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 zp23si580265ejb.664.2021.06.23.12.37.59; Wed, 23 Jun 2021 12:38:21 -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=l4RlYytU; 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 S229928AbhFWTjP (ORCPT + 99 others); Wed, 23 Jun 2021 15:39:15 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:52276 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbhFWTjN (ORCPT ); Wed, 23 Jun 2021 15:39:13 -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=T13J8AAOzye0vPE72zOkmKwgCqb3X8Y2nKlK460R0cY=; b=l4RlYytU80yLAKSl4Xth6DXqf0 BmquKFSwgp7FHexz1xEs42MFaZDR7EFJin0KXyMgWtuFumuVvBbjJAiTkC6JAmrbMfFEdml5XNu8v 16qklndSkA1nzTKlhrYx6jhQk9vtS7dIJRn+GFIut7ZrfiZnRRzOHU918mhAh8bWEwDw=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1lw8fl-00AsjI-68; Wed, 23 Jun 2021 21:36:29 +0200 Date: Wed, 23 Jun 2021 21:36:29 +0200 From: Andrew Lunn To: "Voon, Weifeng" Cc: "Ling, Pei Lee" , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Jakub Kicinski , Maxime Coquelin , Russell King , "Ong, Boon Leong" , Wong Vee Khee , "Wong, Vee Khee" , "Tan, Tee Min" , "Sit, Michael Wei Hong" , "netdev@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH net-next V1 3/4] net: stmmac: Reconfigure the PHY WOL settings in stmmac_resume() Message-ID: References: <20210621094536.387442-1-pei.lee.ling@intel.com> <20210621094536.387442-4-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, Jun 23, 2021 at 10:06:44AM +0000, Voon, Weifeng wrote: > > > From: Muhammad Husaini Zulkifli > > > > > > After PHY received a magic packet, the PHY WOL event will be triggered > > > then PHY WOL event interrupt will be disarmed. > > > Ethtool settings will remain with WOL enabled after a S3/S4 suspend > > > resume cycle as expected. Hence,the driver should reconfigure the PHY > > > settings to reenable/disable WOL depending on the ethtool WOL settings > > > in the resume flow. > > > > Please could you explain this a bit more? I'm wondering if you have a > > PHY driver bug. PHY WOL should remain enabled until it is explicitly > > disabled. > > > > Andrew > > Let's take Marvell 1510 as example. > > As explained in driver/net/phy/marvell.c > 1773 >------->-------/* If WOL event happened once, the LED[2] interrupt pin > 1774 >------->------- * will not be cleared unless we reading the interrupt status > 1775 >------->------- * register. > > The WOL event will not able trigger again if the driver does not clear > the interrupt status. > Are we expecting PHY driver will automatically clears the interrupt > status rather than trigger from the MAC driver? So you are saying the interrupt it getting discarded? I would of though it is this interrupt which brings to system out of suspend, and it should trigger the usual action, i.e. call the interrupt handler. That should then clear the interrupt. Andrew