Skip to content

Commit 2315ec1

Browse files
kwan-intcjgunthorpe
authored andcommitted
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. Fixes: 71d4700 ("IB/hfi1: Create workqueue for link events") Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> Reviewed-by: Mike Marciniszyn <[email protected]> Signed-off-by: Kaike Wan <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 28b70cd commit 2315ec1

File tree

1 file changed

+5
-5
lines changed
  • drivers/infiniband/hw/hfi1

1 file changed

+5
-5
lines changed

drivers/infiniband/hw/hfi1/init.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,10 @@ static void destroy_workqueues(struct hfi1_devdata *dd)
846846
destroy_workqueue(ppd->hfi1_wq);
847847
ppd->hfi1_wq = NULL;
848848
}
849+
if (ppd->link_wq) {
850+
destroy_workqueue(ppd->link_wq);
851+
ppd->link_wq = NULL;
852+
}
849853
}
850854
}
851855

@@ -1122,14 +1126,10 @@ static void shutdown_device(struct hfi1_devdata *dd)
11221126
* We can't count on interrupts since we are stopping.
11231127
*/
11241128
hfi1_quiet_serdes(ppd);
1125-
11261129
if (ppd->hfi1_wq)
11271130
flush_workqueue(ppd->hfi1_wq);
1128-
if (ppd->link_wq) {
1131+
if (ppd->link_wq)
11291132
flush_workqueue(ppd->link_wq);
1130-
destroy_workqueue(ppd->link_wq);
1131-
ppd->link_wq = NULL;
1132-
}
11331133
}
11341134
sdma_exit(dd);
11351135
}

0 commit comments

Comments
 (0)