From b81744508b8cdbf72a6aa5b140f4c905c9ee386d Mon Sep 17 00:00:00 2001 From: Shannon Nelson Date: Sun, 13 Sep 2020 12:16:54 -0700 Subject: [PATCH] ionic: fix up debugfs after queue swap Clean and rebuild the debugfs info for the queues being swapped. Fixes: e80ea28a7b8a ("ionic: change the descriptor ring length without full reset") Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index ee683cb142a82..b9816d161142d 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -2241,6 +2241,21 @@ int ionic_reconfigure_queues(struct ionic_lif *lif, } } + /* now we can rework the debugfs mappings */ + if (tx_qcqs) { + for (i = 0; i < qparam->nxqs; i++) { + ionic_debugfs_del_qcq(lif->txqcqs[i]); + ionic_debugfs_add_qcq(lif, lif->txqcqs[i]); + } + } + + if (rx_qcqs) { + for (i = 0; i < qparam->nxqs; i++) { + ionic_debugfs_del_qcq(lif->rxqcqs[i]); + ionic_debugfs_add_qcq(lif, lif->rxqcqs[i]); + } + } + swap(lif->nxqs, qparam->nxqs); err_out_reinit_unlock: -- 2.39.5