aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorAlexander Schmidt <alexs@linux.vnet.ibm.com>2010-07-05 07:41:56 -0400
committerRoland Dreier <rolandd@cisco.com>2010-08-04 19:14:33 -0400
commitbd5d0ccbef9f2565e76dba4ff291da6a2cb8b1b4 (patch)
tree61ea978da4a8b2512f000db036ac78b06137329e /drivers/infiniband
parente675b6db1245649f91bb1bfb10baef9af6d3f8e6 (diff)
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: Alexander Schmidt <alexs@linux.vnet.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_eq.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_eq.c b/drivers/infiniband/hw/ehca/ehca_eq.c
index 3b87589b8ea0..d9b1bb40f480 100644
--- a/drivers/infiniband/hw/ehca/ehca_eq.c
+++ b/drivers/infiniband/hw/ehca/ehca_eq.c
@@ -122,21 +122,21 @@ int ehca_create_eq(struct ehca_shca *shca,
122 122
123 /* register interrupt handlers and initialize work queues */ 123 /* register interrupt handlers and initialize work queues */
124 if (type == EHCA_EQ) { 124 if (type == EHCA_EQ) {
125 tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
126
125 ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq, 127 ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
126 IRQF_DISABLED, "ehca_eq", 128 IRQF_DISABLED, "ehca_eq",
127 (void *)shca); 129 (void *)shca);
128 if (ret < 0) 130 if (ret < 0)
129 ehca_err(ib_dev, "Can't map interrupt handler."); 131 ehca_err(ib_dev, "Can't map interrupt handler.");
130
131 tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
132 } else if (type == EHCA_NEQ) { 132 } else if (type == EHCA_NEQ) {
133 tasklet_init(&eq->interrupt_task, ehca_tasklet_neq, (long)shca);
134
133 ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq, 135 ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
134 IRQF_DISABLED, "ehca_neq", 136 IRQF_DISABLED, "ehca_neq",
135 (void *)shca); 137 (void *)shca);
136 if (ret < 0) 138 if (ret < 0)
137 ehca_err(ib_dev, "Can't map interrupt handler."); 139 ehca_err(ib_dev, "Can't map interrupt handler.");
138
139 tasklet_init(&eq->interrupt_task, ehca_tasklet_neq, (long)shca);
140 } 140 }
141 141
142 eq->is_initialized = 1; 142 eq->is_initialized = 1;