Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2616620ybz; Mon, 27 Apr 2020 00:44:54 -0700 (PDT) X-Google-Smtp-Source: APiQypLLqz7QBEfacQYxObedQnoUM7gv+91TfMdsAOq5BWxRnd4mY6d0muNglMw1Oo2Stvle8cq0 X-Received: by 2002:a05:6402:1bc8:: with SMTP id ch8mr17016235edb.53.1587973494437; Mon, 27 Apr 2020 00:44:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587973494; cv=none; d=google.com; s=arc-20160816; b=nmBLhtjw2tf9qUBGjJ8YkhJuSRKUqwu7RoxmEr+xyaucar1Or0e2wYFk1rpHRmftqw omER3y30MB5UJ59PQAz89Oa2khvpJYeFnyQDR9w2MHWqrHzzuOyxHY2aaH8vbQsdaQYX t2XYuUmXTS5J7UywAfIh4yRgM0gtmhFGcg2Mu79uwcOCHeW/tWvfIeX3KIzQYD577+xM /PTEhDWtXb6/94G/iaBw5TjeenJY2dhVoXwzNARr+FOnZACeIMvfPY8Y2qz4H/sm3tZG UW3Ioi9dH3GaqXlSZ/hOeuax22yX0OVfl6V3eDOkekZmfsmSBUlnHoeRgAnEe7vhSJFr gf7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=7HDE8ph93EI2vOePc5ywVTgnLdaOVxztdKRCyPN5Qdw=; b=je0z6gxDrLt9P8OzEZXY5Hx7oL5jSxEdvTHk1uWB8eR2JhXC4mg1rgdsD0t3gblfoR vBYIwgOqCtIFGfSWyG0RR1SMmYvVQ/dBCpFI8vzaubNvcp2Ur6mqAWdLZkyOkTSkLMrG ZKkQgS2+DxMuPAQxUdJ2BqaKUJ+VrXZasrHgDZdl+Focs8rgf+6GGniYw+H/IUAzK6Ci /BRa0fVw2fhIap2LRRXqRiptVmUBrCc/9vNqW5eGyNU7BbfAZ7aRsVCpEBGS0BPDqtaG 9qoKvJTDINNAFfoF6lRWtSsiyjnR3kInuEiXYMbI+9clC/hchNZITMAsfnL1TRQOrEj7 RwPQ== ARC-Authentication-Results: i=1; mx.google.com; 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=amsat.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gr21si7401575ejb.482.2020.04.27.00.44.30; Mon, 27 Apr 2020 00:44:54 -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; 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=amsat.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726815AbgD0Hmt (ORCPT + 99 others); Mon, 27 Apr 2020 03:42:49 -0400 Received: from mail-yb1-f193.google.com ([209.85.219.193]:40407 "EHLO mail-yb1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726766AbgD0Hmp (ORCPT ); Mon, 27 Apr 2020 03:42:45 -0400 Received: by mail-yb1-f193.google.com with SMTP id f13so8976267ybk.7; Mon, 27 Apr 2020 00:42:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7HDE8ph93EI2vOePc5ywVTgnLdaOVxztdKRCyPN5Qdw=; b=IOJzamf8OgTB7SIpo/NaEc7tMItPB90nfPDnCKPs1EodhWcDBKChSF+miIlCAy/MZv fJ3d+JrfeSxOm0td6knQTV5XFOGn0pqC/OxFawNfnosRM4b8HW1Wn4Q+snyPW+q/yJZd rfBtOMvrbe0CfFB8ifB4D7fCmhaPhcadwdQhefhWcDvszF3zHA+KDI8Aql22PcmTN5G7 EgWn0wtrcjwX6pE79D6w3UdX4rV8A36TRLJ7r4L1yjYjT8NSamw0G8cWDQVZcOMJd4AR Q2rUIhPLM0MtoRUN/B6efN3DUO/tnTVWUyVcSWtEcOWFw5uzHvNLZ0Qgj6bifpotmyaC U+Tg== X-Gm-Message-State: AGi0PuY4Re6h2fUPpEe8bx1Oci1eQ7yq6g8HrrxAqtYKuE7sz84h7l8f /OnCFxAJlW8zHWDk06HlxIfziOV52yg/A6eoz9/GmBvU X-Received: by 2002:a25:c646:: with SMTP id k67mr11247591ybf.309.1587973363986; Mon, 27 Apr 2020 00:42:43 -0700 (PDT) MIME-Version: 1.0 References: <20200427060551.1372591-1-jiaxun.yang@flygoat.com> <20200427060551.1372591-2-jiaxun.yang@flygoat.com> In-Reply-To: <20200427060551.1372591-2-jiaxun.yang@flygoat.com> From: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= Date: Mon, 27 Apr 2020 09:42:32 +0200 Message-ID: Subject: Re: [PATCH v6 1/5] PCI: Don't disable decoding when mmio_always_on is set To: Jiaxun Yang Cc: "open list:BROADCOM NVRAM DRIVER" , Bjorn Helgaas , Rob Herring , Thomas Bogendoerfer , Huacai Chen , Lorenzo Pieralisi , Paul Burton , linux-pci@vger.kernel.org, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 27, 2020 at 8:08 AM Jiaxun Yang wrote: > > Don't disable MEM/IO decoing when a device have both non_compliant_bars Typo "decoing" -> "decoding" > 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 >