|
@@ -7810,16 +7810,22 @@ static void handle_8051_interrupt(struct hfi1_devdata *dd, u32 unused, u64 reg)
|
|
|
if (queue_link_down) {
|
|
|
/*
|
|
|
* if the link is already going down or disabled, do not
|
|
|
- * queue another
|
|
|
+ * queue another. If there's a link down entry already
|
|
|
+ * queued, don't queue another one.
|
|
|
*/
|
|
|
if ((ppd->host_link_state &
|
|
|
(HLS_GOING_OFFLINE | HLS_LINK_COOLDOWN)) ||
|
|
|
- ppd->link_enabled == 0 || ppd->is_link_down_queued) {
|
|
|
- dd_dev_info(dd, "%s: not queuing link down\n",
|
|
|
- __func__);
|
|
|
+ ppd->link_enabled == 0) {
|
|
|
+ dd_dev_info(dd, "%s: not queuing link down. host_link_state %x, link_enabled %x\n",
|
|
|
+ __func__, ppd->host_link_state,
|
|
|
+ ppd->link_enabled);
|
|
|
} else {
|
|
|
- xchg(&ppd->is_link_down_queued, 1);
|
|
|
- queue_work(ppd->link_wq, &ppd->link_down_work);
|
|
|
+ if (xchg(&ppd->is_link_down_queued, 1) == 1)
|
|
|
+ dd_dev_info(dd,
|
|
|
+ "%s: link down request already queued\n",
|
|
|
+ __func__);
|
|
|
+ else
|
|
|
+ queue_work(ppd->link_wq, &ppd->link_down_work);
|
|
|
}
|
|
|
}
|
|
|
}
|