Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Apr 2018 10:05:23 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r332922 - stable/10/sys/ofed/include/linux
Message-ID:  <201804241005.w3OA5N1m016726@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Tue Apr 24 10:05:23 2018
New Revision: 332922
URL: https://svnweb.freebsd.org/changeset/base/332922

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/10/sys/ofed/include/linux/pci.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/ofed/include/linux/pci.h
==============================================================================
--- stable/10/sys/ofed/include/linux/pci.h	Tue Apr 24 10:03:16 2018	(r332921)
+++ stable/10/sys/ofed/include/linux/pci.h	Tue Apr 24 10:05:23 2018	(r332922)
@@ -349,6 +349,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;
 }
 
 #define	PCI_CAP_ID_EXP	PCIY_EXPRESS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804241005.w3OA5N1m016726>