diff options
author | Kalderon, Michal <Michal.Kalderon@cavium.com> | 2017-06-21 16:22:45 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-21 15:32:59 -0400 |
commit | b71b9afdf6d6c1ca728fde2aa14bc71721cab34e (patch) | |
tree | bf4bfa9762283463ae1b04d87b914dbd4224cb8f /drivers/net/ethernet/qlogic/qed/qed_rdma.h | |
parent | f1372ee11901336d287a4032fabe433d33586753 (diff) | |
download | talos-obmc-linux-b71b9afdf6d6c1ca728fde2aa14bc71721cab34e.tar.gz talos-obmc-linux-b71b9afdf6d6c1ca728fde2aa14bc71721cab34e.zip |
qed: Split rdma content between qed_rdma and qed_roce
This patch places common iWARP / RoCE code in qed_rdma
and roce specific code in qed_roce
There is one new function ( qed_roce_setup ) added, the rest
of the patch removes content from the files and removes some
static definitions.
Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_rdma.h')
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed_rdma.h | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_rdma.h b/drivers/net/ethernet/qlogic/qed/qed_rdma.h index b178d9994a45..1836ff1810b4 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_rdma.h +++ b/drivers/net/ethernet/qlogic/qed/qed_rdma.h @@ -29,8 +29,8 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef _QED_ROCE_H -#define _QED_ROCE_H +#ifndef _QED_RDMA_H +#define _QED_RDMA_H #include <linux/types.h> #include <linux/bitops.h> #include <linux/kernel.h> @@ -42,7 +42,7 @@ #include "qed.h" #include "qed_dev_api.h" #include "qed_hsi.h" -#include "qed_ll2.h" +#include "qed_roce.h" #define QED_RDMA_MAX_FMR (RDMA_MAX_TIDS) #define QED_RDMA_MAX_P_KEY (1) @@ -168,11 +168,34 @@ struct qed_rdma_qp { #if IS_ENABLED(CONFIG_QED_RDMA) void qed_rdma_dpm_bar(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt); -void qed_roce_dpm_dcbx(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt); +void qed_rdma_dpm_conf(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt); #else -static inline void qed_rdma_dpm_bar(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) {} - -static inline void qed_roce_dpm_dcbx(struct qed_hwfn *p_hwfn, - struct qed_ptt *p_ptt) {} +static inline void qed_rdma_dpm_conf(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) {} +static inline void qed_rdma_dpm_bar(struct qed_hwfn *p_hwfn, + struct qed_ptt *p_ptt) {} #endif + +int +qed_rdma_bmap_alloc(struct qed_hwfn *p_hwfn, + struct qed_bmap *bmap, u32 max_count, char *name); + +void +qed_rdma_bmap_free(struct qed_hwfn *p_hwfn, struct qed_bmap *bmap, bool check); + +int +qed_rdma_bmap_alloc_id(struct qed_hwfn *p_hwfn, + struct qed_bmap *bmap, u32 *id_num); + +void +qed_bmap_set_id(struct qed_hwfn *p_hwfn, struct qed_bmap *bmap, u32 id_num); + +void +qed_bmap_release_id(struct qed_hwfn *p_hwfn, struct qed_bmap *bmap, u32 id_num); + +int +qed_bmap_test_id(struct qed_hwfn *p_hwfn, struct qed_bmap *bmap, u32 id_num); + +void qed_rdma_set_fw_mac(u16 *p_fw_mac, u8 *p_qed_mac); + +bool qed_rdma_allocated_qps(struct qed_hwfn *p_hwfn); #endif |