i40e/i40evf: Fix code to accommodate i40e_register.h changes
authorAnjali Singhai Jain <anjali.singhai@intel.com>
Sat, 10 May 2014 04:49:02 +0000 (04:49 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sun, 8 Jun 2014 09:01:23 +0000 (02:01 -0700)
Remove use of registers no longer supported.

Change-ID: I9d27399091cea78a926489d94f958edd762f5a20
Signed-off-by: Anjali Singhai Jain <anjali.singhai@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_hmc.c
drivers/net/ethernet/intel/i40e/i40e_hmc.h
drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c
drivers/net/ethernet/intel/i40evf/i40e_hmc.h

index fd2b573d30505e638b5a1bdefc91dd7c509fe744..8bfb445d00ec337eb1586a570371aa39fc1b32f6 100644 (file)
@@ -2514,7 +2514,7 @@ static i40e_status i40e_validate_filter_settings(struct i40e_hw *hw,
 {
        u32 fcoe_cntx_size, fcoe_filt_size;
        u32 pe_cntx_size, pe_filt_size;
-       u32 fcoe_fmax, pe_fmax;
+       u32 fcoe_fmax;
        u32 val;
 
        /* Validate FCoE settings passed */
@@ -2589,13 +2589,6 @@ static i40e_status i40e_validate_filter_settings(struct i40e_hw *hw,
        if (fcoe_filt_size + fcoe_cntx_size >  fcoe_fmax)
                return I40E_ERR_INVALID_SIZE;
 
-       /* PEHSIZE + PEDSIZE should not be greater than PMPEXFMAX */
-       val = rd32(hw, I40E_GLHMC_PEXFMAX);
-       pe_fmax = (val & I40E_GLHMC_PEXFMAX_PMPEXFMAX_MASK)
-                  >> I40E_GLHMC_PEXFMAX_PMPEXFMAX_SHIFT;
-       if (pe_filt_size + pe_cntx_size >  pe_fmax)
-               return I40E_ERR_INVALID_SIZE;
-
        return 0;
 }
 
index bf2d4cc5b56927e87a1be2cd5772198533d27afa..9b987ccc9e828738caef1c4811c5db1ca33b388d 100644 (file)
@@ -201,7 +201,7 @@ exit:
  **/
 i40e_status i40e_remove_pd_bp(struct i40e_hw *hw,
                                        struct i40e_hmc_info *hmc_info,
-                                       u32 idx, bool is_pf)
+                                       u32 idx)
 {
        i40e_status ret_code = 0;
        struct i40e_hmc_pd_entry *pd_entry;
@@ -237,10 +237,7 @@ i40e_status i40e_remove_pd_bp(struct i40e_hw *hw,
        pd_addr = (u64 *)pd_table->pd_page_addr.va;
        pd_addr += rel_pd_idx;
        memset(pd_addr, 0, sizeof(u64));
-       if (is_pf)
-               I40E_INVALIDATE_PF_HMC_PD(hw, sd_idx, idx);
-       else
-               I40E_INVALIDATE_VF_HMC_PD(hw, sd_idx, idx, hmc_info->hmc_fn_id);
+       I40E_INVALIDATE_PF_HMC_PD(hw, sd_idx, idx);
 
        /* free memory here */
        ret_code = i40e_free_dma_mem(hw, &(pd_entry->bp.addr));
index 0cd4701234f8c0fc41f64e926640fca1a5ad9757..b45d8fedc5e755e712e753c4f6b47a977545c45a 100644 (file)
@@ -163,11 +163,6 @@ struct i40e_hmc_info {
            (((sd_idx) << I40E_PFHMC_PDINV_PMSDIDX_SHIFT) |             \
             ((pd_idx) << I40E_PFHMC_PDINV_PMPDIDX_SHIFT)))
 
-#define I40E_INVALIDATE_VF_HMC_PD(hw, sd_idx, pd_idx, hmc_fn_id)          \
-       wr32((hw), I40E_GLHMC_VFPDINV((hmc_fn_id) - I40E_FIRST_VF_FPM_ID), \
-            (((sd_idx) << I40E_PFHMC_PDINV_PMSDIDX_SHIFT) |               \
-             ((pd_idx) << I40E_PFHMC_PDINV_PMPDIDX_SHIFT)))
-
 /**
  * I40E_FIND_SD_INDEX_LIMIT - finds segment descriptor index limit
  * @hmc_info: pointer to the HMC configuration information structure
@@ -226,7 +221,7 @@ i40e_status i40e_add_pd_table_entry(struct i40e_hw *hw,
                                              u32 pd_index);
 i40e_status i40e_remove_pd_bp(struct i40e_hw *hw,
                                        struct i40e_hmc_info *hmc_info,
-                                       u32 idx, bool is_pf);
+                                       u32 idx);
 i40e_status i40e_prep_remove_sd_bp(struct i40e_hmc_info *hmc_info,
                                             u32 idx);
 i40e_status i40e_remove_sd_bp_new(struct i40e_hw *hw,
index 5c341aeb5d530de5318bc8847d4c6762c3f8abc1..870ab1ee072cdf4759e848a8eca6cdbf6dc0a793 100644 (file)
@@ -397,7 +397,7 @@ static i40e_status i40e_create_lan_hmc_object(struct i40e_hw *hw,
                                /* remove the backing pages from pd_idx1 to i */
                                while (i && (i > pd_idx1)) {
                                        i40e_remove_pd_bp(hw, info->hmc_info,
-                                                         (i - 1), true);
+                                                         (i - 1));
                                        i--;
                                }
                        }
@@ -433,11 +433,7 @@ exit_sd_error:
                                      ((j - 1) * I40E_HMC_MAX_BP_COUNT));
                        pd_lmt1 = min(pd_lmt, (j * I40E_HMC_MAX_BP_COUNT));
                        for (i = pd_idx1; i < pd_lmt1; i++) {
-                               i40e_remove_pd_bp(
-                                       hw,
-                                       info->hmc_info,
-                                       i,
-                                       true);
+                               i40e_remove_pd_bp(hw, info->hmc_info, i);
                        }
                        i40e_remove_pd_page(hw, info->hmc_info, (j - 1));
                        break;
@@ -616,8 +612,7 @@ static i40e_status i40e_delete_lan_hmc_object(struct i40e_hw *hw,
                pd_table =
                        &info->hmc_info->sd_table.sd_entry[sd_idx].u.pd_table;
                if (pd_table->pd_entry[rel_pd_idx].valid) {
-                       ret_code = i40e_remove_pd_bp(hw, info->hmc_info,
-                                                    j, true);
+                       ret_code = i40e_remove_pd_bp(hw, info->hmc_info, j);
                        if (ret_code)
                                goto exit;
                }
index 9d906514fc3d3474392102ea702cd40a10f027cc..a2ad9a4e399da70707a9ed984588a8c2cde04686 100644 (file)
@@ -163,11 +163,6 @@ struct i40e_hmc_info {
            (((sd_idx) << I40E_PFHMC_PDINV_PMSDIDX_SHIFT) |             \
             ((pd_idx) << I40E_PFHMC_PDINV_PMPDIDX_SHIFT)))
 
-#define I40E_INVALIDATE_VF_HMC_PD(hw, sd_idx, pd_idx, hmc_fn_id)          \
-       wr32((hw), I40E_GLHMC_VFPDINV((hmc_fn_id) - I40E_FIRST_VF_FPM_ID), \
-            (((sd_idx) << I40E_PFHMC_PDINV_PMSDIDX_SHIFT) |               \
-             ((pd_idx) << I40E_PFHMC_PDINV_PMPDIDX_SHIFT)))
-
 /**
  * I40E_FIND_SD_INDEX_LIMIT - finds segment descriptor index limit
  * @hmc_info: pointer to the HMC configuration information structure
@@ -226,7 +221,7 @@ i40e_status i40e_add_pd_table_entry(struct i40e_hw *hw,
                                              u32 pd_index);
 i40e_status i40e_remove_pd_bp(struct i40e_hw *hw,
                                        struct i40e_hmc_info *hmc_info,
-                                       u32 idx, bool is_pf);
+                                       u32 idx);
 i40e_status i40e_prep_remove_sd_bp(struct i40e_hmc_info *hmc_info,
                                             u32 idx);
 i40e_status i40e_remove_sd_bp_new(struct i40e_hw *hw,