net/i40e/base: add protocols when discover capabilities
authorJingjing Wu <jingjing.wu@intel.com>
Sat, 10 Dec 2016 11:24:32 +0000 (19:24 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 17 Jan 2017 18:39:27 +0000 (19:39 +0100)
Add logical_id to I40E_AQ_CAP_ID_MNG_MODE capability starting from major
version 2.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
drivers/net/i40e/base/i40e_common.c
drivers/net/i40e/base/i40e_type.h

index 85c1c11..9591428 100644 (file)
@@ -3611,6 +3611,14 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
                        break;
                case I40E_AQ_CAP_ID_MNG_MODE:
                        p->management_mode = number;
+                       if (major_rev > 1) {
+                               p->mng_protocols_over_mctp = logical_id;
+                               i40e_debug(hw, I40E_DEBUG_INIT,
+                                          "HW Capability: Protocols over MCTP = %d\n",
+                                          p->mng_protocols_over_mctp);
+                       } else {
+                               p->mng_protocols_over_mctp = 0;
+                       }
                        i40e_debug(hw, I40E_DEBUG_INIT,
                                   "HW Capability: Management Mode = %d\n",
                                   p->management_mode);
index 530ee5e..223f5fe 100644 (file)
@@ -366,6 +366,10 @@ struct i40e_hw_capabilities {
 #define I40E_NVM_IMAGE_TYPE_UDP_CLOUD  0x3
 
        u32  management_mode;
+       u32  mng_protocols_over_mctp;
+#define I40E_MNG_PROTOCOL_PLDM         0x2
+#define I40E_MNG_PROTOCOL_OEM_COMMANDS 0x4
+#define I40E_MNG_PROTOCOL_NCSI         0x8
        u32  npar_enable;
        u32  os2bmc;
        u32  valid_functions;