cnic: convert tasklets to use new tasklet_setup() API
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier <romain.perier@gmail.com> Signed-off-by: Allen Pais <apais@linux.microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4c58700ad8
commit
d8d36de9d0
|
@ -3009,10 +3009,10 @@ static int cnic_service_bnx2(void *data, void *status_blk)
|
|||
return cnic_service_bnx2_queues(dev);
|
||||
}
|
||||
|
||||
static void cnic_service_bnx2_msix(unsigned long data)
|
||||
static void cnic_service_bnx2_msix(struct tasklet_struct *t)
|
||||
{
|
||||
struct cnic_dev *dev = (struct cnic_dev *) data;
|
||||
struct cnic_local *cp = dev->cnic_priv;
|
||||
struct cnic_local *cp = from_tasklet(cp, t, cnic_irq_task);
|
||||
struct cnic_dev *dev = cp->dev;
|
||||
|
||||
cp->last_status_idx = cnic_service_bnx2_queues(dev);
|
||||
|
||||
|
@ -3134,10 +3134,10 @@ static u32 cnic_service_bnx2x_kcq(struct cnic_dev *dev, struct kcq_info *info)
|
|||
return last_status;
|
||||
}
|
||||
|
||||
static void cnic_service_bnx2x_bh(unsigned long data)
|
||||
static void cnic_service_bnx2x_bh(struct tasklet_struct *t)
|
||||
{
|
||||
struct cnic_dev *dev = (struct cnic_dev *) data;
|
||||
struct cnic_local *cp = dev->cnic_priv;
|
||||
struct cnic_local *cp = from_tasklet(cp, t, cnic_irq_task);
|
||||
struct cnic_dev *dev = cp->dev;
|
||||
struct bnx2x *bp = netdev_priv(dev->netdev);
|
||||
u32 status_idx, new_status_idx;
|
||||
|
||||
|
@ -4458,8 +4458,7 @@ static int cnic_init_bnx2_irq(struct cnic_dev *dev)
|
|||
CNIC_WR(dev, base + BNX2_HC_CMD_TICKS_OFF, (64 << 16) | 220);
|
||||
|
||||
cp->last_status_idx = cp->status_blk.bnx2->status_idx;
|
||||
tasklet_init(&cp->cnic_irq_task, cnic_service_bnx2_msix,
|
||||
(unsigned long) dev);
|
||||
tasklet_setup(&cp->cnic_irq_task, cnic_service_bnx2_msix);
|
||||
err = cnic_request_irq(dev);
|
||||
if (err)
|
||||
return err;
|
||||
|
@ -4868,8 +4867,7 @@ static int cnic_init_bnx2x_irq(struct cnic_dev *dev)
|
|||
struct cnic_eth_dev *ethdev = cp->ethdev;
|
||||
int err = 0;
|
||||
|
||||
tasklet_init(&cp->cnic_irq_task, cnic_service_bnx2x_bh,
|
||||
(unsigned long) dev);
|
||||
tasklet_setup(&cp->cnic_irq_task, cnic_service_bnx2x_bh);
|
||||
if (ethdev->drv_state & CNIC_DRV_STATE_USING_MSIX)
|
||||
err = cnic_request_irq(dev);
|
||||
|
||||
|
|
Loading…
Reference in New Issue