From: Brian Maly Date: Wed, 14 Mar 2018 19:54:16 +0000 (-0400) Subject: bnxt_en: initialize bnxt_pf_wq X-Git-Tag: v4.1.12-124.31.3~913 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5ee90451dd8513459f3daa8b8c2995aeec053cc6;p=users%2Fjedix%2Flinux-maple.git bnxt_en: initialize bnxt_pf_wq Orabug: 27674029 Signed-off-by: Brian Maly Reviewed-by: Si-Wei Liu --- diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 3ee558ee4ee92..7a01e283a5f37 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -1064,7 +1064,7 @@ static void bnxt_queue_sp_work(struct bnxt *bp) if (BNXT_PF(bp)) queue_work(bnxt_pf_wq, &bp->sp_task); else - bnxt_queue_sp_work(bp); + schedule_work(&bp->sp_task); } static void bnxt_cancel_sp_work(struct bnxt *bp) @@ -8484,6 +8484,17 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) bnxt_hwrm_set_cache_line_size(bp, cache_line_size()); + if (BNXT_PF(bp)) { + if (!bnxt_pf_wq) { + bnxt_pf_wq = + create_singlethread_workqueue("bnxt_pf_wq"); + if (!bnxt_pf_wq) { + dev_err(&pdev->dev, "Unable to create workqueue.\n"); + goto init_err_pci_clean; + } + } + } + rc = register_netdev(dev); if (rc) goto init_err_clr_int;