From: Simon Horman <simon.horman@corigine.com>
To: Tristram.Ha@microchip.com
Cc: Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, UNGLinuxDriver@microchip.com
Subject: Re: [PATCH v1 net-next] net: phy: smsc: add WoL support to LAN8740/LAN8742 PHYs
Date: Fri, 9 Jun 2023 14:19:17 +0200 [thread overview]
Message-ID: <ZIMYxaANiLvd0blQ@corigine.com> (raw)
In-Reply-To: <1686274280-2994-1-git-send-email-Tristram.Ha@microchip.com>
On Thu, Jun 08, 2023 at 06:31:20PM -0700, Tristram.Ha@microchip.com wrote:
...
> diff --git a/include/linux/smscphy.h b/include/linux/smscphy.h
> index e1c88627755a..1a6a851d2cf8 100644
> --- a/include/linux/smscphy.h
> +++ b/include/linux/smscphy.h
> @@ -38,4 +38,38 @@ int smsc_phy_set_tunable(struct phy_device *phydev,
> struct ethtool_tunable *tuna, const void *data);
> int smsc_phy_probe(struct phy_device *phydev);
>
> +#define MII_LAN874X_PHY_MMD_WOL_WUCSR 0x8010
> +#define MII_LAN874X_PHY_MMD_WOL_WUF_CFGA 0x8011
> +#define MII_LAN874X_PHY_MMD_WOL_WUF_CFGB 0x8012
> +#define MII_LAN874X_PHY_MMD_WOL_WUF_MASK0 0x8021
> +#define MII_LAN874X_PHY_MMD_WOL_WUF_MASK1 0x8022
> +#define MII_LAN874X_PHY_MMD_WOL_WUF_MASK2 0x8023
> +#define MII_LAN874X_PHY_MMD_WOL_WUF_MASK3 0x8024
> +#define MII_LAN874X_PHY_MMD_WOL_WUF_MASK4 0x8025
> +#define MII_LAN874X_PHY_MMD_WOL_WUF_MASK5 0x8026
> +#define MII_LAN874X_PHY_MMD_WOL_WUF_MASK6 0x8027
> +#define MII_LAN874X_PHY_MMD_WOL_WUF_MASK7 0x8028
> +#define MII_LAN874X_PHY_MMD_WOL_RX_ADDRA 0x8061
> +#define MII_LAN874X_PHY_MMD_WOL_RX_ADDRB 0x8062
> +#define MII_LAN874X_PHY_MMD_WOL_RX_ADDRC 0x8063
> +#define MII_LAN874X_PHY_MMD_MCFGR 0x8064
> +
> +#define MII_LAN874X_PHY_PME1_SET (2 << 13)
> +#define MII_LAN874X_PHY_PME2_SET (2 << 11)
Hi Tristram,
you could consider using GENMASK for the above.
> +#define MII_LAN874X_PHY_PME_SELF_CLEAR BIT(9)
> +#define MII_LAN874X_PHY_WOL_PFDA_FR BIT(7)
> +#define MII_LAN874X_PHY_WOL_WUFR BIT(6)
> +#define MII_LAN874X_PHY_WOL_MPR BIT(5)
> +#define MII_LAN874X_PHY_WOL_BCAST_FR BIT(4)
> +#define MII_LAN874X_PHY_WOL_PFDAEN BIT(3)
> +#define MII_LAN874X_PHY_WOL_WUEN BIT(2)
> +#define MII_LAN874X_PHY_WOL_MPEN BIT(1)
> +#define MII_LAN874X_PHY_WOL_BCSTEN BIT(0)
> +
> +#define MII_LAN874X_PHY_WOL_FILTER_EN BIT(15)
> +#define MII_LAN874X_PHY_WOL_FILTER_MCASTTEN BIT(9)
> +#define MII_LAN874X_PHY_WOL_FILTER_BCSTEN BIT(8)
> +
> +#define MII_LAN874X_PHY_PME_SELF_CLEAR_DELAY 0x1000 /* 81 milliseconds */
> +
> #endif /* __LINUX_SMSCPHY_H__ */
next prev parent reply other threads:[~2023-06-09 12:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 1:31 [PATCH v1 net-next] net: phy: smsc: add WoL support to LAN8740/LAN8742 PHYs Tristram.Ha
2023-06-09 4:36 ` kernel test robot
2023-06-09 12:19 ` Simon Horman [this message]
2023-06-09 20:17 ` Tristram.Ha
2023-06-12 7:58 ` Simon Horman
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=ZIMYxaANiLvd0blQ@corigine.com \
--to=simon.horman@corigine.com \
--cc=Tristram.Ha@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.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: 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.