]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bnxt_en: initialize bnxt_pf_wq
authorBrian Maly <brian.maly@oracle.com>
Wed, 14 Mar 2018 19:54:16 +0000 (15:54 -0400)
committerJack Vogel <jack.vogel@oracle.com>
Thu, 15 Mar 2018 01:34:40 +0000 (18:34 -0700)
Orabug: 27674029

Signed-off-by: Brian Maly <brian.maly@oracle.com>
Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 3ee558ee4ee92b21acfabcb19a9f0c84e057e1bf..7a01e283a5f37f6ac9c622d699b24b2056246fe6 100644 (file)
@@ -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;