net/i40e/base: add more device capabilities for NVM mgmt
authorHelin Zhang <helin.zhang@intel.com>
Tue, 24 May 2016 06:23:05 +0000 (14:23 +0800)
committerBruce Richardson <bruce.richardson@intel.com>
Mon, 20 Jun 2016 15:21:50 +0000 (17:21 +0200)
Adds more device capabilities for NVM management.
- if update is available
- if security check is needed

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
drivers/net/i40e/base/i40e_adminq_cmd.h
drivers/net/i40e/base/i40e_common.c
drivers/net/i40e/base/i40e_type.h

index 00c2c0a..cccc968 100644 (file)
@@ -446,6 +446,7 @@ struct i40e_aqc_list_capabilities_element_resp {
 #define I40E_AQ_CAP_ID_SDP             0x0062
 #define I40E_AQ_CAP_ID_MDIO            0x0063
 #define I40E_AQ_CAP_ID_WSR_PROT                0x0064
+#define I40E_AQ_CAP_ID_NVM_MGMT                0x0080
 #define I40E_AQ_CAP_ID_FLEX10          0x00F1
 #define I40E_AQ_CAP_ID_CEM             0x00F2
 
index 80d69dd..98ed4b6 100644 (file)
@@ -3762,6 +3762,12 @@ STATIC void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
                                   "HW Capability: wr_csr_prot = 0x%llX\n\n",
                                   (p->wr_csr_prot & 0xffff));
                        break;
+               case I40E_AQ_CAP_ID_NVM_MGMT:
+                       if (number & I40E_NVM_MGMT_SEC_REV_DISABLED)
+                               p->sec_rev_disabled = true;
+                       if (number & I40E_NVM_MGMT_UPDATE_DISABLED)
+                               p->update_disabled = true;
+                       break;
 #ifdef X722_SUPPORT
                case I40E_AQ_CAP_ID_WOL_AND_PROXY:
                        hw->num_wol_proxy_filters = (u16)number;
index 73a18e1..7ed3048 100644 (file)
@@ -376,6 +376,11 @@ struct i40e_hw_capabilities {
 #define I40E_FLEX10_STATUS_DCC_ERROR   0x1
 #define I40E_FLEX10_STATUS_VC_MODE     0x2
 
+       bool sec_rev_disabled;
+       bool update_disabled;
+#define I40E_NVM_MGMT_SEC_REV_DISABLED 0x1
+#define I40E_NVM_MGMT_UPDATE_DISABLED  0x2
+
        bool mgmt_cem;
        bool ieee_1588;
        bool iwarp;