From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
Russell King - ARM Linux <linux@armlinux.org.uk>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
David Miller <davem@davemloft.net>,
Paolo Abeni <pabeni@redhat.com>, Chris Healy <cphealy@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH net-next v2 4/7] net: phy: smsc: add flag edpd_mode_set_by_user
Date: Sun, 2 Apr 2023 17:13:35 +0200 [thread overview]
Message-ID: <61a0a91a-2743-52f0-e034-e256415c082f@gmail.com> (raw)
In-Reply-To: <d0e999eb-d148-a5c1-df03-9b4522b9f2fd@gmail.com>
Add flag edpd_mode_set_by_user in preparation of adding edpd phy tunable
support. This flag will allow users to override the default behavior
of edpd being disabled if interrupt mode is used.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/phy/smsc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
index f5ecd8bea..25b9cd474 100644
--- a/drivers/net/phy/smsc.c
+++ b/drivers/net/phy/smsc.c
@@ -45,6 +45,7 @@ static struct smsc_hw_stat smsc_hw_stats[] = {
struct smsc_phy_priv {
unsigned int edpd_enable:1;
+ unsigned int edpd_mode_set_by_user:1;
};
static int smsc_phy_ack_interrupt(struct phy_device *phydev)
@@ -117,7 +118,8 @@ int smsc_phy_config_init(struct phy_device *phydev)
if (!priv)
return 0;
- if (phydev->irq != PHY_POLL)
+ /* don't use EDPD in irq mode except overridden by user */
+ if (!priv->edpd_mode_set_by_user && phydev->irq != PHY_POLL)
priv->edpd_enable = false;
return smsc_phy_config_edpd(phydev);
--
2.40.0
next prev parent reply other threads:[~2023-04-02 15:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-02 15:10 [PATCH net-next v2 0/7] net: phy: smsc: add support for edpd tunable Heiner Kallweit
2023-04-02 15:11 ` [PATCH net-next v2 1/7] net: phy: smsc: rename flag energy_enable Heiner Kallweit
2023-04-02 16:40 ` Simon Horman
2023-04-02 15:12 ` [PATCH net-next v2 2/7] net: phy: smsc: add helper smsc_phy_config_edpd Heiner Kallweit
2023-04-02 16:41 ` Simon Horman
2023-04-02 15:13 ` [PATCH net-next v2 3/7] net: phy: smsc: clear edpd_enable if interrupt mode is used Heiner Kallweit
2023-04-02 16:41 ` Simon Horman
2023-04-02 15:13 ` Heiner Kallweit [this message]
2023-04-02 16:43 ` [PATCH net-next v2 4/7] net: phy: smsc: add flag edpd_mode_set_by_user Simon Horman
2023-04-02 15:14 ` [PATCH net-next v2 5/7] net: phy: smsc: prepare for making edpd wait period configurable Heiner Kallweit
2023-04-02 16:43 ` Simon Horman
2023-04-02 15:16 ` [PATCH net-next v2 6/7] net: phy: smsc: add support for edpd tunable Heiner Kallweit
2023-04-02 16:43 ` Simon Horman
2023-04-02 15:17 ` [PATCH net-next v2 7/7] net: phy: smsc: enable edpd tunable support Heiner Kallweit
2023-04-02 16:44 ` Simon Horman
2023-04-03 9:20 ` [PATCH net-next v2 0/7] net: phy: smsc: add support for edpd tunable patchwork-bot+netdevbpf
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=61a0a91a-2743-52f0-e034-e256415c082f@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew@lunn.ch \
--cc=cphealy@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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: link
Be 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.