svn commit: r331801 - stable/11/sys/compat/linuxkpi/common/include/linux

Hans Petter Selasky hselasky at FreeBSD.org
Fri Mar 30 18:53:13 UTC 2018


Author: hselasky
Date: Fri Mar 30 18:53:12 2018
New Revision: 331801
URL: https://svnweb.freebsd.org/changeset/base/331801

Log:
  MFC r331355:
  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.
  
  Sponsored by:	Mellanox Technologies

Modified:
  stable/11/sys/compat/linuxkpi/common/include/linux/pci.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linuxkpi/common/include/linux/pci.h
==============================================================================
--- stable/11/sys/compat/linuxkpi/common/include/linux/pci.h	Fri Mar 30 18:52:24 2018	(r331800)
+++ stable/11/sys/compat/linuxkpi/common/include/linux/pci.h	Fri Mar 30 18:53:12 2018	(r331801)
@@ -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


More information about the svn-src-all mailing list