Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2655068pxj; Mon, 31 May 2021 07:30:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxg+qB1RKJKaXrFaF3zxxpFZA8YtZyXQ08425VWX3/eMgbfebOabemKybGTVtMwTZpBd6Ip X-Received: by 2002:a6b:7901:: with SMTP id i1mr17327181iop.41.1622471449474; Mon, 31 May 2021 07:30:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622471449; cv=none; d=google.com; s=arc-20160816; b=UJ1RlEPPEWHhl68pRnZ0MmCUWFYrL5DDsKUMc0ROLd0LnVhRBPJBe2T5B8v59A/i/d 4LZBpXzE7GW3R0JWMB5ak5ewyF+2WnX6csGlSsvEKfmHmem9ocN8N3d9JFGbPvtJ5xZa cmyUmhpesdz5dHleT4+RTEN5olGeMhokHtfxOVVprJJP+127JrTPB6JUjRfuegSYUvWl U6diqyjZ19PbHVGairRdJ9t6dNcFQKuZT2F5Oa77liaFmpBPuUqj27j2bzGFbEWRK7xJ L79cTfBrBGcM8Q5XG1uHD2L1yindrrpoAlJVu6WIoVAyOkYqhhIMuj/w9nzldqgohFw6 e+aw== 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=cWMKEujTuDSgnRzHYbyb+dp1ZuvUntzxIJEshPnRCBY=; b=jl0UibfE6/bh3xS7vNU+8JB23PWHM0OqckGOMDE39Or4wSNB3b93ww3w+mVSC8/IoF e4nj8M5/R9AH1oU2scHbN3nrrrAofUTMvhMLzjAS2u8Td1eOsuQurTDu/yV8PKIXrcSv 61ayFDYQ1rao7vOC1hfM5OqX5nGKKg0W5DwhO7UshZho+vISJfDp+I88/GtgbnDbJ8EQ ZE69QDn+brWUB8SFczlixTBYwSGXe955t1Tlvz66q46h4eh5W0hMsxk7kNEhaSuOVYXX 485JCriLKKhdl0tXRBuP8oXSvzEeqkHY0TKdrWAnUAt0KBP5uD/rVDNoJILGfCJulx56 PL6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h4rTm1Ud; 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 i14si13796517ilu.19.2021.05.31.07.30.36; Mon, 31 May 2021 07:30:49 -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=h4rTm1Ud; 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 S233821AbhEaO3a (ORCPT + 99 others); Mon, 31 May 2021 10:29:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:55016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232955AbhEaNxG (ORCPT ); Mon, 31 May 2021 09:53:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DB54261879; Mon, 31 May 2021 13:33:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622467986; bh=pE2tmrkllVgxwJJQI1Mpen+neXL9uPZdNdKJWlIOvC8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h4rTm1UdbHmxdWQZPNxad8tg8Nhl1uON+j490xQSWFXhuf0yIzotmnhmOgFMV0dvL Kv6Arr9w6eQWEw1xLJayn/KtPIhLnp94yEFVoYELl8689Iy9utCM7dA4dSqM+Xr8KB McwROj86lqCV6272Q6xp0R/DZ2q1WaF7zTSfTw6k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christian Gmeiner Subject: [PATCH 5.10 073/252] serial: 8250_pci: handle FL_NOIRQ board flag Date: Mon, 31 May 2021 15:12:18 +0200 Message-Id: <20210531130700.475389610@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130657.971257589@linuxfoundation.org> References: <20210531130657.971257589@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 @@ -3958,21 +3958,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++) {