Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2558390ybz; Sun, 26 Apr 2020 23:08:02 -0700 (PDT) X-Google-Smtp-Source: APiQypIJAYcz8K9H6ky0+wZluiQD1rC1agm5pLtrO3rQJWuKOPIke+vWPnUd9E2IgdVEG5wo3GAx X-Received: by 2002:a50:9e6a:: with SMTP id z97mr63759ede.375.1587967682322; Sun, 26 Apr 2020 23:08:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587967682; cv=none; d=google.com; s=arc-20160816; b=jAhjh+qJlTR77N3FnZ6LghrjREiLP/4Tts+nBP1vM4mmG8IZbnb68DiRJsHDxzyl3v fWvxxuaMmTJwe67Lq+DMUNd8pZ/j4qxP0Uf7u2GsYM9pWAqyYfYNmpO03/kWUW7Mo0sS a6HmwvrxHTOp4BX27Hhv4JwBRg+cFRHrxpgwdk/i/3xip7ltkewWzYohizQc/MpZGML/ czeLsUreeoh3auRMLBLgKjfACd9nC6HYUTZvtok1Ywj0Pcr+BSTioORr/gQ5nGiLPFYO siVe7TN3jfKj0vcRiFMPIhgGYg6XZRrdB6SZIQU+HxJg4OUGlUoei/2yNpmONXntWOtZ 7R0Q== 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=52phoi14/0RbWzX44wjG8elLRUFqTXQlWJ1IalT2Yls=; b=gguQPSMrgEOSlXcfcFPiPBgipUHjnHFxpVlYuKKZ1rc2FwO97Bv6tBEVUyc0YjtOH2 NmE3LH4WgMqHcSiCxPnKcLpjIIEvLTlQe6nSbsRfoZy4ko2WD3/ztiLmU8rctv4pqaFQ 5viemRt3uGOOS9L1OeeD7xI0+M6s/UC8Sr0REZLEEuWqCz6/GHqEsVFN/G+cu1gTEZHl jfQojJvSYTZqnH5UalhUGvaXBfYHvbj7tGStqSxgxyTrH/sVl1hqYyWVchOxKi/fQ1Nf YynPfu4kLHmGOu8wRuRNHpLslXCF0pXu7MdMSBHRILgQnnI5QZMurM06DdPf/X2NqLwg 8O/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@flygoat.com header.s=vultr header.b=GH9RTTnj; 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 jz18si8065980ejb.112.2020.04.26.23.07.39; Sun, 26 Apr 2020 23:08:02 -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=GH9RTTnj; 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 S1726573AbgD0GGQ (ORCPT + 99 others); Mon, 27 Apr 2020 02:06:16 -0400 Received: from vultr.net.flygoat.com ([149.28.68.211]:60110 "EHLO vultr.net.flygoat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726221AbgD0GGP (ORCPT ); Mon, 27 Apr 2020 02:06:15 -0400 Received: from localhost.localdomain (unknown [IPv6:2001:da8:20f:4430:250:56ff:fe9a:7470]) by vultr.net.flygoat.com (Postfix) with ESMTPSA id 7D17320CF4; Mon, 27 Apr 2020 06:06:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flygoat.com; s=vultr; t=1587967574; bh=NE5sCt6ssdL9diqa/uHtsH6X8dScz66rvMdDwvKjb94=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GH9RTTnjT/o2eJFEMiy55OMLVbHnBAORssZ+EwGSmFuDvo39o95+Xj36jaNyquAHR +pWlRkIWo2KR2pI2AJjYqXByWV84UvRqd9mkNw8ZqbOZdyhc3P4RSyxVoixVWWO/b7 vgXaDdEXQigrs8ueWeBchOd6NZmlM0SAZePvVmrqmJZRTvQlhMHvD+g0rzvBj1rsSQ cQNRFiD8mGpg928rW7RUdtin0ZTBs7Ku3eltiACFOP4kMxhxiqH0yP2d5WO72y8coa jwIObL/ubGQ63+wACFqu/lg1fKOsxU/j+W3LGbMaVRvfaktJoXIZj5GNxnzUIEf3Ww QSrzVhsKvUi8Q== 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 v6 1/5] PCI: Don't disable decoding when mmio_always_on is set Date: Mon, 27 Apr 2020 14:05:38 +0800 Message-Id: <20200427060551.1372591-2-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 decoing 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