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

ionic: lif debugfs refresh on reset

Remove and restore the lif's debugfs pointers on a reset,
and make sure to check for the dentry before removing it
in case an earlier reset failed to rebuild the lif.
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 b0dbe358
...@@ -437,6 +437,7 @@ static void ionic_reset_prepare(struct pci_dev *pdev) ...@@ -437,6 +437,7 @@ static void ionic_reset_prepare(struct pci_dev *pdev)
ionic_txrx_free(lif); ionic_txrx_free(lif);
ionic_lif_deinit(lif); ionic_lif_deinit(lif);
ionic_qcqs_free(lif); ionic_qcqs_free(lif);
ionic_debugfs_del_lif(lif);
mutex_unlock(&lif->queue_lock); mutex_unlock(&lif->queue_lock);
ionic_dev_teardown(ionic); ionic_dev_teardown(ionic);
......
...@@ -287,6 +287,9 @@ void ionic_debugfs_add_lif(struct ionic_lif *lif) ...@@ -287,6 +287,9 @@ void ionic_debugfs_add_lif(struct ionic_lif *lif)
void ionic_debugfs_del_lif(struct ionic_lif *lif) void ionic_debugfs_del_lif(struct ionic_lif *lif)
{ {
if (!lif->dentry)
return;
debugfs_remove_recursive(lif->dentry); debugfs_remove_recursive(lif->dentry);
lif->dentry = NULL; lif->dentry = NULL;
} }
......
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