Skip to contentSkip to conversation

ionic: fix up debugfs after queue swap

PATCH Applied Shannon Nelson 2 participants 2 messages Sep 13, 2020 – Sep 14, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ionic: fix up debugfs after queue swap

Clean and rebuild the debugfs info for the queues being swapped.

Fixes a34e25ab977c ("ionic: change the descriptor ring length without full reset")
---
 drivers/net/ethernet/pensando/ionic/ionic_lif.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
drivers/net/ethernet/pensando/ionic/ionic_lif.c +15 -0
index eeaa73650986..895e2113bd6b 100644
@@ -2235,6 +2235,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:
Signature · 1 line
2.17.1