Commit d8d36de9 authored by Allen Pais's avatar Allen Pais Committed by David S. Miller

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: default avatarRomain Perier <romain.perier@gmail.com>
Signed-off-by: default avatarAllen Pais <apais@linux.microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4c58700a
...@@ -3009,10 +3009,10 @@ static int cnic_service_bnx2(void *data, void *status_blk) ...@@ -3009,10 +3009,10 @@ static int cnic_service_bnx2(void *data, void *status_blk)
return cnic_service_bnx2_queues(dev); 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 = from_tasklet(cp, t, cnic_irq_task);
struct cnic_local *cp = dev->cnic_priv; struct cnic_dev *dev = cp->dev;
cp->last_status_idx = cnic_service_bnx2_queues(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) ...@@ -3134,10 +3134,10 @@ static u32 cnic_service_bnx2x_kcq(struct cnic_dev *dev, struct kcq_info *info)
return last_status; 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 = from_tasklet(cp, t, cnic_irq_task);
struct cnic_local *cp = dev->cnic_priv; struct cnic_dev *dev = cp->dev;
struct bnx2x *bp = netdev_priv(dev->netdev); struct bnx2x *bp = netdev_priv(dev->netdev);
u32 status_idx, new_status_idx; u32 status_idx, new_status_idx;
...@@ -4458,8 +4458,7 @@ static int cnic_init_bnx2_irq(struct cnic_dev *dev) ...@@ -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); CNIC_WR(dev, base + BNX2_HC_CMD_TICKS_OFF, (64 << 16) | 220);
cp->last_status_idx = cp->status_blk.bnx2->status_idx; cp->last_status_idx = cp->status_blk.bnx2->status_idx;
tasklet_init(&cp->cnic_irq_task, cnic_service_bnx2_msix, tasklet_setup(&cp->cnic_irq_task, cnic_service_bnx2_msix);
(unsigned long) dev);
err = cnic_request_irq(dev); err = cnic_request_irq(dev);
if (err) if (err)
return err; return err;
...@@ -4868,8 +4867,7 @@ static int cnic_init_bnx2x_irq(struct cnic_dev *dev) ...@@ -4868,8 +4867,7 @@ static int cnic_init_bnx2x_irq(struct cnic_dev *dev)
struct cnic_eth_dev *ethdev = cp->ethdev; struct cnic_eth_dev *ethdev = cp->ethdev;
int err = 0; int err = 0;
tasklet_init(&cp->cnic_irq_task, cnic_service_bnx2x_bh, tasklet_setup(&cp->cnic_irq_task, cnic_service_bnx2x_bh);
(unsigned long) dev);
if (ethdev->drv_state & CNIC_DRV_STATE_USING_MSIX) if (ethdev->drv_state & CNIC_DRV_STATE_USING_MSIX)
err = cnic_request_irq(dev); err = cnic_request_irq(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment