Message ID | E1t1P3h-000EK9-NO@rmk-PC.armlinux.org.uk (mailing list archive) |
---|---|
State | Accepted |
Commit | b61a465a761921d11f99492ce41b85cfba7d6161 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: pcs: xpcs: yet more cleanups | expand |
diff --git a/drivers/net/pcs/pcs-xpcs.c b/drivers/net/pcs/pcs-xpcs.c index 183df8f8c50f..3222b8851bff 100644 --- a/drivers/net/pcs/pcs-xpcs.c +++ b/drivers/net/pcs/pcs-xpcs.c @@ -1133,12 +1133,13 @@ static void xpcs_link_up_1000basex(struct dw_xpcs *xpcs, unsigned int neg_mode, return; } + if (duplex != DUPLEX_FULL) + dev_err(&xpcs->mdiodev->dev, "%s: half duplex not supported\n", + __func__); + val = BMCR_SPEED1000; if (duplex == DUPLEX_FULL) val |= BMCR_FULLDPLX; - else - dev_err(&xpcs->mdiodev->dev, "%s: half duplex not supported\n", - __func__); ret = xpcs_write(xpcs, MDIO_MMD_VEND2, MII_BMCR, val); if (ret)
Rearrange xpcs_link_up_1000basex() to make it more obvious what will happen in the following commit. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> --- drivers/net/pcs/pcs-xpcs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)