提交 bd5d0ccb 编写于 作者: A Alexander Schmidt 提交者: Roland Dreier

IB/ehca: Init irq tasklet before irq can happen

Initialize tasklet before interrupts are requested to prevent
scheduling of an uninitialized tasklet.
Signed-off-by: NAlexander Schmidt <alexs@linux.vnet.ibm.com>
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
上级 e675b6db
...@@ -122,21 +122,21 @@ int ehca_create_eq(struct ehca_shca *shca, ...@@ -122,21 +122,21 @@ int ehca_create_eq(struct ehca_shca *shca,
/* register interrupt handlers and initialize work queues */ /* register interrupt handlers and initialize work queues */
if (type == EHCA_EQ) { if (type == EHCA_EQ) {
tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq, ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
IRQF_DISABLED, "ehca_eq", IRQF_DISABLED, "ehca_eq",
(void *)shca); (void *)shca);
if (ret < 0) if (ret < 0)
ehca_err(ib_dev, "Can't map interrupt handler."); ehca_err(ib_dev, "Can't map interrupt handler.");
tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
} else if (type == EHCA_NEQ) { } else if (type == EHCA_NEQ) {
tasklet_init(&eq->interrupt_task, ehca_tasklet_neq, (long)shca);
ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq, ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
IRQF_DISABLED, "ehca_neq", IRQF_DISABLED, "ehca_neq",
(void *)shca); (void *)shca);
if (ret < 0) if (ret < 0)
ehca_err(ib_dev, "Can't map interrupt handler."); ehca_err(ib_dev, "Can't map interrupt handler.");
tasklet_init(&eq->interrupt_task, ehca_tasklet_neq, (long)shca);
} }
eq->is_initialized = 1; eq->is_initialized = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册