Commit d557c094 authored by Shannon Nelson's avatar Shannon Nelson Committed by David S. Miller

pds_core: keep viftypes table across reset

Keep the viftypes and the current enable/disable states
across a recovery action.
Signed-off-by: default avatarShannon Nelson <shannon.nelson@amd.com>
Reviewed-by: default avatarBrett Creeley <brett.creeley@amd.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f7b5bd72
...@@ -445,12 +445,13 @@ int pdsc_setup(struct pdsc *pdsc, bool init) ...@@ -445,12 +445,13 @@ int pdsc_setup(struct pdsc *pdsc, bool init)
goto err_out_teardown; goto err_out_teardown;
/* Set up the VIFs */ /* Set up the VIFs */
err = pdsc_viftypes_init(pdsc); if (init) {
if (err) err = pdsc_viftypes_init(pdsc);
goto err_out_teardown; if (err)
goto err_out_teardown;
if (init)
pdsc_debugfs_add_viftype(pdsc); pdsc_debugfs_add_viftype(pdsc);
}
clear_bit(PDSC_S_FW_DEAD, &pdsc->state); clear_bit(PDSC_S_FW_DEAD, &pdsc->state);
return 0; return 0;
...@@ -469,8 +470,10 @@ void pdsc_teardown(struct pdsc *pdsc, bool removing) ...@@ -469,8 +470,10 @@ void pdsc_teardown(struct pdsc *pdsc, bool removing)
pdsc_qcq_free(pdsc, &pdsc->notifyqcq); pdsc_qcq_free(pdsc, &pdsc->notifyqcq);
pdsc_qcq_free(pdsc, &pdsc->adminqcq); pdsc_qcq_free(pdsc, &pdsc->adminqcq);
kfree(pdsc->viftype_status); if (removing) {
pdsc->viftype_status = NULL; kfree(pdsc->viftype_status);
pdsc->viftype_status = NULL;
}
if (pdsc->intr_info) { if (pdsc->intr_info) {
for (i = 0; i < pdsc->nintrs; i++) for (i = 0; i < pdsc->nintrs; i++)
......
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