Commit be8822db authored by Mustafa Ismail's avatar Mustafa Ismail Committed by Doug Ledford

i40iw: Fix order of cleanup in close

The order for calling i40iw_destroy_pble_pool is incorrect.
Also, add PBLE_CHUNK_MEM init state to track pble pool
creation and destruction.
Signed-off-by: default avatarMustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: default avatarHenry Orosco <henry.orosco@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent ebc9ca43
...@@ -1474,6 +1474,9 @@ static void i40iw_deinit_device(struct i40iw_device *iwdev, bool reset) ...@@ -1474,6 +1474,9 @@ static void i40iw_deinit_device(struct i40iw_device *iwdev, bool reset)
unregister_inet6addr_notifier(&i40iw_inetaddr6_notifier); unregister_inet6addr_notifier(&i40iw_inetaddr6_notifier);
} }
/* fallthrough */ /* fallthrough */
case PBLE_CHUNK_MEM:
i40iw_destroy_pble_pool(dev, iwdev->pble_rsrc);
/* fallthrough */
case CEQ_CREATED: case CEQ_CREATED:
i40iw_dele_ceqs(iwdev, reset); i40iw_dele_ceqs(iwdev, reset);
/* fallthrough */ /* fallthrough */
...@@ -1489,9 +1492,6 @@ static void i40iw_deinit_device(struct i40iw_device *iwdev, bool reset) ...@@ -1489,9 +1492,6 @@ static void i40iw_deinit_device(struct i40iw_device *iwdev, bool reset)
case CCQ_CREATED: case CCQ_CREATED:
i40iw_destroy_ccq(iwdev, reset); i40iw_destroy_ccq(iwdev, reset);
/* fallthrough */ /* fallthrough */
case PBLE_CHUNK_MEM:
i40iw_destroy_pble_pool(dev, iwdev->pble_rsrc);
/* fallthrough */
case HMC_OBJS_CREATED: case HMC_OBJS_CREATED:
i40iw_del_hmc_objects(dev, dev->hmc_info, true, reset); i40iw_del_hmc_objects(dev, dev->hmc_info, true, reset);
/* fallthrough */ /* fallthrough */
...@@ -1670,6 +1670,7 @@ static int i40iw_open(struct i40e_info *ldev, struct i40e_client *client) ...@@ -1670,6 +1670,7 @@ static int i40iw_open(struct i40e_info *ldev, struct i40e_client *client)
status = i40iw_hmc_init_pble(&iwdev->sc_dev, iwdev->pble_rsrc); status = i40iw_hmc_init_pble(&iwdev->sc_dev, iwdev->pble_rsrc);
if (status) if (status)
break; break;
iwdev->init_state = PBLE_CHUNK_MEM;
iwdev->virtchnl_wq = alloc_ordered_workqueue("iwvch", WQ_MEM_RECLAIM); iwdev->virtchnl_wq = alloc_ordered_workqueue("iwvch", WQ_MEM_RECLAIM);
i40iw_register_notifiers(); i40iw_register_notifiers();
iwdev->init_state = INET_NOTIFIER; iwdev->init_state = INET_NOTIFIER;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment