Skip to contentSkip to conversation

FAILED: patch "[PATCH] IB/hfi1: Do not destroy link_wq when the device is shut down" failed to apply to 4.14-stable tree

PATCH [email protected] 1 participant 1 message Jul 13, 2020

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 2315ec12ee8e8257bb335654c62e0cae71dc278d Mon Sep 17 00:00:00 2001
From: Kaike Wan <[email protected]>
Date: Tue, 23 Jun 2020 16:40:53 -0400
Subject: [PATCH] IB/hfi1: Do not destroy link_wq when the device is shut down

The workqueue link_wq should only be destroyed when the hfi1 driver is unloaded, not when the device is shut down.

drivers/infiniband/hw/hfi1/init.c +5 -5
index 16d6788075f3..cb7ad1288821 100644
@@ -846,6 +846,10 @@ static void destroy_workqueues(struct hfi1_devdata *dd)
 			destroy_workqueue(ppd->hfi1_wq);
 			ppd->hfi1_wq = NULL;
 		}
+		if (ppd->link_wq) {
+			destroy_workqueue(ppd->link_wq);
+			ppd->link_wq = NULL;
+		}
 	}
 }
 
@@ -1122,14 +1126,10 @@ static void shutdown_device(struct hfi1_devdata *dd)
 		 * We can't count on interrupts since we are stopping.
 		 */
 		hfi1_quiet_serdes(ppd);
-
 		if (ppd->hfi1_wq)
 			flush_workqueue(ppd->hfi1_wq);
-		if (ppd->link_wq) {
+		if (ppd->link_wq)
 			flush_workqueue(ppd->link_wq);
-			destroy_workqueue(ppd->link_wq);
-			ppd->link_wq = NULL;
-		}
 	}
 	sdma_exit(dd);
 }