IB/ehca: In case of lost interrupts, trigger EOI to reenable interrupts
PATCH 2/2 IB/ehca: In case of lost interrupts, trigger EOI to reenable interrupts
Signed-off-by Stefan Roscher <[email protected]>
--- drivers/infiniband/hw/ehca/ehca_classes.h | 1 + drivers/infiniband/hw/ehca/ehca_eq.c | 6 ++++-- drivers/infiniband/hw/ehca/ehca_main.c | 12 ++++++++++-- 3 files changed, 15 insertions(+), 4 deletions(-)
drivers/infiniband/hw/ehca/ehca_classes.h +1 -0
@@ -86,6 +86,7 @@ struct ehca_eq {u32 ist;spinlock_t irq_spinlock;struct ehca_eqe_cache_entry eqe_cache[EHCA_EQE_CACHE_SIZE ]; +int irq_number; };struct ehca_sma_attr {
drivers/infiniband/hw/ehca/ehca_eq.c +4 -2
@@ -122,7 +122,8 @@ int ehca_create_eq(struct ehca_shca *shca,/* register interrupt handlers and initialize work queues */ if (type ==EHCA_EQ ) { - ret =ibmebus_request_irq (eq->ist,NULL , ehca_interrupt_eq, + ret =ibmebus_request_irq (eq->ist, &eq->irq_number, + ehca_interrupt_eq,IRQF_DISABLED ,"ehca_eq" , (void *)shca);if (ret <0 )
@@ -130,7 +131,8 @@ int ehca_create_eq(struct ehca_shca *shca,tasklet_init (&eq->interrupt_task, ehca_tasklet_eq, (long )shca); }else if (type ==EHCA_NEQ ) { - ret =ibmebus_request_irq (eq->ist,NULL , ehca_interrupt_neq, + ret =ibmebus_request_irq (eq->ist, &eq->irq_number, + ehca_interrupt_neq,IRQF_DISABLED ,"ehca_neq" , (void *)shca);if (ret <0 )
drivers/infiniband/hw/ehca/ehca_main.c +10 -2
@@ -44,6 +44,7 @@#include <linux/slab.h> #endif +#include <linux/irq.h> #include "ehca_classes.h" #include "ehca_iverbs.h" #include "ehca_mrmw.h"
@@ -937,6 +938,8 @@ static struct of_platform_driver ehca_driver = {void ehca_poll_eqs (unsigned long data) {struct ehca_shca *shca; +int irq; +irq_desc_t *desc;spin_lock (&shca_list_lock);list_for_each_entry (shca, &shca_list, shca_list) {
@@ -955,8 +958,13 @@ void ehca_poll_eqs(unsigned long data)spin_unlock_irqrestore (&eq->spinlock, flags); max--; }while (q_ofs == q_ofs2 && max >0 ); -if (q_ofs == q_ofs2) -ehca_process_eq (shca,0 ); +if (q_ofs == q_ofs2) { + irq = shca->eq.irq_number; + desc =get_irq_desc (irq); +if (desc->chip && desc->chip->eoi) + desc->chip->eoi (irq); +tasklet_hi_schedule (&shca->eq.interrupt_task); + } } }mod_timer (&poll_eqs_timer,round_jiffies (jiffies +HZ ));
Signature · 1 line
1.5.5
drivers/infiniband/hw/ehca/ehca_main.c void ehca_poll_eqs(unsigned long data) · line 965
Quoted 2 lines
drivers/infiniband/hw/ehca/ehca_main.c +2
-0+if (desc->chip && desc->chip->eoi) + desc->chip->eoi (irq);
This doesn't seem like the type of thing a device driver should be doing. Both patches are rather short on changelog text -- what is the issue here and how does this fix it?
- R.