Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3548189ybz; Mon, 27 Apr 2020 18:18:29 -0700 (PDT) X-Google-Smtp-Source: APiQypK/4rZb9Gn5ks1GqB6Yo63/5RClm9lxXiAj6MYdxvaVBFO3KQyNyOJ9QOX30BT8D0Q5zBSn X-Received: by 2002:a17:906:8549:: with SMTP id h9mr21639651ejy.145.1588036709364; Mon, 27 Apr 2020 18:18:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588036709; cv=none; d=google.com; s=arc-20160816; b=RWYp6XR55T3jKRWxIkQCIf1pW5w2uMfiRhMSQyf7v5zIT9QlPuASJ9AzCfPtnWN5On gi14aV3Tz9fHj31g5As1B3mcn1YMbTJ2AMdEWEDE95t6sCkG9sFS6+UZLlTdA6V2i1r9 vNJg7a00SMT55JbnINMaTfHibKbjhag4izdAHjE42yTarDY6ovP0eMoIxO3dh7A/1XkW 9han+KOi6s/qfSN1rZkQJKrbB4tgCh/FbVBGvKdYQ78VsN/WASoVIP0RrhLcorbxXiOb V2JoMvEL0yqQ08m/OAcCb2TrAGoezfiIPurETETiGxsLSSydgI4zG40D5fQnbtFPjQhd KDAA== 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=uzk6HpFMbNlRI+Dm7r4Q8g6UdX16nGX5yrp92L4I2dzWnZeAZ/3AIgbqG1JqIJB4ry Wdw4SBaFhMfA4bK8/xfAbTX3BP/6301WJRhOT/slPQhv6Lk8ZvwOB9WrLEA2IFPU3Eyb LgPsR/QPuhdY1CmV9bXNVYSTYWvculM/ZmJtuK6QhSwXC2pUUEfhfi/IXrkIkWzirvNj lLr2gqCZ26DGBDjoehTyOHlVk73KUgX/FtsWFtYWx6kFM8E04opjzAVI/LM0EHMje/EP J/ItFiZav3qfoExDvxa/wWOtTWNJSGBo2g+qlVTaLeovhx+blYsxSQu9hmpzStdgx0qx OqDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@flygoat.com header.s=vultr header.b=B67G5c2k; 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 a20si813662ejj.269.2020.04.27.18.18.06; Mon, 27 Apr 2020 18:18: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=B67G5c2k; 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 S1726399AbgD1BQg (ORCPT + 99 others); Mon, 27 Apr 2020 21:16:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726233AbgD1BQf (ORCPT ); Mon, 27 Apr 2020 21:16:35 -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 93963C03C1A8; Mon, 27 Apr 2020 18:16:35 -0700 (PDT) Received: from localhost.localdomain (unknown [IPv6:2001:da8:20f:4430:250:56ff:fe9a:7470]) by vultr.net.flygoat.com (Postfix) with ESMTPSA id 582482049F; Tue, 28 Apr 2020 01:16:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flygoat.com; s=vultr; t=1588036594; bh=BsYKKDVjGrGZ45XtSJs9R6ZJaKv6eacQRLmTdmKpjC0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B67G5c2k9HMZJWWXwLWPgC7XfOSzJXxwRJ5eXaXIqCb31daEsTLI+7Iv9cGyHdG5/ qjdk2xXxUefX6Vl3rp54A0pJnWPCdEEP+nkpRbmopQqFhGDRTI32GB/RefvsH/3dTd JwzDyg8yvJnGchbtZEEg9t+4z40hYseST2sdS+Cf4NbiYaBLGP/Tfo/rzTzOzN6Rzt VP4dHfKU8WFCb/Bl9QYgGcgy+vSQ0EUzAAN8AnXL2QuuvZOIzdIpC4h5hnLrlfG/nn xv4Cc/Q4OaBGKzrTcX5Lq2yb+k9yBbuPy6Laf+v9LphCS8ISV/pekZGU/0vuDKV4E+ 5lM0LDo9KR5TQ== From: Jiaxun Yang To: linux-mips@vger.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 Subject: [PATCH v7 1/5] PCI: Don't disable decoding when mmio_always_on is set Date: Tue, 28 Apr 2020 09:14:16 +0800 Message-Id: <20200428011429.1852081-2-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.26.0.rc2 In-Reply-To: <20200428011429.1852081-1-jiaxun.yang@flygoat.com> References: <20200428011429.1852081-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