From d2782739c1498e4425dcdeb79f90f9291e58f6f6 Mon Sep 17 00:00:00 2001 From: Bob Sharp Date: Mon, 16 Oct 2017 15:46:05 -0500 Subject: [PATCH] i40iw: Move cqp_cmd_head init to CQP initialization Control QP (CQP) command backlog list is initialized at device initialization time. It is not reinitialized in the reset flow. Move the initialization to CQP creation time so the list can be initialized correctly for reset as well. Fixes: 86dbcd0f12e9 ("i40iw: add file to handle cqp calls") Signed-off-by: Bob Sharp Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford --- drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c index c8a40b3..d88c6cf 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c +++ b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c @@ -482,6 +482,7 @@ static enum i40iw_status_code i40iw_sc_cqp_init(struct i40iw_sc_cqp *cqp, I40IW_RING_INIT(cqp->sq_ring, cqp->sq_size); cqp->dev->cqp_cmd_stats[OP_REQUESTED_COMMANDS] = 0; cqp->dev->cqp_cmd_stats[OP_COMPLETED_COMMANDS] = 0; + INIT_LIST_HEAD(&cqp->dev->cqp_cmd_head); /* for the cqp commands backlog. */ i40iw_wr32(cqp->dev->hw, I40E_PFPE_CQPTAIL, 0); i40iw_wr32(cqp->dev->hw, I40E_PFPE_CQPDB, 0); @@ -5067,7 +5068,6 @@ enum i40iw_status_code i40iw_device_init(struct i40iw_sc_dev *dev, u8 db_size; spin_lock_init(&dev->cqp_lock); - INIT_LIST_HEAD(&dev->cqp_cmd_head); /* for the cqp commands backlog. */ i40iw_device_init_uk(&dev->dev_uk); -- 2.7.4