Skip to content

Commit

Permalink
IB/ehca: Init irq tasklet before irq can happen
Browse files Browse the repository at this point in the history
Initialize tasklet before interrupts are requested to prevent
scheduling of an uninitialized tasklet.

Signed-off-by: Alexander Schmidt <alexs@linux.vnet.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Alexander Schmidt authored and Roland Dreier committed Aug 4, 2010
1 parent e675b6d commit bd5d0cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/infiniband/hw/ehca/ehca_eq.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,21 +122,21 @@ int ehca_create_eq(struct ehca_shca *shca,

/* register interrupt handlers and initialize work queues */
if (type == EHCA_EQ) {
tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);

ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
IRQF_DISABLED, "ehca_eq",
(void *)shca);
if (ret < 0)
ehca_err(ib_dev, "Can't map interrupt handler.");

tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
} else if (type == EHCA_NEQ) {
tasklet_init(&eq->interrupt_task, ehca_tasklet_neq, (long)shca);

ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
IRQF_DISABLED, "ehca_neq",
(void *)shca);
if (ret < 0)
ehca_err(ib_dev, "Can't map interrupt handler.");

tasklet_init(&eq->interrupt_task, ehca_tasklet_neq, (long)shca);
}

eq->is_initialized = 1;
Expand Down

0 comments on commit bd5d0cc

Please sign in to comment.