@@ -129,17 +129,12 @@ static void qed_bmap_release_id(struct qed_hwfn *p_hwfn,
129
129
}
130
130
}
131
131
132
- u32 qed_rdma_get_sb_id (void * p_hwfn , u32 rel_sb_id )
132
+ static u32 qed_rdma_get_sb_id (void * p_hwfn , u32 rel_sb_id )
133
133
{
134
134
/* First sb id for RoCE is after all the l2 sb */
135
135
return FEAT_NUM ((struct qed_hwfn * )p_hwfn , QED_PF_L2_QUE ) + rel_sb_id ;
136
136
}
137
137
138
- u32 qed_rdma_query_cau_timer_res (void * rdma_cxt )
139
- {
140
- return QED_CAU_DEF_RX_TIMER_RES ;
141
- }
142
-
143
138
static int qed_rdma_alloc (struct qed_hwfn * p_hwfn ,
144
139
struct qed_ptt * p_ptt ,
145
140
struct qed_rdma_start_in_params * params )
@@ -275,7 +270,7 @@ static int qed_rdma_alloc(struct qed_hwfn *p_hwfn,
275
270
return rc ;
276
271
}
277
272
278
- void qed_rdma_resc_free (struct qed_hwfn * p_hwfn )
273
+ static void qed_rdma_resc_free (struct qed_hwfn * p_hwfn )
279
274
{
280
275
struct qed_rdma_info * p_rdma_info = p_hwfn -> p_rdma_info ;
281
276
@@ -527,6 +522,26 @@ static int qed_rdma_start_fw(struct qed_hwfn *p_hwfn,
527
522
return qed_spq_post (p_hwfn , p_ent , NULL );
528
523
}
529
524
525
+ static int qed_rdma_alloc_tid (void * rdma_cxt , u32 * itid )
526
+ {
527
+ struct qed_hwfn * p_hwfn = (struct qed_hwfn * )rdma_cxt ;
528
+ int rc ;
529
+
530
+ DP_VERBOSE (p_hwfn , QED_MSG_RDMA , "Allocate TID\n" );
531
+
532
+ spin_lock_bh (& p_hwfn -> p_rdma_info -> lock );
533
+ rc = qed_rdma_bmap_alloc_id (p_hwfn ,
534
+ & p_hwfn -> p_rdma_info -> tid_map , itid );
535
+ spin_unlock_bh (& p_hwfn -> p_rdma_info -> lock );
536
+ if (rc )
537
+ goto out ;
538
+
539
+ rc = qed_cxt_dynamic_ilt_alloc (p_hwfn , QED_ELEM_TASK , * itid );
540
+ out :
541
+ DP_VERBOSE (p_hwfn , QED_MSG_RDMA , "Allocate TID - done, rc = %d\n" , rc );
542
+ return rc ;
543
+ }
544
+
530
545
static int qed_rdma_reserve_lkey (struct qed_hwfn * p_hwfn )
531
546
{
532
547
struct qed_rdma_device * dev = p_hwfn -> p_rdma_info -> dev ;
@@ -573,7 +588,7 @@ static int qed_rdma_setup(struct qed_hwfn *p_hwfn,
573
588
return qed_rdma_start_fw (p_hwfn , params , p_ptt );
574
589
}
575
590
576
- int qed_rdma_stop (void * rdma_cxt )
591
+ static int qed_rdma_stop (void * rdma_cxt )
577
592
{
578
593
struct qed_hwfn * p_hwfn = (struct qed_hwfn * )rdma_cxt ;
579
594
struct rdma_close_func_ramrod_data * p_ramrod ;
@@ -629,8 +644,8 @@ int qed_rdma_stop(void *rdma_cxt)
629
644
return rc ;
630
645
}
631
646
632
- int qed_rdma_add_user (void * rdma_cxt ,
633
- struct qed_rdma_add_user_out_params * out_params )
647
+ static int qed_rdma_add_user (void * rdma_cxt ,
648
+ struct qed_rdma_add_user_out_params * out_params )
634
649
{
635
650
struct qed_hwfn * p_hwfn = (struct qed_hwfn * )rdma_cxt ;
636
651
u32 dpi_start_offset ;
@@ -664,7 +679,7 @@ int qed_rdma_add_user(void *rdma_cxt,
664
679
return rc ;
665
680
}
666
681
667
- struct qed_rdma_port * qed_rdma_query_port (void * rdma_cxt )
682
+ static struct qed_rdma_port * qed_rdma_query_port (void * rdma_cxt )
668
683
{
669
684
struct qed_hwfn * p_hwfn = (struct qed_hwfn * )rdma_cxt ;
670
685
struct qed_rdma_port * p_port = p_hwfn -> p_rdma_info -> port ;
@@ -680,7 +695,7 @@ struct qed_rdma_port *qed_rdma_query_port(void *rdma_cxt)
680
695
return p_port ;
681
696
}
682
697
683
- struct qed_rdma_device * qed_rdma_query_device (void * rdma_cxt )
698
+ static struct qed_rdma_device * qed_rdma_query_device (void * rdma_cxt )
684
699
{
685
700
struct qed_hwfn * p_hwfn = (struct qed_hwfn * )rdma_cxt ;
686
701
@@ -690,7 +705,7 @@ struct qed_rdma_device *qed_rdma_query_device(void *rdma_cxt)
690
705
return p_hwfn -> p_rdma_info -> dev ;
691
706
}
692
707
693
- void qed_rdma_free_tid (void * rdma_cxt , u32 itid )
708
+ static void qed_rdma_free_tid (void * rdma_cxt , u32 itid )
694
709
{
695
710
struct qed_hwfn * p_hwfn = (struct qed_hwfn * )rdma_cxt ;
696
711
@@ -701,27 +716,7 @@ void qed_rdma_free_tid(void *rdma_cxt, u32 itid)
701
716
spin_unlock_bh (& p_hwfn -> p_rdma_info -> lock );
702
717
}
703
718
704
- int qed_rdma_alloc_tid (void * rdma_cxt , u32 * itid )
705
- {
706
- struct qed_hwfn * p_hwfn = (struct qed_hwfn * )rdma_cxt ;
707
- int rc ;
708
-
709
- DP_VERBOSE (p_hwfn , QED_MSG_RDMA , "Allocate TID\n" );
710
-
711
- spin_lock_bh (& p_hwfn -> p_rdma_info -> lock );
712
- rc = qed_rdma_bmap_alloc_id (p_hwfn ,
713
- & p_hwfn -> p_rdma_info -> tid_map , itid );
714
- spin_unlock_bh (& p_hwfn -> p_rdma_info -> lock );
715
- if (rc )
716
- goto out ;
717
-
718
- rc = qed_cxt_dynamic_ilt_alloc (p_hwfn , QED_ELEM_TASK , * itid );
719
- out :
720
- DP_VERBOSE (p_hwfn , QED_MSG_RDMA , "Allocate TID - done, rc = %d\n" , rc );
721
- return rc ;
722
- }
723
-
724
- void qed_rdma_cnq_prod_update (void * rdma_cxt , u8 qz_offset , u16 prod )
719
+ static void qed_rdma_cnq_prod_update (void * rdma_cxt , u8 qz_offset , u16 prod )
725
720
{
726
721
struct qed_hwfn * p_hwfn ;
727
722
u16 qz_num ;
@@ -816,7 +811,7 @@ static int qed_rdma_get_int(struct qed_dev *cdev, struct qed_int_info *info)
816
811
return 0 ;
817
812
}
818
813
819
- int qed_rdma_alloc_pd (void * rdma_cxt , u16 * pd )
814
+ static int qed_rdma_alloc_pd (void * rdma_cxt , u16 * pd )
820
815
{
821
816
struct qed_hwfn * p_hwfn = (struct qed_hwfn * )rdma_cxt ;
822
817
u32 returned_id ;
@@ -1985,9 +1980,9 @@ int qed_roce_destroy_qp(struct qed_hwfn *p_hwfn, struct qed_rdma_qp *qp)
1985
1980
return 0 ;
1986
1981
}
1987
1982
1988
- int qed_rdma_query_qp (void * rdma_cxt ,
1989
- struct qed_rdma_qp * qp ,
1990
- struct qed_rdma_query_qp_out_params * out_params )
1983
+ static int qed_rdma_query_qp (void * rdma_cxt ,
1984
+ struct qed_rdma_qp * qp ,
1985
+ struct qed_rdma_query_qp_out_params * out_params )
1991
1986
{
1992
1987
struct qed_hwfn * p_hwfn = (struct qed_hwfn * )rdma_cxt ;
1993
1988
int rc ;
@@ -2022,7 +2017,7 @@ int qed_rdma_query_qp(void *rdma_cxt,
2022
2017
return rc ;
2023
2018
}
2024
2019
2025
- int qed_rdma_destroy_qp (void * rdma_cxt , struct qed_rdma_qp * qp )
2020
+ static int qed_rdma_destroy_qp (void * rdma_cxt , struct qed_rdma_qp * qp )
2026
2021
{
2027
2022
struct qed_hwfn * p_hwfn = (struct qed_hwfn * )rdma_cxt ;
2028
2023
int rc = 0 ;
@@ -2215,9 +2210,9 @@ static int qed_roce_modify_qp(struct qed_hwfn *p_hwfn,
2215
2210
return rc ;
2216
2211
}
2217
2212
2218
- int qed_rdma_modify_qp (void * rdma_cxt ,
2219
- struct qed_rdma_qp * qp ,
2220
- struct qed_rdma_modify_qp_in_params * params )
2213
+ static int qed_rdma_modify_qp (void * rdma_cxt ,
2214
+ struct qed_rdma_qp * qp ,
2215
+ struct qed_rdma_modify_qp_in_params * params )
2221
2216
{
2222
2217
struct qed_hwfn * p_hwfn = (struct qed_hwfn * )rdma_cxt ;
2223
2218
enum qed_roce_qp_state prev_state ;
@@ -2312,8 +2307,9 @@ int qed_rdma_modify_qp(void *rdma_cxt,
2312
2307
return rc ;
2313
2308
}
2314
2309
2315
- int qed_rdma_register_tid (void * rdma_cxt ,
2316
- struct qed_rdma_register_tid_in_params * params )
2310
+ static int
2311
+ qed_rdma_register_tid (void * rdma_cxt ,
2312
+ struct qed_rdma_register_tid_in_params * params )
2317
2313
{
2318
2314
struct qed_hwfn * p_hwfn = (struct qed_hwfn * )rdma_cxt ;
2319
2315
struct rdma_register_tid_ramrod_data * p_ramrod ;
@@ -2450,7 +2446,7 @@ int qed_rdma_register_tid(void *rdma_cxt,
2450
2446
return rc ;
2451
2447
}
2452
2448
2453
- int qed_rdma_deregister_tid (void * rdma_cxt , u32 itid )
2449
+ static int qed_rdma_deregister_tid (void * rdma_cxt , u32 itid )
2454
2450
{
2455
2451
struct qed_hwfn * p_hwfn = (struct qed_hwfn * )rdma_cxt ;
2456
2452
struct rdma_deregister_tid_ramrod_data * p_ramrod ;
@@ -2561,7 +2557,8 @@ void qed_rdma_dpm_bar(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
2561
2557
qed_rdma_dpm_conf (p_hwfn , p_ptt );
2562
2558
}
2563
2559
2564
- int qed_rdma_start (void * rdma_cxt , struct qed_rdma_start_in_params * params )
2560
+ static int qed_rdma_start (void * rdma_cxt ,
2561
+ struct qed_rdma_start_in_params * params )
2565
2562
{
2566
2563
struct qed_hwfn * p_hwfn = (struct qed_hwfn * )rdma_cxt ;
2567
2564
struct qed_ptt * p_ptt ;
@@ -2601,7 +2598,7 @@ static int qed_rdma_init(struct qed_dev *cdev,
2601
2598
return qed_rdma_start (QED_LEADING_HWFN (cdev ), params );
2602
2599
}
2603
2600
2604
- void qed_rdma_remove_user (void * rdma_cxt , u16 dpi )
2601
+ static void qed_rdma_remove_user (void * rdma_cxt , u16 dpi )
2605
2602
{
2606
2603
struct qed_hwfn * p_hwfn = (struct qed_hwfn * )rdma_cxt ;
2607
2604
0 commit comments