|
@@ -2391,7 +2391,7 @@ i40e_aq_erase_nvm_exit:
|
|
|
#define I40E_DEV_FUNC_CAP_MSIX_VF 0x44
|
|
|
#define I40E_DEV_FUNC_CAP_FLOW_DIRECTOR 0x45
|
|
|
#define I40E_DEV_FUNC_CAP_IEEE_1588 0x46
|
|
|
-#define I40E_DEV_FUNC_CAP_MFP_MODE_1 0xF1
|
|
|
+#define I40E_DEV_FUNC_CAP_FLEX10 0xF1
|
|
|
#define I40E_DEV_FUNC_CAP_CEM 0xF2
|
|
|
#define I40E_DEV_FUNC_CAP_IWARP 0x51
|
|
|
#define I40E_DEV_FUNC_CAP_LED 0x61
|
|
@@ -2416,6 +2416,7 @@ static void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
|
|
|
u32 valid_functions, num_functions;
|
|
|
u32 number, logical_id, phys_id;
|
|
|
struct i40e_hw_capabilities *p;
|
|
|
+ u8 major_rev;
|
|
|
u32 i = 0;
|
|
|
u16 id;
|
|
|
|
|
@@ -2433,6 +2434,7 @@ static void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
|
|
|
number = le32_to_cpu(cap->number);
|
|
|
logical_id = le32_to_cpu(cap->logical_id);
|
|
|
phys_id = le32_to_cpu(cap->phys_id);
|
|
|
+ major_rev = cap->major_rev;
|
|
|
|
|
|
switch (id) {
|
|
|
case I40E_DEV_FUNC_CAP_SWITCH_MODE:
|
|
@@ -2507,9 +2509,21 @@ static void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
|
|
|
case I40E_DEV_FUNC_CAP_MSIX_VF:
|
|
|
p->num_msix_vectors_vf = number;
|
|
|
break;
|
|
|
- case I40E_DEV_FUNC_CAP_MFP_MODE_1:
|
|
|
- if (number == 1)
|
|
|
- p->mfp_mode_1 = true;
|
|
|
+ case I40E_DEV_FUNC_CAP_FLEX10:
|
|
|
+ if (major_rev == 1) {
|
|
|
+ if (number == 1) {
|
|
|
+ p->flex10_enable = true;
|
|
|
+ p->flex10_capable = true;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ /* Capability revision >= 2 */
|
|
|
+ if (number & 1)
|
|
|
+ p->flex10_enable = true;
|
|
|
+ if (number & 2)
|
|
|
+ p->flex10_capable = true;
|
|
|
+ }
|
|
|
+ p->flex10_mode = logical_id;
|
|
|
+ p->flex10_status = phys_id;
|
|
|
break;
|
|
|
case I40E_DEV_FUNC_CAP_CEM:
|
|
|
if (number == 1)
|
|
@@ -2557,7 +2571,7 @@ static void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
|
|
|
/* Software override ensuring FCoE is disabled if npar or mfp
|
|
|
* mode because it is not supported in these modes.
|
|
|
*/
|
|
|
- if (p->npar_enable || p->mfp_mode_1)
|
|
|
+ if (p->npar_enable || p->flex10_enable)
|
|
|
p->fcoe = false;
|
|
|
|
|
|
/* count the enabled ports (aka the "not disabled" ports) */
|