Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1570266ybj; Fri, 8 May 2020 04:36:29 -0700 (PDT) X-Google-Smtp-Source: APiQypL9Q1XShHXoo76cSktnO3EtDZfLt9oOwPZVncQJLbXm9eFeTFKU1sRk5XQeXZ0DgLKcPyXC X-Received: by 2002:a17:906:414a:: with SMTP id l10mr1526116ejk.304.1588937789020; Fri, 08 May 2020 04:36:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588937789; cv=none; d=google.com; s=arc-20160816; b=ye4M1gc17dReARMRfp0kx38a2tNeY18s+VmDrVqCOX7IBAN7TU2WbWqhOOi7ofyPrs c7KtcfajKHY8KQnbx9Pr0S1efFI3kIEznCuPFhNsBLIqh/40WVzwVqDxyQGz9X7NUADD 61jSS/YucQ8Gu9hH3xzdJ/rAbLtDDmnU7QnUn5NctEFPMRmShpVm12z7SU2D0T0kndFC KDRM3GiOWDdYRmRAG852zb40vWawidsywEuEekc8Hir7y8t3brAEEAsQx0czI250bve2 rMbejTj8a9CobQzK4dx9GDyC4QXdvYwQ5fEyTR8ow6tKM30Hlw/HPe0PXWxD2eYU5A2k /Kgw== 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 :dkim-signature; bh=OCojGpCJthRl2cNhfZcAhM7SWOm5urGMQrBcdbJ29Aw=; b=R5chVUX6nEs0waGPw3Qd2yEfah2KZtjGoG6UqZAPKHhNsb66vPbQ5tZaqeb2XHHUqW pCQBjD6suzoUq+fZXbZwpD87DKenEQ/GNjD2HAYhanA0eq8YvM34iYqY4fc8Zqlgb4/Z XUr2FRncCoO4aQW/4TAXa4SKkiaT7RCTjbz5oKc7LSwbn0HfFFShaur+vpWUyYcmTRXX 8LbBX7LMVazpTotzgAIgtm6mK63UOH+S+uRbNo2Stu7n4LNaAvBCPNNQcdzruh7dNmqZ Bdrm/xpRmj0HRdRL2Wz8r+0LFdh9WyUh7k2GBFZoij1NJFB8EeWPuau6Sa5Ki0IKf1kl 7sMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@flygoat.com header.s=vultr header.b="DWQuGz/Y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sb9si843283ejb.156.2020.05.08.04.36.05; Fri, 08 May 2020 04:36:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@flygoat.com header.s=vultr header.b="DWQuGz/Y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726864AbgEHLej (ORCPT + 99 others); Fri, 8 May 2020 07:34:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726616AbgEHLej (ORCPT ); Fri, 8 May 2020 07:34:39 -0400 Received: from vultr.net.flygoat.com (vultr.net.flygoat.com [IPv6:2001:19f0:6001:3633:5400:2ff:fe8c:553]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 683B3C05BD43; Fri, 8 May 2020 04:34:39 -0700 (PDT) Received: from localhost.localdomain (unknown [142.147.94.151]) by vultr.net.flygoat.com (Postfix) with ESMTPSA id 88D6E20CE6; Fri, 8 May 2020 11:34:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flygoat.com; s=vultr; t=1588937677; bh=BsYKKDVjGrGZ45XtSJs9R6ZJaKv6eacQRLmTdmKpjC0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DWQuGz/YAvGylUx5HdviGbZu227tAzJ0dwIx0KqVuCtVXt9R5hnYj5aZeaAhp+jCt iwfE8fwRFXNFLVA2AuibSjrc9J0irQtmOqupkrdM4uIn2Tl9IsdvchqGxgwBp7+u5x ZLM79gfSVwPRmFUUY1ykmt1dnaoTiQxV+QgESx1Peyzlbn/XlSqE6LX0H9aAbOVHkb PT5OvW6RXDy3lBFMFhh6LqHNu599YiJAp4kbUHOsfzoC4zJwaKKxGR8EqKwjDugqdB vcvfJREmD95uHSG3SVtswsWHsrPssb98oS8NEVlzrmxZI3ffLRpiDZGoJyDW2PUhQM tfx9ljlyzjssA== From: Jiaxun Yang To: maz@kernel.org Cc: Jiaxun Yang , Bjorn Helgaas , Rob Herring , Thomas Bogendoerfer , Huacai Chen , Lorenzo Pieralisi , Paul Burton , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Subject: [PATCH v8 1/5] PCI: Don't disable decoding when mmio_always_on is set Date: Fri, 8 May 2020 19:34:01 +0800 Message-Id: <20200508113414.3091532-1-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.26.0.rc2 In-Reply-To: <20200427060551.1372591-1-jiaxun.yang@flygoat.com> References: <20200427060551.1372591-1-jiaxun.yang@flygoat.com> 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 Don't disable MEM/IO decoding when a device have both non_compliant_bars and mmio_always_on. That would allow us quirk devices with junk in BARs but can't disable their decoding. Signed-off-by: Jiaxun Yang --- drivers/pci/probe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 77b8a145c39b..d9c2c3301a8a 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1822,7 +1822,7 @@ int pci_setup_device(struct pci_dev *dev) /* Device class may be changed after fixup */ class = dev->class >> 8; - if (dev->non_compliant_bars) { + if (dev->non_compliant_bars && !dev->mmio_always_on) { pci_read_config_word(dev, PCI_COMMAND, &cmd); if (cmd & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) { pci_info(dev, "device has non-compliant BARs; disabling IO/MEM decoding\n"); -- 2.26.0.rc2