Skip to content

Commit

Permalink
Add 15816 support into mlxcx
Browse files Browse the repository at this point in the history
  • Loading branch information
danmcd committed Sep 1, 2023
1 parent 3220e60 commit d681bbc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
17 changes: 14 additions & 3 deletions usr/src/uts/common/io/mlxcx/mlxcx_gld.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,13 @@ mlxcx_speed_to_bits(mlxcx_eth_proto_t proto, mlxcx_ext_eth_proto_t ext_proto)
case MLXCX_EXTPROTO_100GAUI_2_100GBASE_CR2_KR2:
case MLXCX_EXTPROTO_100GAUI_1_100GBASE_CR_KR:
return (100ULL * GBITS);
#if 0 /* Not yet... */
case MLXCX_EXTPROTO_200GAUI_4_200GBASE_CR4_KR4:
case MLXCX_EXTPROTO_200GAUI_2_200GBASE_CR2_KR2:
return (200ULL * GBITS);
case MLXCX_EXTPROTO_400GAUI_8:
case MLXCX_EXTPROTO_400GAUI_4_400GBASE_CR4_KR4:
/* Not yet supported... */
return (400ULL * GBITS);
break;
#endif /* Not yet... */
default:
/*
* There ARE legitimate single-bit values we don't support,
Expand Down Expand Up @@ -1359,6 +1358,18 @@ mlxcx_mac_propinfo(void *arg, const char *pr_name, mac_prop_id_t pr_num,
mac_prop_info_set_perm(prh, MAC_PROP_PERM_RW);
mac_prop_info_set_default_fec(prh, LINK_FEC_AUTO);
break;
case MAC_PROP_ADV_400GFDX_CAP:
case MAC_PROP_EN_400GFDX_CAP:
mac_prop_info_set_perm(prh, MAC_PROP_PERM_READ);
mac_prop_info_set_default_uint8(prh,
(port->mlp_ext_oper_proto & MLXCX_EXTPROTO_400G) != 0);
break;
case MAC_PROP_ADV_200GFDX_CAP:
case MAC_PROP_EN_200GFDX_CAP:
mac_prop_info_set_perm(prh, MAC_PROP_PERM_READ);
mac_prop_info_set_default_uint8(prh,
(port->mlp_ext_oper_proto & MLXCX_EXTPROTO_200G) != 0);
break;
case MAC_PROP_ADV_100GFDX_CAP:
case MAC_PROP_EN_100GFDX_CAP:
mac_prop_info_set_perm(prh, MAC_PROP_PERM_READ);
Expand Down
7 changes: 7 additions & 0 deletions usr/src/uts/common/io/mlxcx/mlxcx_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -2352,6 +2352,13 @@ typedef enum {
MLXCX_EXTPROTO_100GAUI_2_100GBASE_CR2_KR2 | \
MLXCX_EXTPROTO_100GAUI_1_100GBASE_CR_KR)

/* 200G and higher only are in the extended protocol bits. */
#define MLXCX_EXTPROTO_200G (MLXCX_EXTPROTO_200GAUI_4_200GBASE_CR4_KR4 | \
MLXCX_EXTPROTO_200GAUI_2_200GBASE_CR2_KR2)

#define MLXCX_EXTPROTO_400G (MLXCX_EXTPROTO_400GAUI_8 | \
MLXCX_EXTPROTO_400GAUI_4_400GBASE_CR4_KR4)


typedef enum {
MLXCX_AUTONEG_DISABLE_CAP = 1 << 5,
Expand Down

0 comments on commit d681bbc

Please sign in to comment.