Skip to content

Commit b61a465

Browse files
Russell King (Oracle)Paolo Abeni
authored andcommitted
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) <[email protected]> Tested-by: Serge Semin <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 8d2aeab commit b61a465

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/net/pcs/pcs-xpcs.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,12 +1133,13 @@ static void xpcs_link_up_1000basex(struct dw_xpcs *xpcs, unsigned int neg_mode,
11331133
return;
11341134
}
11351135

1136+
if (duplex != DUPLEX_FULL)
1137+
dev_err(&xpcs->mdiodev->dev, "%s: half duplex not supported\n",
1138+
__func__);
1139+
11361140
val = BMCR_SPEED1000;
11371141
if (duplex == DUPLEX_FULL)
11381142
val |= BMCR_FULLDPLX;
1139-
else
1140-
dev_err(&xpcs->mdiodev->dev, "%s: half duplex not supported\n",
1141-
__func__);
11421143

11431144
ret = xpcs_write(xpcs, MDIO_MMD_VEND2, MII_BMCR, val);
11441145
if (ret)

0 commit comments

Comments
 (0)