sparc/pci_msi: Clear the MSI descriptor irq on teardown
Subsystems (3)
PATCH 1/1 sparc/pci_msi: Clear the MSI descriptor irq on teardown
Since commit 2f2940d16823 ("genirq/msi: Remove filter from msi_free_descs_free_range()") the MSI core expects msi_desc::irq to be cleared by the architecture teardown before the descriptor is freed. sparc64_teardown_msi_irq() never clears it, so disabling MSI or MSI-X warns in msi_domain_free_descs() and leaks the descriptor.
Clear it once the MSI has been torn down.
--- arch/sparc/kernel/pci_msi.c | 1 + 1 file changed, 1 insertion(+)
arch/sparc/kernel/pci_msi.c +1 -0
@@ -211,6 +211,7 @@ static void sparc64_teardown_msi_irq(unsigned int irq,free_msi (pbm, msi_num); +irq_get_msi_desc (irq)->irq =0 ;irq_set_chip (irq,NULL );irq_free (irq); }
base-commit: fe2ec83746e501645709761605c2464a44fd2929
Signature · 1 line
2.47.3
[email protected]
AI reviewSashiko has reviewed this patch and found no issues. It looks great!
Quoted 11 lines
Since commit
2f2940d16823("genirq/msi: Remove filter frommsi_free_descs_free_range()") the MSI core expectsmsi_desc::irqto be cleared by the architecture teardown before the descriptor is freed.sparc64_teardown_msi_irq()never clears it, so disabling MSI or MSI-X warns inmsi_domain_free_descs()and leaks the descriptor.Clear it once the MSI has been torn down.
Fixes 2f2940d16823 ("genirq/msi: Remove filter from msi_free_descs_free_range()")Signed-off-by Imre Kaloz <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 7 lines · Imre Kaloz
Since commit
2f2940d16823("genirq/msi: Remove filter frommsi_free_descs_free_range()") the MSI core expectsmsi_desc::irqto be cleared by the architecture teardown before the descriptor is freed.sparc64_teardown_msi_irq()never clears it, so disabling MSI or MSI-X warns inmsi_domain_free_descs()and leaks the descriptor.Clear it once the MSI has been torn down.
Tested on a SPARC T7-1 (M7) with 7.3-rc5 and ixgbe. Without the patch the first MSI-X teardown warns at kernel/irq/msi.c:214. With it, 30 teardowns through ethtool -L and 3 unbind/bind cycles give no warning, and the device keeps the expected number of MSI-X vectors.