qed: No need to reset SBs on IOV init
authorMintz, Yuval <Yuval.Mintz@cavium.com>
Thu, 1 Jun 2017 12:29:11 +0000 (15:29 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Jun 2017 16:17:20 +0000 (12:17 -0400)
Since we're resetting the IGU CAM each time we initialize the PF
device, there's no need to reset the VF SBs again when initializing
IOV.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_dev.c
drivers/net/ethernet/qlogic/qed/qed_sriov.c
drivers/net/ethernet/qlogic/qed/qed_sriov.h

index 939e85cc63a08c053237b3883ab72e620bf44958..7649f35000db919a9d4376910a85de1c10810885 100644 (file)
@@ -1030,7 +1030,7 @@ void qed_resc_setup(struct qed_dev *cdev)
 
                qed_int_setup(p_hwfn, p_hwfn->p_main_ptt);
 
-               qed_iov_setup(p_hwfn, p_hwfn->p_main_ptt);
+               qed_iov_setup(p_hwfn);
 #ifdef CONFIG_QED_LL2
                if (p_hwfn->using_ll2)
                        qed_ll2_setup(p_hwfn);
index cb9123b8c8fc98ca05a454af9a637bdc949df105..5ae8827534f8b7c0bf99d8ef5567861c9e92951c 100644 (file)
@@ -378,33 +378,6 @@ static int qed_iov_pci_cfg_info(struct qed_dev *cdev)
        return 0;
 }
 
-static void qed_iov_clear_vf_igu_blocks(struct qed_hwfn *p_hwfn,
-                                       struct qed_ptt *p_ptt)
-{
-       struct qed_igu_block *p_sb;
-       u16 sb_id;
-       u32 val;
-
-       if (!p_hwfn->hw_info.p_igu_info) {
-               DP_ERR(p_hwfn,
-                      "qed_iov_clear_vf_igu_blocks IGU Info not initialized\n");
-               return;
-       }
-
-       for (sb_id = 0; sb_id < QED_MAPPING_MEMORY_SIZE(p_hwfn->cdev);
-            sb_id++) {
-               p_sb = &p_hwfn->hw_info.p_igu_info->entry[sb_id];
-               if ((p_sb->status & QED_IGU_STATUS_FREE) &&
-                   !(p_sb->status & QED_IGU_STATUS_PF)) {
-                       val = qed_rd(p_hwfn, p_ptt,
-                                    IGU_REG_MAPPING_MEMORY + sb_id * 4);
-                       SET_FIELD(val, IGU_MAPPING_LINE_VALID, 0);
-                       qed_wr(p_hwfn, p_ptt,
-                              IGU_REG_MAPPING_MEMORY + 4 * sb_id, val);
-               }
-       }
-}
-
 static void qed_iov_setup_vfdb(struct qed_hwfn *p_hwfn)
 {
        struct qed_hw_sriov_info *p_iov = p_hwfn->cdev->p_iov_info;
@@ -555,13 +528,12 @@ int qed_iov_alloc(struct qed_hwfn *p_hwfn)
        return qed_iov_allocate_vfdb(p_hwfn);
 }
 
-void qed_iov_setup(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
+void qed_iov_setup(struct qed_hwfn *p_hwfn)
 {
        if (!IS_PF_SRIOV(p_hwfn) || !IS_PF_SRIOV_ALLOC(p_hwfn))
                return;
 
        qed_iov_setup_vfdb(p_hwfn);
-       qed_iov_clear_vf_igu_blocks(p_hwfn, p_ptt);
 }
 
 void qed_iov_free(struct qed_hwfn *p_hwfn)
index 81a497ce65851898636b1e46d9c8ad3ff4081f48..801cc005e52bf15ec62aaa3bbe00f22c4c62f9cf 100644 (file)
@@ -316,9 +316,8 @@ int qed_iov_alloc(struct qed_hwfn *p_hwfn);
  * @brief qed_iov_setup - setup sriov related resources
  *
  * @param p_hwfn
- * @param p_ptt
  */
-void qed_iov_setup(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt);
+void qed_iov_setup(struct qed_hwfn *p_hwfn);
 
 /**
  * @brief qed_iov_free - free sriov related resources
@@ -397,7 +396,7 @@ static inline int qed_iov_alloc(struct qed_hwfn *p_hwfn)
        return 0;
 }
 
-static inline void qed_iov_setup(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
+static inline void qed_iov_setup(struct qed_hwfn *p_hwfn)
 {
 }