Skip to content

Commit 2c15832

Browse files
Kamil Horák (2N)kuba-moo
authored andcommitted
net: phy: bcm54811: New link mode for BroadR-Reach
Introduce a new link mode necessary for 10 MBit single-pair connection in BroadR-Reach mode on bcm5481x PHY by Broadcom. This new link mode, 10baseT1BRR, is known as 1BR10 in the Broadcom terminology. Another link mode to be used is 1BR100 and it is already present as 100baseT1, because Broadcom's 1BR100 became 100baseT1 (IEEE 802.3bw). Signed-off-by: Kamil Horák (2N) <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent d944c27 commit 2c15832

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

drivers/net/phy/phy-core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*/
1414
const char *phy_speed_to_str(int speed)
1515
{
16-
BUILD_BUG_ON_MSG(__ETHTOOL_LINK_MODE_MASK_NBITS != 102,
16+
BUILD_BUG_ON_MSG(__ETHTOOL_LINK_MODE_MASK_NBITS != 103,
1717
"Enum ethtool_link_mode_bit_indices and phylib are out of sync. "
1818
"If a speed or mode has been added please update phy_speed_to_str "
1919
"and the PHY settings array.\n");
@@ -266,6 +266,7 @@ static const struct phy_setting settings[] = {
266266
PHY_SETTING( 10, FULL, 10baseT1S_Full ),
267267
PHY_SETTING( 10, HALF, 10baseT1S_Half ),
268268
PHY_SETTING( 10, HALF, 10baseT1S_P2MP_Half ),
269+
PHY_SETTING( 10, FULL, 10baseT1BRR_Full ),
269270
};
270271
#undef PHY_SETTING
271272

include/uapi/linux/ethtool.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2054,6 +2054,7 @@ enum ethtool_link_mode_bit_indices {
20542054
ETHTOOL_LINK_MODE_10baseT1S_Full_BIT = 99,
20552055
ETHTOOL_LINK_MODE_10baseT1S_Half_BIT = 100,
20562056
ETHTOOL_LINK_MODE_10baseT1S_P2MP_Half_BIT = 101,
2057+
ETHTOOL_LINK_MODE_10baseT1BRR_Full_BIT = 102,
20572058

20582059
/* must be last entry */
20592060
__ETHTOOL_LINK_MODE_MASK_NBITS

net/ethtool/common.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ const char link_mode_names[][ETH_GSTRING_LEN] = {
211211
__DEFINE_LINK_MODE_NAME(10, T1S, Full),
212212
__DEFINE_LINK_MODE_NAME(10, T1S, Half),
213213
__DEFINE_LINK_MODE_NAME(10, T1S_P2MP, Half),
214+
__DEFINE_LINK_MODE_NAME(10, T1BRR, Full),
214215
};
215216
static_assert(ARRAY_SIZE(link_mode_names) == __ETHTOOL_LINK_MODE_MASK_NBITS);
216217

@@ -251,6 +252,7 @@ static_assert(ARRAY_SIZE(link_mode_names) == __ETHTOOL_LINK_MODE_MASK_NBITS);
251252
#define __LINK_MODE_LANES_T1S_P2MP 1
252253
#define __LINK_MODE_LANES_VR8 8
253254
#define __LINK_MODE_LANES_DR8_2 8
255+
#define __LINK_MODE_LANES_T1BRR 1
254256

255257
#define __DEFINE_LINK_MODE_PARAMS(_speed, _type, _duplex) \
256258
[ETHTOOL_LINK_MODE(_speed, _type, _duplex)] = { \
@@ -374,6 +376,7 @@ const struct link_mode_info link_mode_params[] = {
374376
__DEFINE_LINK_MODE_PARAMS(10, T1S, Full),
375377
__DEFINE_LINK_MODE_PARAMS(10, T1S, Half),
376378
__DEFINE_LINK_MODE_PARAMS(10, T1S_P2MP, Half),
379+
__DEFINE_LINK_MODE_PARAMS(10, T1BRR, Full),
377380
};
378381
static_assert(ARRAY_SIZE(link_mode_params) == __ETHTOOL_LINK_MODE_MASK_NBITS);
379382

0 commit comments

Comments
 (0)