History

net: phy: improve resuming from hibernation

I got an interesting report [0] that after resuming from hibernation the link has 100Mbps instead of 1Gbps. Reason is that another OS has been used whilst Linux was hibernated. And this OS speeds down the link due to WoL. Therefore, when resuming, we shouldn't expect that what the PHY advertises is what it did when hibernating. Easiest way to do this is removing state PHY_RESUMING. Instead always go via PHY_UP that configures PHY advertisement. [0] https://bugzilla.kernel.org/show_bug.cgi?id=202851

Heiner Kallweit committed 7 years ago

Commit f24098f1 parent 22c0ef62 files · +2 −14Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/phy.h+1−8
@@ -308,13 +308,7 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr); · 307 unmodified lines
308308 *
309309 * HALTED: PHY is up, but no polling or interrupts are done. Or
310310 * PHY is in an error state.
311− *
312− * - phy_start moves to RESUMING
313− *
314− * RESUMING: PHY was halted, but now wants to run again.
315− * - If we are forcing, or aneg is done, timer moves to RUNNING
316− * - If aneg is not done, timer moves to AN
317− * - phy_stop moves to HALTED
311+ * - phy_start moves to UP
318312 */
319313 enum phy_state {
320314 PHY_DOWN = 0,
@@ -324,7 +318,6 @@ enum phy_state { · 3 unmodified lines
324318 PHY_RUNNING,
325319 PHY_NOLINK,
326320 PHY_FORCING,
327− PHY_RESUMING
328321 };
329322
330323 /**

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t