1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-01 12:19:28 +00:00

Clear old MSIX IRQ numbers in the LinuxKPI.

When disabling the MSIX IRQ vectors for a PCI device through the
LinuxKPI, make sure any old MSIX IRQ numbers are no longer visible to
the linux_pci_find_irq_dev() function else IRQs can be requested from
the wrong PCI device.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2018-03-22 12:26:27 +00:00
parent bb0f707ee3
commit e1992aa142
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=331355

View File

@ -425,6 +425,15 @@ pci_disable_msix(struct pci_dev *pdev)
{
pci_release_msi(pdev->dev.bsddev);
/*
* The MSIX IRQ numbers associated with this PCI device are no
* longer valid and might be re-assigned. Make sure
* linux_pci_find_irq_dev() does no longer see them by
* resetting their references to zero:
*/
pdev->dev.msix = 0;
pdev->dev.msix_max = 0;
}
static inline bus_addr_t