IB/hfi1: Do not destroy link_wq when the device is shut down
commit5.4-rM2-2.2.x-imx-squashed2315ec12ee
upstream. The workqueue link_wq should only be destroyed when the hfi1 driver is unloaded, not when the device is shut down. Fixes:71d47008ca
("IB/hfi1: Create workqueue for link events") Link: https://lore.kernel.org/r/20200623204053.107638.70315.stgit@awfm-01.aw.intel.com Cc: <stable@vger.kernel.org> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Kaike Wan <kaike.wan@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
parent
607fbc27d7
commit
4a215725de
|
@ -860,6 +860,10 @@ static void destroy_workqueues(struct hfi1_devdata *dd)
|
||||||
destroy_workqueue(ppd->hfi1_wq);
|
destroy_workqueue(ppd->hfi1_wq);
|
||||||
ppd->hfi1_wq = NULL;
|
ppd->hfi1_wq = NULL;
|
||||||
}
|
}
|
||||||
|
if (ppd->link_wq) {
|
||||||
|
destroy_workqueue(ppd->link_wq);
|
||||||
|
ppd->link_wq = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1136,14 +1140,10 @@ static void shutdown_device(struct hfi1_devdata *dd)
|
||||||
* We can't count on interrupts since we are stopping.
|
* We can't count on interrupts since we are stopping.
|
||||||
*/
|
*/
|
||||||
hfi1_quiet_serdes(ppd);
|
hfi1_quiet_serdes(ppd);
|
||||||
|
|
||||||
if (ppd->hfi1_wq)
|
if (ppd->hfi1_wq)
|
||||||
flush_workqueue(ppd->hfi1_wq);
|
flush_workqueue(ppd->hfi1_wq);
|
||||||
if (ppd->link_wq) {
|
if (ppd->link_wq)
|
||||||
flush_workqueue(ppd->link_wq);
|
flush_workqueue(ppd->link_wq);
|
||||||
destroy_workqueue(ppd->link_wq);
|
|
||||||
ppd->link_wq = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
sdma_exit(dd);
|
sdma_exit(dd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue