Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp289558ybj; Fri, 8 May 2020 11:53:32 -0700 (PDT) X-Google-Smtp-Source: APiQypIaDXGJBcihiN9ubA8SnFTPwxDDp7xGNacLZAFeHq+jcpJam0+Tujon5TYQaKyTfetdQoN/ X-Received: by 2002:a17:906:340a:: with SMTP id c10mr3213677ejb.218.1588964012405; Fri, 08 May 2020 11:53:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588964012; cv=none; d=google.com; s=arc-20160816; b=sEtzkRTYFNT/oXaBShgBWJvYpWsluI1e/j2jjeh7Qci1UYCiAqmulP/N3W7ozICPs6 SzbleWc9kt8iK1QQ7w+ohj6fdt2k0op8+hP9LATMvA0npFVCCn78op1w+/S99x2TQth5 hanugQl0hifdxYK5UGPVByHRG2VrB/r240mz6eUAQJzk6LYf465OkaJyQ7gO1/F1aZ6s 0DjP75bwBXl/9YOJgnjSsf1KViCgy0XuKUJkc9fvxRrIzRJWLJbPnAB4IGWmfBOOyTLp j0DuURtpRk2PV1lQA8V0QJarLryP2IDrmkDvzQtMA6ySny5QD+OBFrMJkJakUL7perv2 dPWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=NJgL2A/900YW1L4ltV9P4/IEGdE4aVDeHqdE0qi8YL0=; b=EyDTDQ2TQtQ8GJ12J/DIyMba6Ix5d8p0YwLYofQI4hl2ZFW3wXTzCiuMYzx78/aGMn YcSp2Rrt+gEMMwQxRWXojtz6yqCAYkGX3PoCu3xlkjkcgtSblLgjkz5DFk9+ajT8o4gp F3nu+Zf5I/c9tij8qgFs18i4Tt+5MiKXr6yz+7HxedfDUls61p/6xulyS1BbUcc+SsHS SjW1BdfVy9/9wm+WVauakVxAlndcNx6ZSMG8oWFCZWSGdUWZhZdl+XWDjcBOxrL1Si+F WSHWJfdqXipZugp2CJgvfZpjhBPXaiJEncT1rN57Ift/rdMYwtW/oDLRN3Ymmcnu96aL gXUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kDmaDXrD; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g5si1408567ejs.290.2020.05.08.11.53.09; Fri, 08 May 2020 11:53:32 -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=pass header.i=@kernel.org header.s=default header.b=kDmaDXrD; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727783AbgEHSvk (ORCPT + 99 others); Fri, 8 May 2020 14:51:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:59494 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726767AbgEHSvk (ORCPT ); Fri, 8 May 2020 14:51:40 -0400 Received: from localhost (mobile-166-175-190-200.mycingular.net [166.175.190.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A5A3A207DD; Fri, 8 May 2020 18:51:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588963900; bh=G0Uu5w3eBIja3ZOupFgWdBHmfnHRekLsvyYCif+pd5Q=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=kDmaDXrDaXsYKLqNvQ8A9gMAks0N3gYY6dGxvuPenkkFVJspAtgDNT5yoaYzeOZO0 ZcyCjsy2Mo8mAsdsNISutBNbPmgWdxZPKktHB3gs2XbvNolR8NI2jma/Pyq3XUr/08 YupB9oKpgmffnkJN7SxqrHjzqmLOT/1d9tCa0Z0k= Date: Fri, 8 May 2020 13:51:38 -0500 From: Bjorn Helgaas To: Jiaxun Yang Cc: linux-mips@vger.kernel.org, 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: Re: [PATCH v7 1/5] PCI: Don't disable decoding when mmio_always_on is set Message-ID: <20200508185138.GA78849@bjorn-Precision-5520> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200428011429.1852081-2-jiaxun.yang@flygoat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 28, 2020 at 09:14:16AM +0800, Jiaxun Yang wrote: > 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.0.rc2 >