Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2729865pxj; Mon, 31 May 2021 09:16:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8d6Z3h1v9XjxtksyRX7HZNsFFWnVx5lLZY0CK5S3tTwZGx2dKiljxvKrk40DVKy/ePlkx X-Received: by 2002:a17:906:1806:: with SMTP id v6mr23443071eje.454.1622477789461; Mon, 31 May 2021 09:16:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622477789; cv=none; d=google.com; s=arc-20160816; b=VwkqFc7cHVhe/Wv7oTK1bxVqnJM1lHndafh/dDhnot1RG0JVg4IHDzMMnwdkzsrNA0 Z9Ri0LlU9kzTrwXxFZm2bFPO3INuZC3FvEGnpwZT+LR74ZmmykNml3qIvr2BLCM6ozw3 pcoGXL6rfZ8i6dA+ojUMQnx23WudfK4kI9phsZ9g9UgFs22hLwl+aKrh6OJTuVQSJWZR LfQxOIsnldM6Kq6aH/eVYRfC0xuutTq/rxfETH8rxUpmsPx9fanSDd3itkIjLAtlE96a bm0Uz7D8mpXDRe4EGjaBj4u+3zAIx0+MKeRYwvF3avaDetZbOFD904UNOMNpSQxp3lkY nZYg== 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=gNhxtuHmFJU1uvaSoDUod35AzyQ9NQdV9izpN6LXTe6TU009FSJrADkjzfG4ietV/7 QkuLjwuRp0iP2hQ7Gu/aq3MOZoT5B4HunTXNjnRB+QH5M8qA5r09E1cg1pxZd2aKcuq+ xW2ak3WiRsX0wMBegBLr3pt85l48k0m+zeAFqgTQNAZ+e4x2PqVk0xAxRyFBMtmM2wge WplqzR+g63Kpx80fsj6jOJsYpQ4JkUuyFbuA2eo8oRM1tE1MGN5tAMxPKgRRHiz5bbry wCMkHFbZm0NA5OWaC3zawhKb/GHG4TlqqdKqEOxfK1L2xywy7HZjNDaxvvsTmhEPmWwt DPbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Dfw/lw61"; 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 ji21si309579ejc.740.2021.05.31.09.16.06; Mon, 31 May 2021 09:16:29 -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="Dfw/lw61"; 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 S234579AbhEaQOp (ORCPT + 99 others); Mon, 31 May 2021 12:14:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:37958 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234144AbhEaOjb (ORCPT ); Mon, 31 May 2021 10:39:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0D7E761C5B; Mon, 31 May 2021 13:52:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622469153; bh=pE2tmrkllVgxwJJQI1Mpen+neXL9uPZdNdKJWlIOvC8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dfw/lw613KK4Mu5EAniHCIH7gLjr/jFvTJIZoDlFl27GeLbnz/TbHAnhamHAImDZD yVOGyvF0HYWcmyJ4G1GVFz8OpEYOu8na2KvMcwo85YSvB0S0TEIN0dgFw44PESXotQ IiSU/wSPp0JqB7hOWntucmm7GOIOLdApNBwpOvxU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christian Gmeiner Subject: [PATCH 5.12 088/296] serial: 8250_pci: handle FL_NOIRQ board flag Date: Mon, 31 May 2021 15:12:23 +0200 Message-Id: <20210531130706.853875433@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130703.762129381@linuxfoundation.org> References: <20210531130703.762129381@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++) {