Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp42407pxv; Wed, 7 Jul 2021 19:50:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/fM2iGk2D1KHlw7Ni6L5KMnI99eiNwTRe/TaOS+yLXPHDdf1TcaVV3ljLSmvUcCle2NU1 X-Received: by 2002:a6b:f60e:: with SMTP id n14mr22589150ioh.179.1625712658408; Wed, 07 Jul 2021 19:50:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625712658; cv=none; d=google.com; s=arc-20160816; b=KWXWhQK7zlY6oID/DYlegF8fKT0Gp3+WzZlBc9/cXQ0Zsv4G7X22hd0+zahDdbqfQO qwTY4ANTzU/rl5oWzuPZqFsTbU5AE4Hw3pqBrBxdGYct8xCm5Ng6Y1riqEpbbI3CU1QY 5BNYyeuLAKgwsd5gmVPC3nc12OtlbSlyAHs2Ybw1offZ2snpBXbH8II5CgK4CPeetRU5 xaEOq0FAvfQ8Exvz15+ta4nOkXYonXMDJ9pbrCAFOfYd96bozUjNyvXv4Ku2dQLYncb5 bGk+QDj5JZxwnAPyhmfJzr6xAz18o0OdgVLYEbvbvQX0kDff8K7tkWeItCmt8LgZ6jR7 wkkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=LLrZ4lTpT4PEvSU3gdKzg7LM4Q2Cp5vNhAVdG3/aQjY=; b=02r36nQgtInKBAp0oQiezwmAePasfjmVzkcu/iLhyrnDIASHCvQc78PNjuutEkDv7E 9U40wzaQ0wNwnLBwY9603Ost3PlF2NtFp6AvuvYJ/ESkXeTYU+xx9wtGGDejjy/8HBL7 r2Ew5XTUVOZ8XogB3tpJuGgHtp8glmvj78uHiSe+sVXvbB7RWZLNhCaVlttLVmDLyLRZ agwRbFXgTHe9FdAb7jsNo4mEOsASBVKdOiGHhalrymqAIrcIbvn+Mb4b9OH3MWRTxtcY JBKSVmgCFmMKY6sXiiwEHvPWFJd9FKK+PNinZSKXLFRWfgqgydHWhZVOyB9qRzn5G0+F AyfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jyedqtdG; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g17si930586ilc.133.2021.07.07.19.50.20; Wed, 07 Jul 2021 19:50:58 -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=@gmail.com header.s=20161025 header.b=jyedqtdG; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230266AbhGHCv2 (ORCPT + 99 others); Wed, 7 Jul 2021 22:51:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230195AbhGHCv2 (ORCPT ); Wed, 7 Jul 2021 22:51:28 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30E14C061574; Wed, 7 Jul 2021 19:48:47 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id t9so4429169pgn.4; Wed, 07 Jul 2021 19:48:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=LLrZ4lTpT4PEvSU3gdKzg7LM4Q2Cp5vNhAVdG3/aQjY=; b=jyedqtdGm3wvc522gvEi2b4S3HVvgIylzg7YEv8XdcknfvzIREqlMGxSzg2aqhCRA0 7UzvpoisARucy2cR5nEbBdlIh91sRfm+KSIeBZnoBfN/4FFjYOER+Wwckw7GYq4jOq9I LnP/ekV9zCjMyhGeeALWi+ItJxIMXXoOtjhIO/ovDMvU2yZwNCIfE7jsFtsb8hy53LV8 G3S3DT7v8WC61mOhdeJRdvXz4DVkNcOlbFyn7HhEQlFu5DaBzUDDB0QwQJh7ScBLS99m HA5jEhVLtGZ20P7DgaukMeplc+zh4uz1gAgnQOrDHRdZ6vW2fYFiKKiv6NFcopTIazMg ODMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LLrZ4lTpT4PEvSU3gdKzg7LM4Q2Cp5vNhAVdG3/aQjY=; b=Jcsr/s5vps7hMNFZt/vxcjuRxCrlJmxYBhAm4WSWe6LHbwdZJGU245GDiZ+rEEVlyP 6Qmr2/kEJoB4akhI0F0IcTPiSqofLCgIbUXRG15rgK1l00+ZfbEftkbX3XD/9lufPy2b RzSnzkHgCtiYYT2R6TYIG4Xg/Th2Eraer6pkF9G/qd/rgnA1bj5bNaglOkuRmH3yoBMu jxLtk9tIgfLLFepMLxXPh+ARPivWGR+wIBA/6GyHb3KQiir2LJDIBZX7w1Ms+Rmo0h1w ec3x9uO587CU3cQc8hoSUUmSzqLGP7AKPlnrvN8oRKDdDVCqH17dAPKN9OC8nTX1FwnQ 6/fQ== X-Gm-Message-State: AOAM532nIygQy1wyatRulG8vEZW28wvnqf+mob+NENTkazFGEJaaSq5R /wMVyqZTwLJLgeTX+P4QI1RIbnrwuGY= X-Received: by 2002:a05:6a00:1709:b029:308:747d:b7be with SMTP id h9-20020a056a001709b0290308747db7bemr29167852pfc.41.1625712526020; Wed, 07 Jul 2021 19:48:46 -0700 (PDT) Received: from [192.168.1.121] (99-44-17-11.lightspeed.irvnca.sbcglobal.net. [99.44.17.11]) by smtp.gmail.com with ESMTPSA id n23sm504945pjq.2.2021.07.07.19.48.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Jul 2021 19:48:45 -0700 (PDT) Subject: Re: [PATCH net] net: phy: reconfigure PHY WOL in resume if WOL option still enabled To: Andrew Lunn , mohammad.athari.ismail@intel.com Cc: Heiner Kallweit , "David S . Miller" , Russell King , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210708004253.6863-1-mohammad.athari.ismail@intel.com> From: Florian Fainelli Message-ID: <4e159b98-ec02-33b7-862a-0e35832c3a5f@gmail.com> Date: Wed, 7 Jul 2021 19:48:39 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/7/2021 6:23 PM, Andrew Lunn wrote: > On Thu, Jul 08, 2021 at 08:42:53AM +0800, mohammad.athari.ismail@intel.com wrote: >> From: Mohammad Athari Bin Ismail >> >> When the PHY wakes up from suspend through WOL event, there is a need to >> reconfigure the WOL if the WOL option still enabled. The main operation >> is to clear the WOL event status. So that, subsequent WOL event can be >> triggered properly. >> >> This fix is needed especially for the PHY that operates in PHY_POLL mode >> where there is no handler (such as interrupt handler) available to clear >> the WOL event status. > > I still think this architecture is wrong. > > The interrupt pin is wired to the PMIC. Can the PMIC be modelled as an > interrupt controller? That would allow the interrupt to be handled as > normal, and would mean you don't need polling, and you don't need this > hack. I have to agree with Andrew here, and if the answer is that you cannot model this PMIC as an interrupt controller, cannot the config_init() callback of the driver acknowledge then disable the interrupts as it normally would if you were cold booting the system? This would also allow you to properly account for the PHY having woken-up the system. -- Florian