[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <39f9fa02-7fa9-4246-aaa5-2f14d6319f90@lunn.ch>
Date: Mon, 28 Apr 2025 14:53:55 +0200
From: Andrew Lunn <andrew@...n.ch>
To: daniel.braunwarth@...a.com
Cc: Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: phy: realtek: Add support for WOL magic
packet on RTL8211F
> +static void rtl8211f_get_wol(struct phy_device *dev, struct ethtool_wolinfo *wol)
> +{
> + struct rtl821x_priv *priv = dev->priv;
> +
> + wol->supported = WAKE_MAGIC;
> + wol->wolopts = priv->saved_wolopts;
Can the current configuration be read from the hardware, rather than
using a cached value. The BIOS could for example enable magic packet,
and Linux inherits it.
> +static int rtl8211f_set_wol(struct phy_device *dev, struct ethtool_wolinfo *wol)
> +{
> + struct rtl821x_priv *priv = dev->priv;
> + const u8 *mac_addr = dev->attached_dev->dev_addr;
> + int oldpage;
> +
> + oldpage = phy_save_page(dev);
> + if (oldpage < 0)
> + goto err;
> +
> + if (wol->wolopts & WAKE_MAGIC) {
> + /* Store the device address for the magic packet */
> + rtl821x_write_page(dev, 0xd8c);
Does the datasheet have names for these magic values? Please add
#defines.
Andrew
Powered by blists - more mailing lists