Home
last modified time | relevance | path

Searched refs:hns_roce_dev (Results 1 – 22 of 22) sorted by relevance

/linux/drivers/infiniband/hw/hns/
H A Dhns_roce_device.h587 struct hns_roce_dev;
595 struct hns_roce_dev *hr_dev;
703 struct hns_roce_dev *hr_dev;
919 int (*cmq_init)(struct hns_roce_dev *hr_dev);
920 void (*cmq_exit)(struct hns_roce_dev *hr_dev);
921 int (*hw_profile)(struct hns_roce_dev *hr_dev);
922 int (*hw_init)(struct hns_roce_dev *hr_dev);
923 void (*hw_exit)(struct hns_roce_dev *hr_dev);
924 int (*post_mbox)(struct hns_roce_dev *hr_dev,
926 int (*poll_mbox_done)(struct hns_roce_dev *hr_dev);
[all …]
H A Dhns_roce_hem.h88 void hns_roce_free_hem(struct hns_roce_dev *hr_dev, struct hns_roce_hem *hem);
89 int hns_roce_table_get(struct hns_roce_dev *hr_dev,
91 void hns_roce_table_put(struct hns_roce_dev *hr_dev,
93 void *hns_roce_table_find(struct hns_roce_dev *hr_dev,
96 int hns_roce_init_hem_table(struct hns_roce_dev *hr_dev,
99 void hns_roce_cleanup_hem_table(struct hns_roce_dev *hr_dev,
101 void hns_roce_cleanup_hem(struct hns_roce_dev *hr_dev);
102 int hns_roce_calc_hem_mhop(struct hns_roce_dev *hr_dev,
105 bool hns_roce_check_whether_mhop(struct hns_roce_dev *hr_dev, u32 type);
110 int hns_roce_hem_list_request(struct hns_roce_dev *hr_dev,
[all …]
H A Dhns_roce_cmd.c41 static int hns_roce_cmd_mbox_post_hw(struct hns_roce_dev *hr_dev, in hns_roce_cmd_mbox_post_hw()
56 static int __hns_roce_cmd_mbox_poll(struct hns_roce_dev *hr_dev, in __hns_roce_cmd_mbox_poll()
78 static int hns_roce_cmd_mbox_poll(struct hns_roce_dev *hr_dev, in hns_roce_cmd_mbox_poll()
90 void hns_roce_cmd_event(struct hns_roce_dev *hr_dev, u16 token, u8 status, in hns_roce_cmd_event()
109 static int __hns_roce_cmd_mbox_wait(struct hns_roce_dev *hr_dev, in __hns_roce_cmd_mbox_wait()
158 static int hns_roce_cmd_mbox_wait(struct hns_roce_dev *hr_dev, in hns_roce_cmd_mbox_wait()
170 int hns_roce_cmd_mbox(struct hns_roce_dev *hr_dev, u64 in_param, u64 out_param, in hns_roce_cmd_mbox()
197 int hns_roce_cmd_init(struct hns_roce_dev *hr_dev) in hns_roce_cmd_init()
211 void hns_roce_cmd_cleanup(struct hns_roce_dev *hr_dev) in hns_roce_cmd_cleanup()
216 int hns_roce_cmd_use_events(struct hns_roce_dev *hr_dev) in hns_roce_cmd_use_events()
[all …]
H A Dhns_roce_pd.c35 void hns_roce_init_pd_table(struct hns_roce_dev *hr_dev) in hns_roce_init_pd_table()
47 struct hns_roce_dev *hr_dev = to_hr_dev(ib_dev); in hns_roce_alloc_pd()
77 struct hns_roce_dev *hr_dev = to_hr_dev(pd->device); in hns_roce_dealloc_pd()
84 int hns_roce_uar_alloc(struct hns_roce_dev *hr_dev, struct hns_roce_uar *uar) in hns_roce_uar_alloc()
111 void hns_roce_init_uar_table(struct hns_roce_dev *hr_dev) in hns_roce_init_uar_table()
120 static int hns_roce_xrcd_alloc(struct hns_roce_dev *hr_dev, u32 *xrcdn) in hns_roce_xrcd_alloc()
136 void hns_roce_init_xrcd_table(struct hns_roce_dev *hr_dev) in hns_roce_init_xrcd_table()
147 struct hns_roce_dev *hr_dev = to_hr_dev(ib_xrcd->device); in hns_roce_alloc_xrcd()
167 struct hns_roce_dev *hr_dev = to_hr_dev(ib_xrcd->device); in hns_roce_dealloc_xrcd()
H A Dhns_roce_srq.c12 void hns_roce_srq_event(struct hns_roce_dev *hr_dev, u32 srqn, int event_type) in hns_roce_srq_event()
37 struct hns_roce_dev *hr_dev = to_hr_dev(srq->ibsrq.device); in hns_roce_ib_srq_event()
62 static int alloc_srqn(struct hns_roce_dev *hr_dev, struct hns_roce_srq *srq) in alloc_srqn()
79 static void free_srqn(struct hns_roce_dev *hr_dev, struct hns_roce_srq *srq) in free_srqn()
84 static int hns_roce_create_srqc(struct hns_roce_dev *hr_dev, in hns_roce_create_srqc()
113 static int alloc_srqc(struct hns_roce_dev *hr_dev, struct hns_roce_srq *srq) in alloc_srqc()
145 static void free_srqc(struct hns_roce_dev *hr_dev, struct hns_roce_srq *srq) in free_srqc()
165 static int alloc_srq_idx(struct hns_roce_dev *hr_dev, struct hns_roce_srq *srq, in alloc_srq_idx()
209 static void free_srq_idx(struct hns_roce_dev *hr_dev, struct hns_roce_srq *srq) in free_srq_idx()
218 static int alloc_srq_wqe_buf(struct hns_roce_dev *hr_dev, in alloc_srq_wqe_buf()
[all …]
H A Dhns_roce_cq.c43 struct hns_roce_dev *hr_dev = to_hr_dev(uctx->ibucontext.device); in hns_roce_put_cq_bankid_for_uctx()
56 struct hns_roce_dev *hr_dev = to_hr_dev(uctx->ibucontext.device); in hns_roce_get_cq_bankid_for_uctx()
99 static u8 select_cq_bankid(struct hns_roce_dev *hr_dev, in select_cq_bankid()
112 static int alloc_cqn(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq, in alloc_cqn()
144 static void free_cqn(struct hns_roce_dev *hr_dev, unsigned long cqn) in free_cqn()
158 static int hns_roce_create_cqc(struct hns_roce_dev *hr_dev, in hns_roce_create_cqc()
186 static int alloc_cqc(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq) in alloc_cqc()
228 static void free_cqc(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq) in free_cqc()
253 static int alloc_cq_buf(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq, in alloc_cq_buf()
274 static void free_cq_buf(struct hns_roce_dev *hr_dev, struct hns_roce_cq *hr_cq) in free_cq_buf()
[all …]
H A Dhns_roce_qp.c41 static struct hns_roce_qp *hns_roce_qp_lookup(struct hns_roce_dev *hr_dev, in hns_roce_qp_lookup()
89 void init_flush_work(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp) in init_flush_work()
106 void flush_cqe(struct hns_roce_dev *dev, struct hns_roce_qp *qp) in flush_cqe()
121 void hns_roce_qp_event(struct hns_roce_dev *hr_dev, u32 qpn, int event_type) in hns_roce_qp_event()
135 void hns_roce_flush_cqe(struct hns_roce_dev *hr_dev, u32 qpn) in hns_roce_flush_cqe()
251 static u8 select_qp_bankid(struct hns_roce_dev *hr_dev, in select_qp_bankid()
279 static int alloc_qpn(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp, in alloc_qpn()
310 static void add_qp_to_list(struct hns_roce_dev *hr_dev, in add_qp_to_list()
333 static int hns_roce_qp_store(struct hns_roce_dev *hr_dev, in hns_roce_qp_store()
354 static int alloc_qpc(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp) in alloc_qpc()
[all …]
H A Dhns_roce_mr.c53 static int alloc_mr_key(struct hns_roce_dev *hr_dev, struct hns_roce_mr *mr) in alloc_mr_key()
83 static void free_mr_key(struct hns_roce_dev *hr_dev, struct hns_roce_mr *mr) in free_mr_key()
91 static int alloc_mr_pbl(struct hns_roce_dev *hr_dev, struct hns_roce_mr *mr, in alloc_mr_pbl()
127 static void free_mr_pbl(struct hns_roce_dev *hr_dev, struct hns_roce_mr *mr) in free_mr_pbl()
132 static void hns_roce_mr_free(struct hns_roce_dev *hr_dev, struct hns_roce_mr *mr) in hns_roce_mr_free()
150 static int hns_roce_mr_enable(struct hns_roce_dev *hr_dev, in hns_roce_mr_enable()
188 void hns_roce_init_mr_table(struct hns_roce_dev *hr_dev) in hns_roce_init_mr_table()
199 struct hns_roce_dev *hr_dev = to_hr_dev(pd->device); in hns_roce_get_dma_mr()
237 struct hns_roce_dev *hr_dev = to_hr_dev(pd->device); in hns_roce_reg_user_mr()
291 struct hns_roce_dev *hr_dev = to_hr_dev(ibmr->device); in hns_roce_rereg_user_mr()
[all …]
H A Dhns_roce_hw_v2.c277 struct hns_roce_dev *hr_dev = to_hr_dev(qp->ibqp.device); in check_inl_data_len()
294 struct hns_roce_dev *hr_dev = to_hr_dev(qp->ibqp.device); in set_rc_inl()
376 static int check_send_valid(struct hns_roce_dev *hr_dev, in check_send_valid()
437 struct hns_roce_dev *hr_dev = to_hr_dev(ib_dev); in fill_ud_av()
516 static int set_rc_opcode(struct hns_roce_dev *hr_dev, in set_rc_opcode()
566 struct hns_roce_dev *hr_dev = to_hr_dev(qp->ibqp.device); in set_rc_wqe()
620 static inline void update_sq_db(struct hns_roce_dev *hr_dev, in update_sq_db()
637 static inline void update_rq_db(struct hns_roce_dev *hr_dev, in update_rq_db()
659 static void hns_roce_write512(struct hns_roce_dev *hr_dev, u64 *val, in hns_roce_write512()
673 static void write_dwqe(struct hns_roce_dev *hr_dev, struct hns_roce_qp *qp, in write_dwqe()
[all …]
H A Dhns_roce_cmd.h145 int hns_roce_cmd_mbox(struct hns_roce_dev *hr_dev, u64 in_param, u64 out_param,
149 hns_roce_alloc_cmd_mailbox(struct hns_roce_dev *hr_dev);
150 void hns_roce_free_cmd_mailbox(struct hns_roce_dev *hr_dev,
152 int hns_roce_create_hw_ctx(struct hns_roce_dev *dev,
155 int hns_roce_destroy_hw_ctx(struct hns_roce_dev *dev, u8 cmd,
H A Dhns_roce_main.c45 static int hns_roce_set_mac(struct hns_roce_dev *hr_dev, u32 port, in hns_roce_set_mac()
66 struct hns_roce_dev *hr_dev = to_hr_dev(attr->device); in hns_roce_add_gid()
80 struct hns_roce_dev *hr_dev = to_hr_dev(attr->device); in hns_roce_del_gid()
92 static int hns_roce_get_port_state(struct hns_roce_dev *hr_dev, u32 port_num, in hns_roce_get_port_state()
118 struct hns_roce_dev *hr_dev, in handle_en_event()
176 struct hns_roce_dev *hr_dev = NULL; in hns_roce_netdev_event()
181 hr_dev = container_of(self, struct hns_roce_dev, iboe.nb); in hns_roce_netdev_event()
202 static int hns_roce_setup_mtu_mac(struct hns_roce_dev *hr_dev) in hns_roce_setup_mtu_mac()
222 struct hns_roce_dev *hr_dev = to_hr_dev(ib_dev); in hns_roce_query_device()
282 struct hns_roce_dev *hr_dev = to_hr_dev(ib_dev); in hns_roce_query_port()
[all …]
H A Dhns_roce_hem.c48 bool hns_roce_check_whether_mhop(struct hns_roce_dev *hr_dev, u32 type) in hns_roce_check_whether_mhop()
122 static int get_hem_table_config(struct hns_roce_dev *hr_dev, in get_hem_table_config()
202 int hns_roce_calc_hem_mhop(struct hns_roce_dev *hr_dev, in hns_roce_calc_hem_mhop()
251 static struct hns_roce_hem *hns_roce_alloc_hem(struct hns_roce_dev *hr_dev, in hns_roce_alloc_hem()
284 void hns_roce_free_hem(struct hns_roce_dev *hr_dev, struct hns_roce_hem *hem) in hns_roce_free_hem()
294 static int calc_hem_config(struct hns_roce_dev *hr_dev, in calc_hem_config()
344 static void free_mhop_hem(struct hns_roce_dev *hr_dev, in free_mhop_hem()
370 static int alloc_mhop_hem(struct hns_roce_dev *hr_dev, in alloc_mhop_hem()
440 static int set_mhop_hem(struct hns_roce_dev *hr_dev, in set_mhop_hem()
478 static int hns_roce_table_mhop_get(struct hns_roce_dev *hr_dev, in hns_roce_table_mhop_get()
[all …]
H A Dhns_roce_bond.c14 static struct hns_roce_dev *hns_roce_get_hrdev_by_netdev(struct net_device *net_dev) in hns_roce_get_hrdev_by_netdev()
22 return container_of(ibdev, struct hns_roce_dev, ib_dev); in hns_roce_get_hrdev_by_netdev()
80 struct hns_roce_dev *hr_dev) in hns_roce_set_bond_netdev()
123 bool hns_roce_bond_is_active(struct hns_roce_dev *hr_dev) in hns_roce_bond_is_active()
164 struct hns_roce_dev *hr_dev) in hns_roce_recover_bond()
182 static struct hns_roce_dev
189 struct hns_roce_dev *hr_dev; in switch_main_dev()
218 static struct hns_roce_dev
222 struct hns_roce_dev *hr_dev = NULL; in hns_roce_slave_init()
324 struct hns_roce_dev *hr_dev; in hns_roce_set_bond()
[all …]
H A Dhns_roce_bond.h62 struct hns_roce_dev *main_hr_dev;
87 int hns_roce_alloc_bond_grp(struct hns_roce_dev *hr_dev);
90 bool hns_roce_bond_is_active(struct hns_roce_dev *hr_dev);
91 int hns_roce_bond_init(struct hns_roce_dev *hr_dev);
H A Dhns_roce_debugfs.h26 struct hns_roce_dev;
30 void hns_roce_register_debugfs(struct hns_roce_dev *hr_dev);
31 void hns_roce_unregister_debugfs(struct hns_roce_dev *hr_dev);
H A Dhns_roce_debugfs.c64 struct hns_roce_dev *hr_dev = file->private; in sw_stat_debugfs_show()
74 static void create_sw_stat_debugfs(struct hns_roce_dev *hr_dev, in create_sw_stat_debugfs()
86 void hns_roce_register_debugfs(struct hns_roce_dev *hr_dev) in hns_roce_register_debugfs()
96 void hns_roce_unregister_debugfs(struct hns_roce_dev *hr_dev) in hns_roce_unregister_debugfs()
H A Dhns_roce_alloc.c38 void hns_roce_buf_free(struct hns_roce_dev *hr_dev, struct hns_roce_buf *buf) in hns_roce_buf_free()
66 struct hns_roce_buf *hns_roce_buf_alloc(struct hns_roce_dev *hr_dev, u32 size, in hns_roce_buf_alloc()
132 int hns_roce_get_kmem_bufs(struct hns_roce_dev *hr_dev, dma_addr_t *bufs, in hns_roce_get_kmem_bufs()
173 void hns_roce_cleanup_bitmap(struct hns_roce_dev *hr_dev) in hns_roce_cleanup_bitmap()
H A Dhns_roce_restrack.c44 struct hns_roce_dev *hr_dev = to_hr_dev(ib_cq->device); in hns_roce_fill_res_cq_entry_raw()
97 struct hns_roce_dev *hr_dev = to_hr_dev(ib_qp->device); in hns_roce_fill_res_qp_entry_raw()
170 struct hns_roce_dev *hr_dev = to_hr_dev(ib_mr->device); in hns_roce_fill_res_mr_entry_raw()
219 struct hns_roce_dev *hr_dev = to_hr_dev(ib_srq->device); in hns_roce_fill_res_srq_entry_raw()
H A Dhns_roce_trace.h176 TP_PROTO(struct hns_roce_dev *hr_dev,
202 TP_PROTO(struct hns_roce_dev *hr_dev,
206 TP_PROTO(struct hns_roce_dev *hr_dev,
H A Dhns_roce_db.c124 int hns_roce_alloc_db(struct hns_roce_dev *hr_dev, struct hns_roce_db *db, in hns_roce_alloc_db()
153 void hns_roce_free_db(struct hns_roce_dev *hr_dev, struct hns_roce_db *db) in hns_roce_free_db()
H A Dhns_roce_ah.c57 struct hns_roce_dev *hr_dev = to_hr_dev(ibah->device); in hns_roce_create_ah()
H A Dhns_roce_hw_v2.h1481 struct hns_roce_dev
1490 static inline void hns_roce_write64(struct hns_roce_dev *hr_dev, __le32 val[2], in hns_roce_write64()