LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: "Song, Yoong Siang" <yoong.siang.song@intel.com> To: Russell King <linux@armlinux.org.uk> Cc: "Andrew Lunn" <andrew@lunn.ch>, "Marek Behún" <kabel@kernel.org>, "Heiner Kallweit" <hkallweit1@gmail.com>, "David S . Miller" <davem@davemloft.net>, "Jakub Kicinski" <kuba@kernel.org>, "netdev@vger.kernel.org" <netdev@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: RE: [PATCH net-next 1/1] net: phy: marvell10g: Add WAKE_PHY support to WOL event Date: Mon, 16 Aug 2021 08:56:36 +0000 [thread overview] Message-ID: <PH0PR11MB49509E7A82947DCB6BB48203D8FD9@PH0PR11MB4950.namprd11.prod.outlook.com> (raw) In-Reply-To: <20210816081812.GH22278@shell.armlinux.org.uk> > On Mon, Aug 16, 2021 at 08:03:59AM +0000, Song, Yoong Siang wrote: > > Thanks for your explanation. I understand your concern better now. > > > > In the case of WoL hasn't been enabled through a set_wol call, the PHY > > will be suspended, so we no need worry the link change interrupt will > > create an undesired WoL event. > > > > In the case of set_wol is called to disable WAKE_PHY event, we can > > keep the link change interrupt enable, so that it won't affect the > > interrupt support. > > I think you're missing the point. In your get_wol method for this > PHY: > > + ret = phy_read_mmd(phydev, MDIO_MMD_PCS, > MV_PCS_INTR_ENABLE); > + if (ret < 0) > + return; > + > + if (ret & MV_PCS_INTR_ENABLE_LSC) > + wol->wolopts |= WAKE_PHY; > > If the link change interrupt is enabled because we want to use interrupt > support, the above code has the effect of reporting to userspace that WoL is > enabled, even when nothing has requested WoL to be enabled. > > This also has the effect of preventing the PHY being suspended (see > phy_suspend()) and in effect means that WoL is enabled, even though > set_wol() was not called. > Yes, you are right. I missed the effect of get_wol. Is it needed in future to implement link change interrupt in phy driver? Cause I dint see much phy driver implement link change interrupt. > -- > RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ > FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2021-08-16 8:56 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-13 8:45 [PATCH net-next 1/1] net: phy: marvell10g: Add WAKE_PHY support to WOL event Song Yoong Siang 2021-08-14 17:19 ` Marek Behún 2021-08-14 17:26 ` Russell King (Oracle) 2021-08-14 18:04 ` Andrew Lunn 2021-08-14 19:49 ` Russell King (Oracle) 2021-08-16 3:52 ` Song, Yoong Siang 2021-08-16 4:15 ` Andrew Lunn 2021-08-16 5:40 ` Song, Yoong Siang 2021-08-16 7:14 ` Russell King (Oracle) 2021-08-16 8:03 ` Song, Yoong Siang 2021-08-16 8:18 ` Russell King (Oracle) 2021-08-16 8:56 ` Song, Yoong Siang [this message] 2021-08-16 9:54 ` Marek Behún 2021-08-16 15:02 ` Song, Yoong Siang 2021-08-16 15:27 ` Andrew Lunn 2021-08-20 1:22 ` Song, Yoong Siang 2021-08-16 3:19 ` Song, Yoong Siang 2021-08-16 4:10 ` Andrew Lunn
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=PH0PR11MB49509E7A82947DCB6BB48203D8FD9@PH0PR11MB4950.namprd11.prod.outlook.com \ --to=yoong.siang.song@intel.com \ --cc=andrew@lunn.ch \ --cc=davem@davemloft.net \ --cc=hkallweit1@gmail.com \ --cc=kabel@kernel.org \ --cc=kuba@kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux@armlinux.org.uk \ --cc=netdev@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).