mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
86b66cb8d17872731f2546a886f23280ba952006
Russell King says: ==================== net: add phylink managed WoL and convert stmmac This series is implementing the thoughts of Andrew, Florian and myself to improve the quality of Wake-on-Lan (WoL) implementations. This changes nothing for MAC drivers that do not wish to participate in this, but if they do, then they gain the benefit of phylink configuring WoL at the point closest to the media as possible. We first need to solve the problem that the multitude of PHY drivers report their device supports WoL, but are not capable of waking the system. Correcting this is fundamental to choosing where WoL should be enabled - a mis-reported WoL support can render WoL completely ineffective. The only PHY drivers which uses the driver model's wakeup support is drivers/net/phy/broadcom.c, and until recently, realtek. This means we have the opportunity for PHY drivers to be _correctly_ converted to use this method of signalling wake-up capability only when they can actually wake the system, and thus providing a way for phylink to know whether to use PHY-based WoL at all. However, a PHY driver not implementing that logic doesn't become a blocker to MACs wanting to convert. In full, the logic is: - phylink supports a flag, wol_phy_legacy, which forces phylink to use the PHY-based WoL even if the MDIO device is not marked as wake-up capable. - when wol_phy_legacy is not set, we check whether the PHY MDIO device is wake-up capable. If it is, we offer the WoL request to the PHY. - if neither wol_phy_legacy is set, or the PHY is not wake-up capable, we do not offer the WoL request to the PHY. In both cases, after setting any PHY based WoL, we remove the options that the PHY now reports are enabled from the options mask, and offer these (if any) to the MAC. The mac will get a "mac_set_wol()" method call when any settings change. Phylink mainatains the WoL state for the MAC, so there's no need for a "mac_get_wol()" method. There may be the need to set the initial state but this is not supported at present. I've also added support for doing the PHY speed-up/speed-down at suspend/resume time depending on the WoL state, which takes another issue from the MAC authors. Lastly, with phylink now having the full picture for WoL, the "mac_wol" argument for phylink_suspend() becomes redundant, and for MAC drivers that implement mac_set_wol(), the value passed becomes irrelevant. ==================== Link: https://patch.msgid.link/aPnyW54J80h9DmhB@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Linux kernel
============
There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.
In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``. The formatted documentation can also be read online at:
https://www.kernel.org/doc/html/latest/
There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.
Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
Languages
C
97.1%
Assembly
1%
Shell
0.6%
Rust
0.4%
Python
0.4%
Other
0.3%