Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp613105img; Fri, 22 Mar 2019 05:10:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwpJ6DjpSnmV2eU1hsINSMKUbHYmWDbm0vysjNdKxBpHNudGBb05em8mbSYqWq1XGG7tw06 X-Received: by 2002:a17:902:121:: with SMTP id 30mr9261891plb.315.1553256603129; Fri, 22 Mar 2019 05:10:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553256603; cv=none; d=google.com; s=arc-20160816; b=EZuZUWV/sPjnHL8aZnJa6NUou1l/eEK9yIBYrm6i6KSBsBKe9wJ8I1BErQ27Rag8Pt bSZtIIDTI91hzOVivacLQxyfwWr+FqkQJBIbKGJdz/Zy5OO0pmYpSrqGSFdlp3VVPceQ LwOz1RU7giI4HVpZugmMCfPjEBk0m0k7zcTZ1koVbpHi+EEpMs5l5ByCb6O30DXaddj1 repWtqj2oWWJbOCTYAZwEmb7a5nrMtJl9lFe1rPYPHRTAWs7UfPS0Ikcx/pAt9q7nGm1 akYNJfnXLoDsDo/62czvjFE+5jy0BJu+/XnTYw6xtebkEFv7+hQWXE2hBq/4M35jFOS6 Td1g== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ndqCSXNDus5ZlDBQvSxM/8Uu2X1bl0WpVnTCTs/qI0k=; b=kx/9h2SELNzX4w75m0dKPKEP+bMEz3pjjfLg1m59LJvZFYe1x7JL2kchE+Pq56DgFh Y5dhXA3SRbRhceNeWMLJ86bOO4SlTmTuqWqqm/i1cpqvOUd65BIGA6LJ/uJ1e466dctR PICw/SqB9+rac9Oq0h0M/kgvZjM5F2QgyMyIgSMvcM4y3g2oO+PsBgU9pJYnFBzpHiAp EVIC3uudsmXR9Sm0PtJ5gd3Ewd/AK62+sBxqIB1oOm+bAeC6S1TKxqnbLi+yMIWFmFgv e+feY7g6+UhgZYFvKjLX99pbD8tuUv4CUsutNxZvXOhR1lg+vmqt021Kl9kQ+W17Bhfu 48+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BzjhCoty; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r15si6179531pgv.389.2019.03.22.05.09.48; Fri, 22 Mar 2019 05:10:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BzjhCoty; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388848AbfCVMHm (ORCPT + 99 others); Fri, 22 Mar 2019 08:07:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:46052 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388842AbfCVMHj (ORCPT ); Fri, 22 Mar 2019 08:07:39 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 BF935206C0; Fri, 22 Mar 2019 12:07:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553256459; bh=XFMjzvokXhpCFXa7YbUtFxJ/o5q2xHn0KjhqbDJEekU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BzjhCotyOLTE5P5fdPXwvSdv3+54NngaVbIJxMoLNR/VFe/4ahH0DhgFGW0A2wyNW GTqJRLR9ztPoi7pKXMzZ1sPdswfd7wfpwUWb50xahFSxTj5kmAqSyvgB+Hx29vh9vF RxsqGgR19uE0TngPkmJwL1J1i4VpzCo164oea1XE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tim Harvey , Lucas Stach , Lorenzo Pieralisi , Gustavo Pimentel Subject: [PATCH 4.19 187/280] PCI: dwc: skip MSI init if MSIs have been explicitly disabled Date: Fri, 22 Mar 2019 12:15:40 +0100 Message-Id: <20190322111327.920285480@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190322111306.356185024@linuxfoundation.org> References: <20190322111306.356185024@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lucas Stach commit 3afc8299f39a27b60e1519a28e18878ce878e7dd upstream. Since 7c5925afbc58 (PCI: dwc: Move MSI IRQs allocation to IRQ domains hierarchical API) the MSI init claims one of the controller IRQs as a chained IRQ line for the MSI controller. On some designs, like the i.MX6, this line is shared with a PCIe legacy IRQ. When the line is claimed for the MSI domain, any device trying to use this legacy IRQs will fail to request this IRQ line. As MSI and legacy IRQs are already mutually exclusive on the DWC core, as the core won't forward any legacy IRQs once any MSI has been enabled, users wishing to use legacy IRQs already need to explictly disable MSI support (usually via the pci=nomsi kernel commandline option). To avoid any issues with MSI conflicting with legacy IRQs, just skip all of the DWC MSI initalization, including the IRQ line claim, when MSI is disabled. Fixes: 7c5925afbc58 ("PCI: dwc: Move MSI IRQs allocation to IRQ domains hierarchical API") Tested-by: Tim Harvey Signed-off-by: Lucas Stach Signed-off-by: Lorenzo Pieralisi Acked-by: Gustavo Pimentel Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/pci/controller/dwc/pcie-designware-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -439,7 +439,7 @@ int dw_pcie_host_init(struct pcie_port * if (ret) pci->num_viewport = 2; - if (IS_ENABLED(CONFIG_PCI_MSI)) { + if (IS_ENABLED(CONFIG_PCI_MSI) && pci_msi_enabled()) { /* * If a specific SoC driver needs to change the * default number of vectors, it needs to implement