Skip to content

Commit 77ac9a8

Browse files
Russell King (Oracle)kuba-moo
authored andcommitted
net: phylink: remove phylink_phy_no_inband()
Remove phylink_phy_no_inband() now that we are handling the lack of inband negotiation by querying the capabilities of the PHY and PCS, and the BCM84881 PHY driver provides us the information necessary to make the decision. Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 5fd0f1a commit 77ac9a8

File tree

1 file changed

+6
-21
lines changed

1 file changed

+6
-21
lines changed

drivers/net/phy/phylink.c

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3391,10 +3391,11 @@ static phy_interface_t phylink_choose_sfp_interface(struct phylink *pl,
33913391
return interface;
33923392
}
33933393

3394-
static void phylink_sfp_set_config(struct phylink *pl, u8 mode,
3394+
static void phylink_sfp_set_config(struct phylink *pl,
33953395
unsigned long *supported,
33963396
struct phylink_link_state *state)
33973397
{
3398+
u8 mode = MLO_AN_INBAND;
33983399
bool changed = false;
33993400

34003401
phylink_dbg(pl, "requesting link mode %s/%s with support %*pb\n",
@@ -3428,8 +3429,7 @@ static void phylink_sfp_set_config(struct phylink *pl, u8 mode,
34283429
phylink_mac_initial_config(pl, false);
34293430
}
34303431

3431-
static int phylink_sfp_config_phy(struct phylink *pl, u8 mode,
3432-
struct phy_device *phy)
3432+
static int phylink_sfp_config_phy(struct phylink *pl, struct phy_device *phy)
34333433
{
34343434
__ETHTOOL_DECLARE_LINK_MODE_MASK(support);
34353435
struct phylink_link_state config;
@@ -3473,7 +3473,7 @@ static int phylink_sfp_config_phy(struct phylink *pl, u8 mode,
34733473

34743474
pl->link_port = pl->sfp_port;
34753475

3476-
phylink_sfp_set_config(pl, mode, support, &config);
3476+
phylink_sfp_set_config(pl, support, &config);
34773477

34783478
return 0;
34793479
}
@@ -3548,7 +3548,7 @@ static int phylink_sfp_config_optical(struct phylink *pl)
35483548

35493549
pl->link_port = pl->sfp_port;
35503550

3551-
phylink_sfp_set_config(pl, MLO_AN_INBAND, pl->sfp_support, &config);
3551+
phylink_sfp_set_config(pl, pl->sfp_support, &config);
35523552

35533553
return 0;
35543554
}
@@ -3619,19 +3619,9 @@ static void phylink_sfp_link_up(void *upstream)
36193619
phylink_enable_and_run_resolve(pl, PHYLINK_DISABLE_LINK);
36203620
}
36213621

3622-
/* The Broadcom BCM84881 in the Methode DM7052 is unable to provide a SGMII
3623-
* or 802.3z control word, so inband will not work.
3624-
*/
3625-
static bool phylink_phy_no_inband(struct phy_device *phy)
3626-
{
3627-
return phy->is_c45 && phy_id_compare(phy->c45_ids.device_ids[1],
3628-
0xae025150, 0xfffffff0);
3629-
}
3630-
36313622
static int phylink_sfp_connect_phy(void *upstream, struct phy_device *phy)
36323623
{
36333624
struct phylink *pl = upstream;
3634-
u8 mode;
36353625

36363626
/*
36373627
* This is the new way of dealing with flow control for PHYs,
@@ -3642,17 +3632,12 @@ static int phylink_sfp_connect_phy(void *upstream, struct phy_device *phy)
36423632
*/
36433633
phy_support_asym_pause(phy);
36443634

3645-
if (phylink_phy_no_inband(phy))
3646-
mode = MLO_AN_PHY;
3647-
else
3648-
mode = MLO_AN_INBAND;
3649-
36503635
/* Set the PHY's host supported interfaces */
36513636
phy_interface_and(phy->host_interfaces, phylink_sfp_interfaces,
36523637
pl->config->supported_interfaces);
36533638

36543639
/* Do the initial configuration */
3655-
return phylink_sfp_config_phy(pl, mode, phy);
3640+
return phylink_sfp_config_phy(pl, phy);
36563641
}
36573642

36583643
static void phylink_sfp_disconnect_phy(void *upstream,

0 commit comments

Comments
 (0)