Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2715951yba; Mon, 6 May 2019 10:24:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwU+2VxyCsTdVd1vs6yZ7atnMLJFhNE8BVp6AvYJZS3egdn2L+SpAUgBIcEALU0d2CVmwKK X-Received: by 2002:a63:fb01:: with SMTP id o1mr33333185pgh.135.1557163446922; Mon, 06 May 2019 10:24:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557163446; cv=none; d=google.com; s=arc-20160816; b=IWZzxwXraoCOc7Eikw4iWHcyhXAPOKMQZcGKrpek7GmMJKRNHP8haUXa2Gt4znCoiT 3aD+foUioVCbuuHUybBCK6ifUsEkncbfc8s3kr3F9elyAbtbchQ6WFPAm8KkbG3Czezr e6oKDXlhHB3eA/Zum3z7M4AahlQrYzxbCt5eWEoQeaxUacoYooeykdEBntTpry7yxsvr bKnNwDr3blfuvmiXqs5eBxXl+DyBpgzdEx0oaE9nbPfg/LH9210DtkJpKPIKper3iG/L fcvSBobrKARFY/blL/OY2XPn4a0mdN3TQ9CAYE1hLRN9hpS84XQR6nYJ420aAlPa6SGQ 5bBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=hcMchoTyIojqV0o7IWI1K5Y6hFE2FgyH3+SLMpR45Qs=; b=brkU8vmqj0/nbg0E4yIEn8sRQSSeTACRlXbY5/JwkVYqRLmzPgQ+e7J978UCq1WJp1 ksRUtTRIlGCSl50REnHCZCejKL2lk1Pt6XnV3Uaq1VfpmO2hnjWMTMwCkUKE66IoEcc9 Fw5IgiuitT2lZgBnjem4HJBVVINZ+FZoGTlMmPHcCanVoEovxtdz99jD2sTCsZ9BNRtq jp6XOLJA0jwLtpcP4px5KV8H0WCYYAEtjWDXBQyddqZs6Hc3EuI0o9BQy5plRqrF12QS enx3A5UnuAGWqOVVytqk81wHV8+piQ9e59DC3wXpFM2VA1phoGsoRIcCIXm0MfZkKRkz GHEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v11si16288147pgh.22.2019.05.06.10.23.51; Mon, 06 May 2019 10:24:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727057AbfEFRWc (ORCPT + 99 others); Mon, 6 May 2019 13:22:32 -0400 Received: from mga07.intel.com ([134.134.136.100]:31139 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726710AbfEFRWR (ORCPT ); Mon, 6 May 2019 13:22:17 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 May 2019 10:22:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,438,1549958400"; d="scan'208";a="230014478" Received: from skuppusw-desk.jf.intel.com ([10.54.74.33]) by orsmga001.jf.intel.com with ESMTP; 06 May 2019 10:22:15 -0700 From: sathyanarayanan.kuppuswamy@linux.intel.com To: bhelgaas@google.com Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, ashok.raj@intel.com, keith.busch@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: [PATCH v2 5/5] PCI: Skip Enhanced Allocation (EA) initalization for VF device Date: Mon, 6 May 2019 10:20:07 -0700 Message-Id: <9370d51d14d9cd0ad4101db14e808fa3ab7efcf5.1557162861.git.sathyanarayanan.kuppuswamy@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kuppuswamy Sathyanarayanan As per PCIe r4.0, sec 9.3.6, VF must not implement Enhanced Allocation Capability. So skip pci_ea_init() for virtual devices. Cc: Ashok Raj Cc: Keith Busch Suggested-by: Ashok Raj Signed-off-by: Kuppuswamy Sathyanarayanan --- drivers/pci/pci.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 766f5779db92..0ba3930e3b54 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -2976,6 +2976,13 @@ void pci_ea_init(struct pci_dev *dev) int offset; int i; + /* + * Per PCIe r4.0, sec 9.3.6, VF must not implement Enhanced + * Allocation Capability. + */ + if (dev->is_virtfn) + return; + /* find PCI EA capability in list */ ea = pci_find_capability(dev, PCI_CAP_ID_EA); if (!ea) -- 2.20.1