Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp13835ybs; Tue, 26 May 2020 02:24:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1tPD3FvWY/h7hg3fJx+kt1Ps29b67MxJSwIZv8KSCCy7Qc94S6IjSkIglzuVPQvo74zVx X-Received: by 2002:a17:906:15cb:: with SMTP id l11mr297699ejd.224.1590485065560; Tue, 26 May 2020 02:24:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590485065; cv=none; d=google.com; s=arc-20160816; b=pmrT6nKiGhtzG01/0CtH0i0y1gfPLYoFiievpbnL5CdX3de1My9H04IPQHbxaW870V XKxh+mXAtUpYHKD6OUoJy5UsUJrDpLqsAfIZve1VxsZFfbrhFzFvirNnFxNvbJ7TGnn+ TpQPhsblvldRv9H/dqox6JQGjMVkOTwpUyr1FDuwVXpJ3mevVH/xQYonQy9icE9xBGFk nZCmYyHMLwwBo/Xa2P03NRLSBaUdyOJKyEFSw5jWIfiA1I127+Bin7tQZRZ+b2Bfi4zG tl++su9D47bhajS3earDUQ4aAeKIFaI5pZ0rvEVc1H1F6mf3DFbaDdIesei3yrn//gA/ FqAg== 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=mCd1lp4CMtTnvF/PNQjMlka7KPHgCtktq+Mrxn7PTns=; b=SbHS6Y66LDgBcc6Dg8d/K7OSqFo+omC+FRLEyudIN02ubk3UX3TCs36BSyChvFy//+ nAMQ9CcUaEchukbS63JzSUqUwiqk7ATiRA0STi08F3aMpgsF6ktjwwarzXj4X9bOWKh3 0jywmk9xkwwfa6NaK8zoJla230skUY+4ffxxBwdz47eNbGjUySKhjy8m4+gXFtdOGTAl SNN+vo9GHigH/3dq76xopPhUspUqfcSNcrD/zPkW51k9B55TYY2zwdkyGXq43ms6WXr5 yszjihhsy639puWPXFDpGVKZ3Lpy4i65fchRaPLRFMp73V4tbAUprd8G1tDnxBULgX6q mHYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@flygoat.com header.s=vultr header.b="wFBIc/55"; 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 rh27si10178417ejb.217.2020.05.26.02.24.03; Tue, 26 May 2020 02:24:25 -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="wFBIc/55"; 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 S2388274AbgEZJWP (ORCPT + 99 others); Tue, 26 May 2020 05:22:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728837AbgEZJWP (ORCPT ); Tue, 26 May 2020 05:22:15 -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 1E24EC03E97E; Tue, 26 May 2020 02:22:15 -0700 (PDT) Received: from localhost.localdomain (unknown [142.147.94.151]) by vultr.net.flygoat.com (Postfix) with ESMTPSA id 7981C20CF1; Tue, 26 May 2020 09:22:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flygoat.com; s=vultr; t=1590484934; bh=UMhG/by/8Wp7J9w58d3h4mj/vGWz5v4HoSv8qq/dykU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wFBIc/55J+5liL658ygPg/B+HR9bn0Kw47dumVpAwHjlZPsphCF7f72YeMATKVYGE U3XJMDkQX/JelWxEJCauNEG6+PY9jd0hOGK5U3+Mc2zxo7J8KUJ0sSgbP5ob4Uep0N 8n3k8tNqdPFFmxwE7R4HQpIkCwqKWrc1qqBKNYS3qAUgepLl3NNG9xwvzwHP6bk3R9 KIn/Qe5L/uWil1AIKl3Td+NIGGGQ0U66o3fNZO8cPCB7LtDd2rixF5rI+kB3CV5NMw bdExZf/NlXrQh/U2kK5KxACxCZ+1wxtjyyjKbokMOmXnzmlCOyzoO3lyYT0VS/n27Z wsvN1dV2gXM1Q== From: Jiaxun Yang To: linux-pci@vger.kernel.org Cc: Jiaxun Yang , Bjorn Helgaas , Bjorn Helgaas , Rob Herring , Thomas Bogendoerfer , Huacai Chen , Lorenzo Pieralisi , Paul Burton , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Subject: [PATCH v11 1/5] PCI: Don't disable decoding when mmio_always_on is set Date: Tue, 26 May 2020 17:21:12 +0800 Message-Id: <20200526092130.145550-2-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.27.0.rc0 In-Reply-To: <20200526092130.145550-1-jiaxun.yang@flygoat.com> References: <20200427060551.1372591-1-jiaxun.yang@flygoat.com> <20200526092130.145550-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 Acked-by: Bjorn Helgaas --- 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.27.0.rc0