Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2507265ybk; Tue, 12 May 2020 00:48:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0Fe+Gs+rC4ONJvU/M7QKZMmi+1ZTZBEdiIykMGp2AfhxJSjBK2Ej3MilkhPbyLAty/l77 X-Received: by 2002:a17:906:848e:: with SMTP id m14mr5771541ejx.344.1589269738949; Tue, 12 May 2020 00:48:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589269738; cv=none; d=google.com; s=arc-20160816; b=ZpWHpPyFlHu+SXTCmeP00BpbsSD2X69IvcKCS6lQe4IVvuyGa5HZKNBcQ9hxffgzZc iGrXOIJJfGVzj6RWguYnyaWBz8MzZqhObYR9r9sYyA2TXFNFKHRzmEvvku8MTa+/XZlm 6OyQ+cYzvhEIOivEfRNzigd+hQjAiibKBqnCEyYuyZecpvHwrYRsU1OJkDF2NWYroQBS W1FkD5MocGW7JB3+1c9IGzmUEEBq9HW4ZIugzIL//fpJ2GLEH07Cj/l2BNcemQS1/2e3 X0QGsia2hhmIr7u65cCq7Gaq8tevs+RU3V72dHSD5wvK6naZDVYAOKoFN3ykU6sok4+Y m89w== 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=kpspDUjkOxzee/qWH29I4WQdxtuoIhCNPBl0o2ZQtys=; b=y6hqmEMH23NUhWDVXRsjhstkzzwv58CagoZP+R/T0caZzjPF7KeF6JnaBDLCgadfIe ZaAvzCbM+UVSDD60do15JEvV4r9+k1zoiSFDazgsQa/7ncu0LKO6vwIGL6LLxLoH4bM5 dW9B6wL5pZWaW6V0lDoV1tb2uMuxQKEYmeOxcxdya2y4d+OKntirIUQ7UuykJOsQb6Ge XujQbavtITxd6SfTyRgJjBs5nD/JI97RHpvEsQi4xH5BZb/DR9xKgQHqvBnU9FFkXKmD 9xPUGvStCPzgZYgdXBYbV4FjmBx1q8Q5JsLg2L8KvVi7KkG7j3zpjHm/GYvQRYCcWG5g +PtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@flygoat.com header.s=vultr header.b=ZbYyrnF3; 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 i3si3973066eds.277.2020.05.12.00.48.35; Tue, 12 May 2020 00:48:58 -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=ZbYyrnF3; 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 S1728924AbgELHrN (ORCPT + 99 others); Tue, 12 May 2020 03:47:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725933AbgELHrN (ORCPT ); Tue, 12 May 2020 03:47:13 -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 4E144C061A0C; Tue, 12 May 2020 00:47:13 -0700 (PDT) Received: from localhost.localdomain (unknown [142.147.94.151]) by vultr.net.flygoat.com (Postfix) with ESMTPSA id 4E06F20F0D; Tue, 12 May 2020 07:47:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flygoat.com; s=vultr; t=1589269631; bh=eJnR5u9wxpZzi1TozIj3O/mYN+6KO3jlz58PZP+YVW4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZbYyrnF3hSjwCtirbdGDp0J4DGKLQ7ysSKyPS362UyOEuwQxvwDSoZ84jzBWqT9Gl IDn2YIflZhAldAnNG0RD5p2UOB9XndcAmc5aqLMb4WUP+KDD/vHUZgP09A/53ddyWN gOpdmztyzkrLQtrRlMEvGqbUOmbWiNZC0Ovj8nawL1pK3dVCnx22ubhwRzGnT7s6ch J2zewRI6vCOCd58Vx44bsXIA9D0xZAPxPzzUhaZ+Ctg87aqVPwt4fsl/iDejmOegSS ZBe8RzTnXt5UpYUQpb3JQpfFSlKWhwC3KFscIJgostZeoxOQp2RYJavXngADIX1m2K pjahXVDheWarA== 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 v9 1/5] PCI: Don't disable decoding when mmio_always_on is set Date: Tue, 12 May 2020 15:43:55 +0800 Message-Id: <20200512074413.3557835-1-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.26.2 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 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.26.2