Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756497AbaAISZT (ORCPT ); Thu, 9 Jan 2014 13:25:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49471 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751751AbaAISZQ (ORCPT ); Thu, 9 Jan 2014 13:25:16 -0500 Message-ID: <1389291911.3209.234.camel@bling.home> Subject: Re: [PATCH] pci/iov: VFs are never multifunction From: Alex Williamson To: Bjorn Helgaas Cc: "linux-pci@vger.kernel.org" , sathya.perla@emulex.com, "linux-kernel@vger.kernel.org" , ajit.khaparde@emulex.com, Don Dutile , subbu.seetharaman@emulex.com, Myron Stowe Date: Thu, 09 Jan 2014 11:25:11 -0700 In-Reply-To: References: <20140109153513.21446.31778.stgit@bling.home> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2014-01-09 at 11:08 -0700, Bjorn Helgaas wrote: > On Thu, Jan 9, 2014 at 8:36 AM, Alex Williamson > wrote: > > Per the SR-IOV spec rev 1.1: > > > > 3.4.1.9 Header Type (Offset 0Eh) > > > > "... For VFs, this register must be RO Zero." > > > > Unfortunately some devices get this wrong, ex. Emulex OneConnect 10Gb > > NIC. When they do it makes us handle ACS testing and therefore IOMMU > > groups as if they were actual multifunction devices and require ACS > > capabilities to make sure there's no peer-to-peer between functions. > > VFs are never traditional multifunction devices, so simply clear this > > bit before we get any further into setup. > > This seems reasonable. Do you have "lspci -vvxxxx" output for this > device? I'd like to save it for future reference. Sure, here's a VF: 09:04.0 Ethernet controller: Emulex Corporation OneConnect 10Gb NIC (be3) (rev 01) Subsystem: Emulex Corporation Device e722 Control: I/O- Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- > Signed-off-by: Alex Williamson > > --- > > drivers/pci/iov.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c > > index 1fe2d6f..e2fbb67 100644 > > --- a/drivers/pci/iov.c > > +++ b/drivers/pci/iov.c > > @@ -84,6 +84,7 @@ static int virtfn_add(struct pci_dev *dev, int id, int reset) > > virtfn->dev.parent = dev->dev.parent; > > virtfn->physfn = pci_dev_get(dev); > > virtfn->is_virtfn = 1; > > + virtfn->multifunction = 0; > > > > for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) { > > res = dev->resource + PCI_IOV_RESOURCES + i; > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/