35 #include <linux/module.h>
48 static int internal_err_reset = 1;
51 "Reset device on internal errors if non-zero"
52 " (default 1, in SRIOV mode default is 0)");
60 mlx4_err(dev,
"Internal error detected:\n");
61 for (i = 0; i < priv->
fw.catas_size; ++
i)
66 static void poll_catas(
unsigned long dev_ptr)
73 if (pci_channel_offline(dev->
pdev))
80 if (internal_err_reset) {
81 spin_lock(&catas_lock);
82 list_add(&priv->
catas_err.list, &catas_list);
83 spin_unlock(&catas_lock);
101 spin_lock_irq(&catas_lock);
102 list_splice_init(&catas_list, &tlist);
103 spin_unlock_irq(&catas_lock);
109 if (pci_channel_offline(pdev))
115 pr_err(
"mlx4 %s: Reset failed (%d)\n",
116 pci_name(pdev), ret);
118 dev = pci_get_drvdata(pdev);
130 if (mlx4_is_mfunc(dev))
131 internal_err_reset = 0;
138 priv->
fw.catas_offset;
142 mlx4_warn(dev,
"Failed to map internal error buffer at 0x%llx\n",
143 (
unsigned long long) addr);
148 priv->
catas_err.timer.function = poll_catas;
163 spin_lock_irq(&catas_lock);
165 spin_unlock_irq(&catas_lock);