[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1t1P3h-000EK9-NO@rmk-PC.armlinux.org.uk>
Date: Thu, 17 Oct 2024 12:52:49 +0100
From: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
To: Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Jose Abreu <Jose.Abreu@...opsys.com>,
netdev@...r.kernel.org,
Paolo Abeni <pabeni@...hat.com>
Subject: [PATCH net-next 3/7] 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@...linux.org.uk>
---
drivers/net/pcs/pcs-xpcs.c | 7 ++++---
1 file 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)
--
2.30.2
Powered by blists - more mailing lists