34 #include <linux/module.h>
55 static int catas_reset_disable;
57 MODULE_PARM_DESC(catas_reset_disable,
"disable reset on catastrophic event if nonzero");
67 spin_lock_irq(&catas_lock);
68 list_splice_init(&catas_list, &tlist);
69 spin_unlock_irq(&catas_lock);
87 static void handle_catas(
struct mthca_dev *dev)
94 event.device = &dev->
ib_dev;
96 event.element.port_num = 0;
103 type =
"internal error";
106 type =
"uplink bus error";
109 type =
"DDR data error";
112 type =
"internal parity error";
115 type =
"unknown error";
119 mthca_err(dev,
"Catastrophic error detected: %s\n", type);
124 if (catas_reset_disable)
128 list_add(&dev->
catas_err.list, &catas_list);
130 spin_unlock_irqrestore(&catas_lock, flags);
133 static void poll_catas(
unsigned long dev_ptr)
161 mthca_warn(dev,
"couldn't map catastrophic error region "
162 "at 0x%llx/0x%x\n", (
unsigned long long) addr,
168 dev->
catas_err.timer.function = poll_catas;
181 spin_lock_irq(&catas_lock);
183 spin_unlock_irq(&catas_lock);