Skip to content

Commit

Permalink
ionic: lif debugfs refresh on reset
Browse files Browse the repository at this point in the history
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: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Shannon Nelson authored and David S. Miller committed Dec 13, 2023
1 parent b0dbe35 commit ce66172
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ static void ionic_reset_prepare(struct pci_dev *pdev)
ionic_txrx_free(lif);
ionic_lif_deinit(lif);
ionic_qcqs_free(lif);
ionic_debugfs_del_lif(lif);
mutex_unlock(&lif->queue_lock);

ionic_dev_teardown(ionic);
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ void ionic_debugfs_add_lif(struct ionic_lif *lif)

void ionic_debugfs_del_lif(struct ionic_lif *lif)
{
if (!lif->dentry)
return;

debugfs_remove_recursive(lif->dentry);
lif->dentry = NULL;
}
Expand Down

0 comments on commit ce66172

Please sign in to comment.