Skip to content

Commit c9feb8f

Browse files
committed
Add 15816 support into mlxcx
1 parent 71dec31 commit c9feb8f

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

usr/src/uts/common/io/mlxcx/mlxcx_gld.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,13 @@ mlxcx_speed_to_bits(mlxcx_eth_proto_t proto, mlxcx_ext_eth_proto_t ext_proto)
128128
case MLXCX_EXTPROTO_100GAUI_2_100GBASE_CR2_KR2:
129129
case MLXCX_EXTPROTO_100GAUI_1_100GBASE_CR_KR:
130130
return (100ULL * GBITS);
131-
#if 0 /* Not yet... */
132131
case MLXCX_EXTPROTO_200GAUI_4_200GBASE_CR4_KR4:
133132
case MLXCX_EXTPROTO_200GAUI_2_200GBASE_CR2_KR2:
133+
return (200ULL * GBITS);
134134
case MLXCX_EXTPROTO_400GAUI_8:
135135
case MLXCX_EXTPROTO_400GAUI_4_400GBASE_CR4_KR4:
136-
/* Not yet supported... */
136+
return (400ULL * GBITS);
137137
break;
138-
#endif /* Not yet... */
139138
default:
140139
/*
141140
* There ARE legitimate single-bit values we don't support,
@@ -1359,6 +1358,18 @@ mlxcx_mac_propinfo(void *arg, const char *pr_name, mac_prop_id_t pr_num,
13591358
mac_prop_info_set_perm(prh, MAC_PROP_PERM_RW);
13601359
mac_prop_info_set_default_fec(prh, LINK_FEC_AUTO);
13611360
break;
1361+
case MAC_PROP_ADV_400GFDX_CAP:
1362+
case MAC_PROP_EN_400GFDX_CAP:
1363+
mac_prop_info_set_perm(prh, MAC_PROP_PERM_READ);
1364+
mac_prop_info_set_default_uint8(prh,
1365+
(port->mlp_ext_oper_proto & MLXCX_EXTPROTO_400G) != 0);
1366+
break;
1367+
case MAC_PROP_ADV_200GFDX_CAP:
1368+
case MAC_PROP_EN_200GFDX_CAP:
1369+
mac_prop_info_set_perm(prh, MAC_PROP_PERM_READ);
1370+
mac_prop_info_set_default_uint8(prh,
1371+
(port->mlp_ext_oper_proto & MLXCX_EXTPROTO_200G) != 0);
1372+
break;
13621373
case MAC_PROP_ADV_100GFDX_CAP:
13631374
case MAC_PROP_EN_100GFDX_CAP:
13641375
mac_prop_info_set_perm(prh, MAC_PROP_PERM_READ);

usr/src/uts/common/io/mlxcx/mlxcx_reg.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2352,6 +2352,13 @@ typedef enum {
23522352
MLXCX_EXTPROTO_100GAUI_2_100GBASE_CR2_KR2 | \
23532353
MLXCX_EXTPROTO_100GAUI_1_100GBASE_CR_KR)
23542354

2355+
/* 200G and higher only are in the extended protocol bits. */
2356+
#define MLXCX_EXTPROTO_200G (MLXCX_EXTPROTO_200GAUI_4_200GBASE_CR4_KR4 | \
2357+
MLXCX_EXTPROTO_200GAUI_2_200GBASE_CR2_KR2)
2358+
2359+
#define MLXCX_EXTPROTO_400G (MLXCX_EXTPROTO_400GAUI_8 | \
2360+
MLXCX_EXTPROTO_400GAUI_4_400GBASE_CR4_KR4)
2361+
23552362

23562363
typedef enum {
23572364
MLXCX_AUTONEG_DISABLE_CAP = 1 << 5,

0 commit comments

Comments
 (0)