Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1326021ybk; Thu, 14 May 2020 06:21:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4KlKHiaLLnknxAnORUzs6DrnZle09Lb327Y4awPnQTxyMXqlGVMU+UNaRsMOGzp2FaglQ X-Received: by 2002:a17:906:7e17:: with SMTP id e23mr3671814ejr.172.1589462464282; Thu, 14 May 2020 06:21:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589462464; cv=none; d=google.com; s=arc-20160816; b=VswFiYEdl3qL2RpvlSxIfBKbrVebvlWWsbgqniZqVWQRMQ8ercNi2D+dJDOmXfGcRe DycR06BI69rtJKyMR4MTZ4jnmMaiWgHJgswJToboONeRnSzGc12rmQnMC0rJPkDGquHv 9Rve+SNYZtRXeUAfN+Tv9ZmV3CI58swUhLl7Gm3qHpMGe7/4/pXVzELNSgLg2b5RXGZX S7brdJ+bCKdD5whOqPQhtnoLIFMSa5PBHJE8GMZe9Q9xjZLDN8CIsCPDueNg9DHmwwXk hsYULhw871B5kXSV9zOZ8BnMXCuA+xjxPc9uFVlDzTOM8+k1SiiVGJsT77QuYvdpcmBh GPYQ== 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=jlwuHUZItTX+sL9LONKKJKN/cTSK6Po6ixdGnS6llxdoMvfAJBYB+r6h722ic+ZBFD 95wG/LYnX+N7EthmI3ouDltR+EYfPTKmT9J5Xc5WKZI4BvFZwE3CVn+OqtNAk+pQbmAy ZZcMRHSli/1TwU3mzX4VzvNFywESojwT6gkwn4nYx/XiTwpixnFOqC32BiaVRHNsjcOX fw5eO7Q+qtKbfE6FXXuN8gf+3O1FbyNdeIKx8PJz4l4q352LiwG/XyMHiEOy7NaU0jCK PRxOMAbsoFYtYOS8KD24ZzmL3RnHiYTiuiTS83hl161uH8ZZ4Ou7Co3HQAy5mvCzXowm BMSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@flygoat.com header.s=vultr header.b=gXvAIxvL; 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 f22si1788981ejx.209.2020.05.14.06.20.40; Thu, 14 May 2020 06:21:04 -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=gXvAIxvL; 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 S1726813AbgENNRG (ORCPT + 99 others); Thu, 14 May 2020 09:17:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726073AbgENNRG (ORCPT ); Thu, 14 May 2020 09:17:06 -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 81B50C061A0C; Thu, 14 May 2020 06:17:06 -0700 (PDT) Received: from localhost.localdomain (unknown [142.147.94.151]) by vultr.net.flygoat.com (Postfix) with ESMTPSA id DC1E3204A0; Thu, 14 May 2020 13:17:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flygoat.com; s=vultr; t=1589462224; bh=eJnR5u9wxpZzi1TozIj3O/mYN+6KO3jlz58PZP+YVW4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gXvAIxvLBuHh696jacAGYaWXey/BbIiqdtCmSYadB42UAMhSyLWCMnk2xz+0LMbl7 ODin41yuW7vVdp8+oir6nwnlm2nzvxTxZtS8ss6CYFy5zRzfjr6XQ+Queylt/AXK0C GjQ/wbM3diHotnI8KcyQE9mt5Qg3HdhkYOVPZI6re8Krxsp1ao5iS967GBMm7Rt/mz YCysd8z+ztESRmBIvQ8O0iEOqZsgJb/9Hw7sRg1WeAVhJWd7xUFXaL7c3ZNXgkEgxx gb3JA3PNowlHbesLYNcld8YbqyOtR2xTSdaytO7XM9cVmQiYC070eJjCXmGyDgSKJu o0j0c0GZsRRFA== 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 v10 1/5] PCI: Don't disable decoding when mmio_always_on is set Date: Thu, 14 May 2020 21:16:37 +0800 Message-Id: <20200514131650.3587281-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