From: <nicolas.ferre@microchip.com> To: <linux-arm-kernel@lists.infradead.org>, <netdev@vger.kernel.org>, "Claudiu Beznea" <claudiu.beznea@microchip.com>, <harini.katakam@xilinx.com> Cc: <linux-kernel@vger.kernel.org>, "David S. Miller" <davem@davemloft.net>, Alexandre Belloni <alexandre.belloni@bootlin.com>, <antoine.tenart@bootlin.com>, <f.fainelli@gmail.com>, <linux@armlinux.org.uk>, <andrew@lunn.ch>, <michal.simek@xilinx.com>, "Nicolas Ferre" <nicolas.ferre@microchip.com> Subject: [PATCH v3 1/7] net: macb: fix wakeup test in runtime suspend/resume routines Date: Mon, 4 May 2020 15:44:16 +0200 [thread overview] Message-ID: <760ececd082c834c1ab4b1b410c605cc10bb6224.1588597759.git.nicolas.ferre@microchip.com> (raw) In-Reply-To: <cover.1588597759.git.nicolas.ferre@microchip.com> From: Nicolas Ferre <nicolas.ferre@microchip.com> Use the proper struct device pointer to check if the wakeup flag and wakeup source are positioned. Use the one passed by function call which is equivalent to &bp->dev->dev.parent. It's preventing the trigger of a spurious interrupt in case the Wake-on-Lan feature is used. Fixes: bc1109d04c39 ("net: macb: Add pm runtime support") Cc: Claudiu Beznea <claudiu.beznea@microchip.com> Cc: Harini Katakam <harini.katakam@xilinx.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com> --- drivers/net/ethernet/cadence/macb_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index a0e8c5bbabc0..d1b4d6b6d7c8 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -4616,7 +4616,7 @@ static int __maybe_unused macb_runtime_suspend(struct device *dev) struct net_device *netdev = dev_get_drvdata(dev); struct macb *bp = netdev_priv(netdev); - if (!(device_may_wakeup(&bp->dev->dev))) { + if (!(device_may_wakeup(dev))) { clk_disable_unprepare(bp->tx_clk); clk_disable_unprepare(bp->hclk); clk_disable_unprepare(bp->pclk); @@ -4632,7 +4632,7 @@ static int __maybe_unused macb_runtime_resume(struct device *dev) struct net_device *netdev = dev_get_drvdata(dev); struct macb *bp = netdev_priv(netdev); - if (!(device_may_wakeup(&bp->dev->dev))) { + if (!(device_may_wakeup(dev))) { clk_prepare_enable(bp->pclk); clk_prepare_enable(bp->hclk); clk_prepare_enable(bp->tx_clk); -- 2.26.2
WARNING: multiple messages have this Message-ID (diff)
From: <nicolas.ferre@microchip.com> To: <linux-arm-kernel@lists.infradead.org>, <netdev@vger.kernel.org>, "Claudiu Beznea" <claudiu.beznea@microchip.com>, <harini.katakam@xilinx.com> Cc: andrew@lunn.ch, Alexandre Belloni <alexandre.belloni@bootlin.com>, f.fainelli@gmail.com, michal.simek@xilinx.com, antoine.tenart@bootlin.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, "David S. Miller" <davem@davemloft.net> Subject: [PATCH v3 1/7] net: macb: fix wakeup test in runtime suspend/resume routines Date: Mon, 4 May 2020 15:44:16 +0200 [thread overview] Message-ID: <760ececd082c834c1ab4b1b410c605cc10bb6224.1588597759.git.nicolas.ferre@microchip.com> (raw) In-Reply-To: <cover.1588597759.git.nicolas.ferre@microchip.com> From: Nicolas Ferre <nicolas.ferre@microchip.com> Use the proper struct device pointer to check if the wakeup flag and wakeup source are positioned. Use the one passed by function call which is equivalent to &bp->dev->dev.parent. It's preventing the trigger of a spurious interrupt in case the Wake-on-Lan feature is used. Fixes: bc1109d04c39 ("net: macb: Add pm runtime support") Cc: Claudiu Beznea <claudiu.beznea@microchip.com> Cc: Harini Katakam <harini.katakam@xilinx.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com> --- drivers/net/ethernet/cadence/macb_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index a0e8c5bbabc0..d1b4d6b6d7c8 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -4616,7 +4616,7 @@ static int __maybe_unused macb_runtime_suspend(struct device *dev) struct net_device *netdev = dev_get_drvdata(dev); struct macb *bp = netdev_priv(netdev); - if (!(device_may_wakeup(&bp->dev->dev))) { + if (!(device_may_wakeup(dev))) { clk_disable_unprepare(bp->tx_clk); clk_disable_unprepare(bp->hclk); clk_disable_unprepare(bp->pclk); @@ -4632,7 +4632,7 @@ static int __maybe_unused macb_runtime_resume(struct device *dev) struct net_device *netdev = dev_get_drvdata(dev); struct macb *bp = netdev_priv(netdev); - if (!(device_may_wakeup(&bp->dev->dev))) { + if (!(device_may_wakeup(dev))) { clk_prepare_enable(bp->pclk); clk_prepare_enable(bp->hclk); clk_prepare_enable(bp->tx_clk); -- 2.26.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-05-04 13:47 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-04 13:44 [PATCH v3 0/7] net: macb: Wake-on-Lan magic packet fixes and GEM handling nicolas.ferre 2020-05-04 13:44 ` nicolas.ferre 2020-05-04 13:44 ` nicolas.ferre [this message] 2020-05-04 13:44 ` [PATCH v3 1/7] net: macb: fix wakeup test in runtime suspend/resume routines nicolas.ferre 2020-05-04 13:44 ` [PATCH v3 2/7] net: macb: mark device wake capable when "magic-packet" property present nicolas.ferre 2020-05-04 13:44 ` nicolas.ferre 2020-05-04 13:44 ` [PATCH v3 3/7] net: macb: fix macb_get/set_wol() when moving to phylink nicolas.ferre 2020-05-04 13:44 ` nicolas.ferre 2020-05-04 13:44 ` [PATCH v3 4/7] net: macb: fix macb_suspend() by removing call to netif_carrier_off() nicolas.ferre 2020-05-04 13:44 ` nicolas.ferre 2020-05-04 13:44 ` [PATCH v3 5/7] net: macb: fix call to pm_runtime in the suspend/resume functions nicolas.ferre 2020-05-04 13:44 ` nicolas.ferre 2020-05-04 13:44 ` [PATCH v3 6/7] net: macb: WoL support for GEM type of Ethernet controller nicolas.ferre 2020-05-04 13:44 ` nicolas.ferre 2020-05-04 13:44 ` [PATCH v3 7/7] net: macb: Add WoL interrupt support for MACB " nicolas.ferre 2020-05-04 13:44 ` nicolas.ferre 2020-05-04 18:07 ` [PATCH v3 0/7] net: macb: Wake-on-Lan magic packet fixes and GEM handling David Miller 2020-05-04 18:07 ` David Miller
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=760ececd082c834c1ab4b1b410c605cc10bb6224.1588597759.git.nicolas.ferre@microchip.com \ --to=nicolas.ferre@microchip.com \ --cc=alexandre.belloni@bootlin.com \ --cc=andrew@lunn.ch \ --cc=antoine.tenart@bootlin.com \ --cc=claudiu.beznea@microchip.com \ --cc=davem@davemloft.net \ --cc=f.fainelli@gmail.com \ --cc=harini.katakam@xilinx.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux@armlinux.org.uk \ --cc=michal.simek@xilinx.com \ --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 an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.