Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2699006pxj; Mon, 31 May 2021 08:32:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLL8Y+YqcddMhyWIotWm3rIItlr84RV5698nruQqBizSLEfc/qEBm+PARZMbDkBZ2cMMmo X-Received: by 2002:a17:906:da1a:: with SMTP id fi26mr16872820ejb.499.1622475141814; Mon, 31 May 2021 08:32:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622475141; cv=none; d=google.com; s=arc-20160816; b=wW0j4VkUL9orBv93aZ8U5ACCV+0+7iKiN1wESq7ix5OdqQFMoowmfZqTTmJuVxLAf+ RX8gxuHneuc/ZTRdZ4gVW9VkNfjKtO+JxNNoTgQGCh9SpZst6zK+NPR6OfVEKdRyxbFF xjked54A+3mJo0H2e8QplnvqM1rlHMLjASH27P6efp+XuPPvj1ETkAd6BEBmua9yIsH9 JnHyTvJ5JQWTROvzu4R6gBxI5kj6PPek3y1X0I0JXnEpBYpOCp6j3RdINxbca3ECts2t 9XEHVBKKYIHALQ18LiFeNgmZ05wRBXnkFFgA/PhhkQjHXRdUaTXYWG1OVHMNphe6ypIi EKEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uGjdYgP+HAt9Wa9+iYv/2zhC08oWi2lFBozQEMOE8xg=; b=cWZkEKrzOSwXKl7O7UuHZOTuVVGXBQsmt9f7nh4x2kJDIuVwkEid6rV/w4ZrdvkzPk yDA1ncrJSPb9eOy5jqEq8WM4LzUL6N5U5Qt74CIYWR3u+XJR7YMpndvowvn6d8Mm+U91 1k/UrGGGPgtNO0qP2fIwsLDBNH42ireDG8cAzlw/LtGCp5tmABeCHJyjR/QBXFYMj32+ 0QW+1XBgmVgupg0McXUBJ8pkrs7X1wxVahwLP4dwvrXNz1l9YcbPNoDXA4UscEwZNKYI ewj84XINQ9A+FIT5z1NWAjxQqtSJl4Q2D/JFveSn/XRNAGUGc5+4ih3K0DSfSUYuu0Uv M0Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="zH/La89a"; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k3si13890264eds.334.2021.05.31.08.31.59; Mon, 31 May 2021 08:32:21 -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=@linuxfoundation.org header.s=korg header.b="zH/La89a"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234501AbhEaPcn (ORCPT + 99 others); Mon, 31 May 2021 11:32:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:47642 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233615AbhEaOVR (ORCPT ); Mon, 31 May 2021 10:21:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 94470619C4; Mon, 31 May 2021 13:44:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468681; bh=WI96yNYEwV38Y2J1FKT1h5hUwNeLHHgB+vbk3m1vC6Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zH/La89af7enriWVOYQIdJnmEUvBeqZWqYEqU2klZS2rWog99sgWtft0MwpAHNive crmWDhH7DVuXUWzRUOteDpataFevLJU/yE8CuiteRREvYlzS/74AhXUTXUUFBsquad 6nwFpcvxm+0BCOpacg+tVOtuXLv444r/FleY+tuc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christian Gmeiner Subject: [PATCH 5.4 050/177] serial: 8250_pci: handle FL_NOIRQ board flag Date: Mon, 31 May 2021 15:13:27 +0200 Message-Id: <20210531130649.662027632@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130647.887605866@linuxfoundation.org> References: <20210531130647.887605866@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christian Gmeiner commit 9808f9be31c68af43f6e531f2c851ebb066513fe upstream. In commit 8428413b1d14 ("serial: 8250_pci: Implement MSI(-X) support") the way the irq gets allocated was changed. With that change the handling FL_NOIRQ got lost. Restore the old behaviour. Fixes: 8428413b1d14 ("serial: 8250_pci: Implement MSI(-X) support") Cc: Signed-off-by: Christian Gmeiner Link: https://lore.kernel.org/r/20210527095529.26281-1-christian.gmeiner@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/8250/8250_pci.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c @@ -3917,21 +3917,26 @@ pciserial_init_ports(struct pci_dev *dev uart.port.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ; uart.port.uartclk = board->base_baud * 16; - if (pci_match_id(pci_use_msi, dev)) { - dev_dbg(&dev->dev, "Using MSI(-X) interrupts\n"); - pci_set_master(dev); - rc = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_ALL_TYPES); + if (board->flags & FL_NOIRQ) { + uart.port.irq = 0; } else { - dev_dbg(&dev->dev, "Using legacy interrupts\n"); - rc = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_LEGACY); - } - if (rc < 0) { - kfree(priv); - priv = ERR_PTR(rc); - goto err_deinit; + if (pci_match_id(pci_use_msi, dev)) { + dev_dbg(&dev->dev, "Using MSI(-X) interrupts\n"); + pci_set_master(dev); + rc = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_ALL_TYPES); + } else { + dev_dbg(&dev->dev, "Using legacy interrupts\n"); + rc = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_LEGACY); + } + if (rc < 0) { + kfree(priv); + priv = ERR_PTR(rc); + goto err_deinit; + } + + uart.port.irq = pci_irq_vector(dev, 0); } - uart.port.irq = pci_irq_vector(dev, 0); uart.port.dev = &dev->dev; for (i = 0; i < nr_ports; i++) {