Skip to content

Commit

Permalink
net: dp83822: Print the SOR1 strap status
Browse files Browse the repository at this point in the history
During the bring-up of the Ethernet PHY, it is very useful to
see the bootstrap status information, as it can help identifying
hardware bootstrap mistakes.

Allow printing the SOR1 register, which contains the strap status
to ease the bring-up.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20221025120109.779337-1-festevam@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Fabio Estevam authored and Paolo Abeni committed Oct 27, 2022
1 parent 28581b9 commit c926b4c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/phy/dp83822.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,8 @@ static int dp83822_read_straps(struct phy_device *phydev)
if (val < 0)
return val;

phydev_dbg(phydev, "SOR1 strap register: 0x%04x\n", val);

fx_enabled = (val & DP83822_COL_STRAP_MASK) >> DP83822_COL_SHIFT;
if (fx_enabled == DP83822_STRAP_MODE2 ||
fx_enabled == DP83822_STRAP_MODE3)
Expand Down

0 comments on commit c926b4c

Please sign in to comment.