diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2024-10-17 14:52:49 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-10-23 17:10:16 +0300 |
commit | b61a465a761921d11f99492ce41b85cfba7d6161 (patch) | |
tree | ba48454b4b06424b6edee10774438eb9ad097b4c | |
parent | 8d2aeab4ce782df9d7cd035938f4545af7db260e (diff) | |
download | linux-b61a465a761921d11f99492ce41b85cfba7d6161.tar.xz |
net: pcs: xpcs: rearrange xpcs_link_up_1000basex()
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>
Tested-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-rw-r--r-- | drivers/net/pcs/pcs-xpcs.c | 7 |
1 files changed, 4 insertions, 3 deletions
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) |