Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Sep 2015 17:06:58 +0000 (UTC)
From:      Jim Harris <jimharris@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: r287678 - stable/10/sys/dev/isci
Message-ID:  <201509111706.t8BH6wTi043253@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jimharris
Date: Fri Sep 11 17:06:57 2015
New Revision: 287678
URL: https://svnweb.freebsd.org/changeset/base/287678

Log:
  MFC r287564:
  
    isci: check return value of pci_alloc_msix()
  
    Certain VM guest types (VMware, Xen) do not support MSI, so pci_alloc_msix()
    always fails.  isci(4) was not properly detecting the allocation failure,
    and would try to proceed with MSIx resource initialization rather than
    reverting to INTx.
  
  Sponsored by:	Intel

Modified:
  stable/10/sys/dev/isci/isci_interrupt.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/isci/isci_interrupt.c
==============================================================================
--- stable/10/sys/dev/isci/isci_interrupt.c	Fri Sep 11 17:01:01 2015	(r287677)
+++ stable/10/sys/dev/isci/isci_interrupt.c	Fri Sep 11 17:06:57 2015	(r287678)
@@ -136,8 +136,8 @@ isci_interrupt_setup(struct isci_softc *
 	    pci_msix_count(isci->device) >= max_msix_messages) {
 
 		isci->num_interrupts = max_msix_messages;
-		pci_alloc_msix(isci->device, &isci->num_interrupts);
-		if (isci->num_interrupts == max_msix_messages)
+		if (pci_alloc_msix(isci->device, &isci->num_interrupts) == 0 &&
+		    isci->num_interrupts == max_msix_messages)
 			use_msix = TRUE;
 	}
 



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