Skip to content

Commit 0558107

Browse files
vigovindshemminger
authored andcommitted
net/axgbe: add support for V4000 Kracken2e
add device ID's for Kracken2e to enable driver to support this device. Signed-off-by: Vinay Govindaiah <[email protected]> Acked-by: Selwin Sebastian <[email protected]>
1 parent 44d645d commit 0558107

File tree

2 files changed

+46
-28
lines changed

2 files changed

+46
-28
lines changed

drivers/net/axgbe/axgbe_common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,8 @@
905905
#define PCS_V2_RV_WINDOW_SELECT 0x1064
906906
#define PCS_V2_YC_WINDOW_DEF 0x18060
907907
#define PCS_V2_YC_WINDOW_SELECT 0x18064
908+
#define PCS_KR_WINDOW_SELECT 0x8080
909+
#define PCS_KR_WINDOW_DEF 0x8060
908910

909911
/* PCS register entry bit positions and sizes */
910912
#define PCS_V2_WINDOW_DEF_OFFSET_INDEX 6

drivers/net/axgbe/axgbe_ethdev.c

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ static const struct axgbe_xstats axgbe_xstats_strings[] = {
185185

186186
#define Fam17h 0x17
187187
#define Fam19h 0x19
188+
#define Fam1Ah 0x1A
188189

189190
#define CPUID_VENDOR_AuthenticAMD_ebx 0x68747541
190191
#define CPUID_VENDOR_AuthenticAMD_ecx 0x444d4163
@@ -2252,8 +2253,8 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
22522253
__cpuid(0x0, eax, ebx, ecx, edx);
22532254

22542255
if (ebx == CPUID_VENDOR_AuthenticAMD_ebx &&
2255-
edx == CPUID_VENDOR_AuthenticAMD_edx &&
2256-
ecx == CPUID_VENDOR_AuthenticAMD_ecx) {
2256+
edx == CPUID_VENDOR_AuthenticAMD_edx &&
2257+
ecx == CPUID_VENDOR_AuthenticAMD_ecx) {
22572258
int unknown_cpu = 0;
22582259
eax = 0, ebx = 0, ecx = 0, edx = 0;
22592260

@@ -2264,33 +2265,48 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
22642265

22652266
switch (cpu_family) {
22662267
case Fam17h:
2267-
/* V1000/R1000 */
2268-
if (cpu_model >= 0x10 && cpu_model <= 0x1F) {
2269-
pdata->xpcs_window_def_reg = PCS_V2_RV_WINDOW_DEF;
2270-
pdata->xpcs_window_sel_reg = PCS_V2_RV_WINDOW_SELECT;
2271-
/* EPYC 3000 */
2272-
} else if (cpu_model >= 0x01 && cpu_model <= 0x0F) {
2273-
pdata->xpcs_window_def_reg = PCS_V2_WINDOW_DEF;
2274-
pdata->xpcs_window_sel_reg = PCS_V2_WINDOW_SELECT;
2275-
} else {
2276-
unknown_cpu = 1;
2277-
}
2278-
break;
2268+
/* V1000/R1000 */
2269+
if (cpu_model >= 0x10 && cpu_model <= 0x1F) {
2270+
pdata->xpcs_window_def_reg = PCS_V2_RV_WINDOW_DEF;
2271+
pdata->xpcs_window_sel_reg = PCS_V2_RV_WINDOW_SELECT;
2272+
/* EPYC 3000 */
2273+
} else if (cpu_model >= 0x01 && cpu_model <= 0x0F) {
2274+
pdata->xpcs_window_def_reg = PCS_V2_WINDOW_DEF;
2275+
pdata->xpcs_window_sel_reg = PCS_V2_WINDOW_SELECT;
2276+
} else {
2277+
unknown_cpu = 1;
2278+
}
2279+
break;
22792280
case Fam19h:
2280-
/* V3000 (Yellow Carp) */
2281-
if (cpu_model >= 0x44 && cpu_model <= 0x47) {
2282-
pdata->xpcs_window_def_reg = PCS_V2_YC_WINDOW_DEF;
2283-
pdata->xpcs_window_sel_reg = PCS_V2_YC_WINDOW_SELECT;
2284-
2285-
/* Yellow Carp devices do not need cdr workaround */
2286-
pdata->vdata->an_cdr_workaround = 0;
2287-
2288-
/* Yellow Carp devices do not need rrc */
2289-
pdata->vdata->enable_rrc = 0;
2290-
} else {
2291-
unknown_cpu = 1;
2292-
}
2293-
break;
2281+
/* V3000 (Yellow Carp) */
2282+
if (cpu_model >= 0x44 && cpu_model <= 0x47) {
2283+
pdata->xpcs_window_def_reg = PCS_V2_YC_WINDOW_DEF;
2284+
pdata->xpcs_window_sel_reg = PCS_V2_YC_WINDOW_SELECT;
2285+
2286+
/* Yellow Carp devices do not need cdr workaround */
2287+
pdata->vdata->an_cdr_workaround = 0;
2288+
2289+
/* Yellow Carp devices do not need rrc */
2290+
pdata->vdata->enable_rrc = 0;
2291+
} else {
2292+
unknown_cpu = 1;
2293+
}
2294+
break;
2295+
case Fam1Ah:
2296+
/* V4000 (krackan2e) */
2297+
if (cpu_model == 0x68) {
2298+
pdata->xpcs_window_def_reg = PCS_KR_WINDOW_DEF;
2299+
pdata->xpcs_window_sel_reg = PCS_KR_WINDOW_SELECT;
2300+
2301+
/* V4000-Krkan2e devices do not need cdr workaround */
2302+
pdata->vdata->an_cdr_workaround = 0;
2303+
2304+
/* V4000-Krkan2e devices do not need rrc */
2305+
pdata->vdata->enable_rrc = 0;
2306+
} else {
2307+
unknown_cpu = 1;
2308+
}
2309+
break;
22942310
default:
22952311
unknown_cpu = 1;
22962312
break;

0 commit comments

Comments
 (0)