qlge: Replace create_singlethread_workqueue with alloc_ordered_workqueue
PATCH v2 1/1 qlge: Replace create_singlethread_workqueue with alloc_ordered_workqueue
Replace deprecated create_singlethread_workqueue with alloc_ordered_workqueue.
Work items include getting tx/rx frame sizes, resetting MPI processor, setting asic recovery bit so ordering seems necessary as only one work item should be in queue/executing at any given time, hence the use of alloc_ordered_workqueue.
WQ_MEM_RECLAIM flag has not been set since this driver doesn't seem to sit in memory reclaim path.
---
Changes in v2:
-Removed WQ_MEM_RECLAIM flag
Not sure if the assumption of requiring ordering of work items is correct.
drivers/net/ethernet/qlogic/qlge/qlge_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/qlogic/qlge/qlge_main.c +1 -1
@@ -4676,7 +4676,7 @@ static int ql_init_device(struct pci_dev *pdev, struct net_device *ndev,/* * Set up the operating parameters. */ - qdev->workqueue =create_singlethread_workqueue (ndev->name); + qdev->workqueue =alloc_ordered_workqueue (ndev->name,0 );INIT_DELAYED_WORK (&qdev->asic_reset_work, ql_asic_reset_work);INIT_DELAYED_WORK (&qdev->mpi_reset_work, ql_mpi_reset_work);INIT_DELAYED_WORK (&qdev->mpi_work, ql_mpi_work);
Signature · 1 line
1.9.1
Hello,
Quoted 10 lines · Amitoj Kaur Chawla
Replace deprecated
create_singlethread_workqueuewithalloc_ordered_workqueue.Work items include getting tx/rx frame sizes, resetting MPI processor, setting asic recovery bit so ordering seems necessary as only one work item should be in queue/executing at any given time, hence the use of
alloc_ordered_workqueue.
WQ_MEM_RECLAIMflag has not been set since this driver doesn't seem to sit in memory reclaim path.
So, apparently, people do put ethernet devices on memory reclaim path, so let's add back WQ_MEM_RECLAIM.
Thanks!
Signature · 1 line
tejun