History

net: phy: fix autoneg mismatch case in genphy_read_status

The original patch didn't consider the case that autoneg process finishes successfully but both link partners have no mode in common. In this case there's no link, nevertheless we may be interested in what the link partner advertised. Like phydev->link we set phydev->autoneg_complete in genphy_update_link() and use the stored value in genphy_read_status(). This way we don't have to read register BMSR again.

Heiner Kallweit committed 7 years ago

Commit 4950c2b1 parent 49ffba32 files · +4 −5Browse files

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

Unified · Split

include/linux/phy.h+1−0
@@ -390,6 +390,7 @@ struct phy_device { · 389 unmodified lines
390390 unsigned autoneg:1;
391391 /* The most recently read link state */
392392 unsigned link:1;
393+ unsigned autoneg_complete:1;
393394
394395 /* Interrupts are enabled */
395396 unsigned interrupts:1;

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