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

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
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -445,12 +445,13 @@ int pdsc_setup(struct pdsc *pdsc, bool init)
		goto err_out_teardown;

	/* Set up the VIFs */
	if (init) {
		err = pdsc_viftypes_init(pdsc);
		if (err)
			goto err_out_teardown;

	if (init)
		pdsc_debugfs_add_viftype(pdsc);
	}

	clear_bit(PDSC_S_FW_DEAD, &pdsc->state);
	return 0;
@@ -469,8 +470,10 @@ void pdsc_teardown(struct pdsc *pdsc, bool removing)
	pdsc_qcq_free(pdsc, &pdsc->notifyqcq);
	pdsc_qcq_free(pdsc, &pdsc->adminqcq);

	if (removing) {
		kfree(pdsc->viftype_status);
		pdsc->viftype_status = NULL;
	}

	if (pdsc->intr_info) {
		for (i = 0; i < pdsc->nintrs; i++)