===================================================================
@@ -957,15 +957,17 @@ void ehca_poll_eqs(unsigned long data)
int max = 3;
volatile u64 q_ofs, q_ofs2;
unsigned long flags;
+
spin_lock_irqsave(&eq->spinlock, flags);
+
q_ofs = eq->ipz_queue.current_q_offset;
- spin_unlock_irqrestore(&eq->spinlock, flags);
do {
- spin_lock_irqsave(&eq->spinlock, flags);
q_ofs2 = eq->ipz_queue.current_q_offset;
- spin_unlock_irqrestore(&eq->spinlock, flags);
max--;
} while (q_ofs == q_ofs2 && max > 0);
+
+ spin_unlock_irqrestore(&eq->spinlock, flags);
+
if (q_ofs == q_ofs2)
ehca_process_eq(shca, 0);
}