Date: Mon, 7 Sep 2015 20:59:20 -0700 From: Jim Harris <jim.harris@gmail.com> To: "Bradley W. Dutton" <brad-fbsd-stable@duttonbros.com> Cc: Scott Long <scottl@samsco.org>, FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org> Subject: Re: ISCI bus_alloc_resource failed Message-ID: <CAJP=Hc-7CSvMPD_u21dTf38gKyeNt8vPGZmaWYdLn=r2WRp7yg@mail.gmail.com> In-Reply-To: <20150907192909.Horde.sDaQSSkewl4vEHh-rJLXcfb@duttonbros.com> References: <20150907103435.Horde.z4GgTZD3-chqVxPgZhMklyM@duttonbros.com> <514DD6B2-EBC3-43F7-8C2A-F8A1C77463F0@samsco.org> <20150907192909.Horde.sDaQSSkewl4vEHh-rJLXcfb@duttonbros.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Mon, Sep 7, 2015 at 7:29 PM, Bradley W. Dutton < brad-fbsd-stable@duttonbros.com> wrote: > There are 2 devices in the same group so I passed both of them: > http://duttonbrosllc.com/misc/vmware_esxi_passthrough_config.png > > At the time I wasn't sure if this was necessary but I just tried the > Centos 7 VM and it worked without the SMBus device being passed through. I > then tried the FreeBSD VM without SMBus and saw the same allocation error > as before. Looks like the SMBus device is a red herring? > > Looks like on ESXi we are using Xen HVM init ops, which do not enable MSI. And the isci driver is not reverting to INTx resource allocation when MSIx vector allocation fails. I've added reverting to INTx in the attached patch - can you try once more? Thanks, -Jim [-- Attachment #2 --] diff --git a/sys/dev/isci/isci.c b/sys/dev/isci/isci.c index 2f0727d..5a1066c 100644 --- a/sys/dev/isci/isci.c +++ b/sys/dev/isci/isci.c @@ -163,6 +163,7 @@ isci_attach(device_t device) g_isci = isci; isci->device = device; + pci_enable_busmaster(device); isci_allocate_pci_memory(isci); @@ -272,6 +273,7 @@ isci_detach(device_t device) pci_release_msi(device); } + pci_disable_busmaster(device); return (0); } diff --git a/sys/dev/isci/isci_interrupt.c b/sys/dev/isci/isci_interrupt.c index 52c64f7..b56fd3a 100644 --- a/sys/dev/isci/isci_interrupt.c +++ b/sys/dev/isci/isci_interrupt.c @@ -136,8 +136,8 @@ isci_interrupt_setup(struct isci_softc *isci) 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?CAJP=Hc-7CSvMPD_u21dTf38gKyeNt8vPGZmaWYdLn=r2WRp7yg>
