@@ -1008,7 +1008,7 @@ static irqreturn_t otx2_pfaf_mbox_intr_handler(int irq, void *pf_irq)
1008
1008
return IRQ_HANDLED ;
1009
1009
}
1010
1010
1011
- static void otx2_disable_mbox_intr (struct otx2_nic * pf )
1011
+ void otx2_disable_mbox_intr (struct otx2_nic * pf )
1012
1012
{
1013
1013
int vector = pci_irq_vector (pf -> pdev , RVU_PF_INT_VEC_AFPF_MBOX );
1014
1014
@@ -1017,7 +1017,7 @@ static void otx2_disable_mbox_intr(struct otx2_nic *pf)
1017
1017
free_irq (vector , pf );
1018
1018
}
1019
1019
1020
- static int otx2_register_mbox_intr (struct otx2_nic * pf , bool probe_af )
1020
+ int otx2_register_mbox_intr (struct otx2_nic * pf , bool probe_af )
1021
1021
{
1022
1022
struct otx2_hw * hw = & pf -> hw ;
1023
1023
struct msg_req * req ;
@@ -1061,7 +1061,7 @@ static int otx2_register_mbox_intr(struct otx2_nic *pf, bool probe_af)
1061
1061
return 0 ;
1062
1062
}
1063
1063
1064
- static void otx2_pfaf_mbox_destroy (struct otx2_nic * pf )
1064
+ void otx2_pfaf_mbox_destroy (struct otx2_nic * pf )
1065
1065
{
1066
1066
struct mbox * mbox = & pf -> mbox ;
1067
1067
@@ -1077,7 +1077,7 @@ static void otx2_pfaf_mbox_destroy(struct otx2_nic *pf)
1077
1077
otx2_mbox_destroy (& mbox -> mbox_up );
1078
1078
}
1079
1079
1080
- static int otx2_pfaf_mbox_init (struct otx2_nic * pf )
1080
+ int otx2_pfaf_mbox_init (struct otx2_nic * pf )
1081
1081
{
1082
1082
struct mbox * mbox = & pf -> mbox ;
1083
1083
void __iomem * hwbase ;
@@ -1379,7 +1379,7 @@ static irqreturn_t otx2_q_intr_handler(int irq, void *data)
1379
1379
return IRQ_HANDLED ;
1380
1380
}
1381
1381
1382
- static irqreturn_t otx2_cq_intr_handler (int irq , void * cq_irq )
1382
+ irqreturn_t otx2_cq_intr_handler (int irq , void * cq_irq )
1383
1383
{
1384
1384
struct otx2_cq_poll * cq_poll = (struct otx2_cq_poll * )cq_irq ;
1385
1385
struct otx2_nic * pf = (struct otx2_nic * )cq_poll -> dev ;
@@ -1399,15 +1399,18 @@ static irqreturn_t otx2_cq_intr_handler(int irq, void *cq_irq)
1399
1399
return IRQ_HANDLED ;
1400
1400
}
1401
1401
1402
- static void otx2_disable_napi (struct otx2_nic * pf )
1402
+ void otx2_disable_napi (struct otx2_nic * pf )
1403
1403
{
1404
1404
struct otx2_qset * qset = & pf -> qset ;
1405
1405
struct otx2_cq_poll * cq_poll ;
1406
+ struct work_struct * work ;
1406
1407
int qidx ;
1407
1408
1408
1409
for (qidx = 0 ; qidx < pf -> hw .cint_cnt ; qidx ++ ) {
1409
1410
cq_poll = & qset -> napi [qidx ];
1410
- cancel_work_sync (& cq_poll -> dim .work );
1411
+ work = & cq_poll -> dim .work ;
1412
+ if (work -> func )
1413
+ cancel_work_sync (work );
1411
1414
napi_disable (& cq_poll -> napi );
1412
1415
netif_napi_del (& cq_poll -> napi );
1413
1416
}
@@ -1477,7 +1480,7 @@ static int otx2_get_rbuf_size(struct otx2_nic *pf, int mtu)
1477
1480
return ALIGN (rbuf_size , 2048 );
1478
1481
}
1479
1482
1480
- static int otx2_init_hw_resources (struct otx2_nic * pf )
1483
+ int otx2_init_hw_resources (struct otx2_nic * pf )
1481
1484
{
1482
1485
struct nix_lf_free_req * free_req ;
1483
1486
struct mbox * mbox = & pf -> mbox ;
@@ -1602,7 +1605,7 @@ static int otx2_init_hw_resources(struct otx2_nic *pf)
1602
1605
return err ;
1603
1606
}
1604
1607
1605
- static void otx2_free_hw_resources (struct otx2_nic * pf )
1608
+ void otx2_free_hw_resources (struct otx2_nic * pf )
1606
1609
{
1607
1610
struct otx2_qset * qset = & pf -> qset ;
1608
1611
struct nix_lf_free_req * free_req ;
@@ -2807,7 +2810,7 @@ static const struct net_device_ops otx2_netdev_ops = {
2807
2810
.ndo_set_vf_trust = otx2_ndo_set_vf_trust ,
2808
2811
};
2809
2812
2810
- static int otx2_wq_init (struct otx2_nic * pf )
2813
+ int otx2_wq_init (struct otx2_nic * pf )
2811
2814
{
2812
2815
pf -> otx2_wq = create_singlethread_workqueue ("otx2_wq" );
2813
2816
if (!pf -> otx2_wq )
@@ -2818,7 +2821,7 @@ static int otx2_wq_init(struct otx2_nic *pf)
2818
2821
return 0 ;
2819
2822
}
2820
2823
2821
- static int otx2_check_pf_usable (struct otx2_nic * nic )
2824
+ int otx2_check_pf_usable (struct otx2_nic * nic )
2822
2825
{
2823
2826
u64 rev ;
2824
2827
@@ -2836,7 +2839,7 @@ static int otx2_check_pf_usable(struct otx2_nic *nic)
2836
2839
return 0 ;
2837
2840
}
2838
2841
2839
- static int otx2_realloc_msix_vectors (struct otx2_nic * pf )
2842
+ int otx2_realloc_msix_vectors (struct otx2_nic * pf )
2840
2843
{
2841
2844
struct otx2_hw * hw = & pf -> hw ;
2842
2845
int num_vec , err ;
0 commit comments