i40e/i40evf: Save WR_CSR_PROT field from DEV/FUNC capabilities
authorKevin Scott <kevin.c.scott@intel.com>
Tue, 7 Apr 2015 23:45:38 +0000 (19:45 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 15 Apr 2015 03:25:45 +0000 (20:25 -0700)
Store the 8 bytes of the WR_CSR_PROT field returned as part of the get
device/function capabilities AQ command.

Change-ID: Ifcaeea2ff29885fa769e4f384c7db88a25e8afd0
Signed-off-by: Kevin Scott <kevin.c.scott@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_common.c
drivers/net/ethernet/intel/i40e/i40e_type.h
drivers/net/ethernet/intel/i40evf/i40e_type.h

index ce522d76811d7d70e013e5e49b83e3501a5ce362..0bae22da014db05d9cd7a56d5a9d21902e49ca41 100644 (file)
@@ -2397,6 +2397,7 @@ i40e_aq_erase_nvm_exit:
 #define I40E_DEV_FUNC_CAP_LED          0x61
 #define I40E_DEV_FUNC_CAP_SDP          0x62
 #define I40E_DEV_FUNC_CAP_MDIO         0x63
+#define I40E_DEV_FUNC_CAP_WR_CSR_PROT  0x64
 
 /**
  * i40e_parse_discover_capabilities
@@ -2541,6 +2542,10 @@ static void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff,
                        p->fd_filters_guaranteed = number;
                        p->fd_filters_best_effort = logical_id;
                        break;
+               case I40E_DEV_FUNC_CAP_WR_CSR_PROT:
+                       p->wr_csr_prot = (u64)number;
+                       p->wr_csr_prot |= (u64)logical_id << 32;
+                       break;
                default:
                        break;
                }
index 67c7bc9e9c21d2ecc6a7e79bf500346f86c0e34d..568e855da0f3e16b29a81702766070974dd3da91 100644 (file)
@@ -242,6 +242,7 @@ struct i40e_hw_capabilities {
        u8 rx_buf_chain_len;
        u32 enabled_tcmap;
        u32 maxtc;
+       u64 wr_csr_prot;
 };
 
 struct i40e_mac_info {
index 9c79cb6abb2b170955a9af27c73a42f4504f9c1a..ec9d83a9337944f20f934cf6217467ee61ec7303 100644 (file)
@@ -242,6 +242,7 @@ struct i40e_hw_capabilities {
        u8 rx_buf_chain_len;
        u32 enabled_tcmap;
        u32 maxtc;
+       u64 wr_csr_prot;
 };
 
 struct i40e_mac_info {