31
31
#include <linux/if_vlan.h>
32
32
#include <linux/prefetch.h>
33
33
#include <linux/random.h>
34
+ #include <linux/workqueue.h>
34
35
#if IS_ENABLED (CONFIG_VLAN_8021Q )
35
36
#define BCM_VLAN 1
36
37
#endif
@@ -3015,9 +3016,9 @@ static int cnic_service_bnx2(void *data, void *status_blk)
3015
3016
return cnic_service_bnx2_queues (dev );
3016
3017
}
3017
3018
3018
- static void cnic_service_bnx2_msix (struct tasklet_struct * t )
3019
+ static void cnic_service_bnx2_msix (struct work_struct * work )
3019
3020
{
3020
- struct cnic_local * cp = from_tasklet (cp , t , cnic_irq_task );
3021
+ struct cnic_local * cp = from_work (cp , work , cnic_irq_bh_work );
3021
3022
struct cnic_dev * dev = cp -> dev ;
3022
3023
3023
3024
cp -> last_status_idx = cnic_service_bnx2_queues (dev );
@@ -3036,7 +3037,7 @@ static void cnic_doirq(struct cnic_dev *dev)
3036
3037
prefetch (cp -> status_blk .gen );
3037
3038
prefetch (& cp -> kcq1 .kcq [KCQ_PG (prod )][KCQ_IDX (prod )]);
3038
3039
3039
- tasklet_schedule ( & cp -> cnic_irq_task );
3040
+ queue_work ( system_bh_wq , & cp -> cnic_irq_bh_work );
3040
3041
}
3041
3042
}
3042
3043
@@ -3140,9 +3141,9 @@ static u32 cnic_service_bnx2x_kcq(struct cnic_dev *dev, struct kcq_info *info)
3140
3141
return last_status ;
3141
3142
}
3142
3143
3143
- static void cnic_service_bnx2x_bh (struct tasklet_struct * t )
3144
+ static void cnic_service_bnx2x_bh_work (struct work_struct * work )
3144
3145
{
3145
- struct cnic_local * cp = from_tasklet (cp , t , cnic_irq_task );
3146
+ struct cnic_local * cp = from_work (cp , work , cnic_irq_bh_work );
3146
3147
struct cnic_dev * dev = cp -> dev ;
3147
3148
struct bnx2x * bp = netdev_priv (dev -> netdev );
3148
3149
u32 status_idx , new_status_idx ;
@@ -4428,7 +4429,7 @@ static void cnic_free_irq(struct cnic_dev *dev)
4428
4429
4429
4430
if (ethdev -> drv_state & CNIC_DRV_STATE_USING_MSIX ) {
4430
4431
cp -> disable_int_sync (dev );
4431
- tasklet_kill (& cp -> cnic_irq_task );
4432
+ cancel_work_sync (& cp -> cnic_irq_bh_work );
4432
4433
free_irq (ethdev -> irq_arr [0 ].vector , dev );
4433
4434
}
4434
4435
}
@@ -4441,7 +4442,7 @@ static int cnic_request_irq(struct cnic_dev *dev)
4441
4442
4442
4443
err = request_irq (ethdev -> irq_arr [0 ].vector , cnic_irq , 0 , "cnic" , dev );
4443
4444
if (err )
4444
- tasklet_disable (& cp -> cnic_irq_task );
4445
+ disable_work_sync (& cp -> cnic_irq_bh_work );
4445
4446
4446
4447
return err ;
4447
4448
}
@@ -4464,7 +4465,7 @@ static int cnic_init_bnx2_irq(struct cnic_dev *dev)
4464
4465
CNIC_WR (dev , base + BNX2_HC_CMD_TICKS_OFF , (64 << 16 ) | 220 );
4465
4466
4466
4467
cp -> last_status_idx = cp -> status_blk .bnx2 -> status_idx ;
4467
- tasklet_setup (& cp -> cnic_irq_task , cnic_service_bnx2_msix );
4468
+ INIT_WORK (& cp -> cnic_irq_bh_work , cnic_service_bnx2_msix );
4468
4469
err = cnic_request_irq (dev );
4469
4470
if (err )
4470
4471
return err ;
@@ -4873,7 +4874,7 @@ static int cnic_init_bnx2x_irq(struct cnic_dev *dev)
4873
4874
struct cnic_eth_dev * ethdev = cp -> ethdev ;
4874
4875
int err = 0 ;
4875
4876
4876
- tasklet_setup (& cp -> cnic_irq_task , cnic_service_bnx2x_bh );
4877
+ INIT_WORK (& cp -> cnic_irq_bh_work , cnic_service_bnx2x_bh_work );
4877
4878
if (ethdev -> drv_state & CNIC_DRV_STATE_USING_MSIX )
4878
4879
err = cnic_request_irq (dev );
4879
4880
0 commit comments