Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp635343pxj; Thu, 27 May 2021 08:18:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySqHPWZpohri+FHJZkRzZ2OG9ZoDrpsNnt5pQ6RzsgwdG4LnO3qYcvV0X8Uq4RLHTAYEMk X-Received: by 2002:a92:ad07:: with SMTP id w7mr3334177ilh.98.1622128729461; Thu, 27 May 2021 08:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622128729; cv=none; d=google.com; s=arc-20160816; b=MA084pO9/uqdKiwnuas3wQiTlqSUvAdvDbYge8TwxXPMp4UD53av6JB9q+cCYLlvq+ eFsn9vKrSMSKm7BqnnLRBIsaqmXl3JOeFOWZROcDP7tg7hhe6BcYBzSxzjZGAe0T7cfq GcqjiRMf69cWvKoPiZsyTcj6Ex101GEAWZfcmgr4wqKTEmG+bupfiCBntwYWN5pUl5v2 fmFCMoAynvzNwLKv6uD3fjWptp4RruiWRXpl0Ne6WGB2Ws3YrXjALWNeoiVTP/6QdiYy g+MtLzs9YMOVrSl6aqpV8iAT6/+gwlpeDAjl7x/Xau8LpHvEyLOEv8T/r1XlKMWuZQPU Riog== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=C58IMTIWG3aGpI31cvyq0/QCn2aAGcF3IZlr8Z32K/Y=; b=PMFY2p7DnJpp+qfCXL1TiyAkPsyYu0XhjViN3aEY0cROfS/7mlnzOGgPAdEt207di6 TvFbRAxVfR6SQbBtmj27XHF9ZZ2t1AVc9dDDnmy3+GMK6O/zoK3o04Jgwfn+r2E7tcXO ptRXA/owmHEdsXAWkuzNZkNpZ96s0O9S/KagrN3Ky2ZYSM+CYeH7drnjniuG1x8VnqNu 2pyL9cz9AbD+k186/WQpVzKIU8vct5n2DlgY48MWb41TefK1n0OMi6Wmgb+1ypqIyxL2 K1n4WFjtqq1y/Wo6ejpFKrXuPdaNWLv1I3JVgHUwVsUBZa5qa+d0g47NpWP9zF+lI7oC T8kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AucBLzD1; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b15si2977280jat.59.2021.05.27.08.18.32; Thu, 27 May 2021 08:18: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=@gmail.com header.s=20161025 header.b=AucBLzD1; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235871AbhE0J5J (ORCPT + 99 others); Thu, 27 May 2021 05:57:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235768AbhE0J5I (ORCPT ); Thu, 27 May 2021 05:57:08 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88657C061574; Thu, 27 May 2021 02:55:34 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id s6so119314edu.10; Thu, 27 May 2021 02:55:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=C58IMTIWG3aGpI31cvyq0/QCn2aAGcF3IZlr8Z32K/Y=; b=AucBLzD1N+8LtmRlcHZj0bnRH597i8Rv5zSBdhDLzjoBgCqC8pa0xXJzg8WoHd4EiA hzlkKVKxj6si3zT9ui9jP7tJQco7DXEN3fgi5H9k307nc0pGu26YUL6MGbF2jRuQfr/c C5RZf2e0A554MP0GdifknkmBmgwZvO7IPXfVvZudjBpQSJ6cBl3D+EQtS515fvgSJ7ZC HcTljKeD0z/mBtvPBrl1yODTAsFCsnt+Pt5zBxEt0yES4tMbuKHfPJ+KIBVyJsXZi08f JUXVj6V7mSZEBszlWV1qKkghI0FuvdD3p0zBoJ04J6hiKZPYMwynaPDT9Rglc3de/pEC pQsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=C58IMTIWG3aGpI31cvyq0/QCn2aAGcF3IZlr8Z32K/Y=; b=VjCxbIna+o7XJqwp189lmfVT9tIsrh7V+bKWlVZsNGtqdUgSvDlomc1nNN0zQa3CUk ON/Ecz9NfiL5pDUkQq6LcJD8aVMaB5hwl13MvDJAkR7pUZ2Bc4EzZhQZc0AsdNH0qbL/ ONDysMQGu0Th43AiURyQtFqto87J+McIVCYG9P7ycDHjpvt6963tfWUoCwYA2wK3FX+p 3A9NfRWB0y4p5dwfU2D8S15XWPVPQKZuOPtVHDcLeRulNOeOhOoUawUW0DrHc8HGzmsE OXeuNsRHVd1KU91k+FH1p6DjNfJtAFEXwh01PDp2HrAK7OiQD0Wiq1ZTcv2nX1p7bKpp FvFg== X-Gm-Message-State: AOAM532+EmfLSvhqN1sDQ68RnwYEr83E6SnPFj+MVjjmuf0rnIs8cCUu h0kUdVD5GohoDfkY27VpdqWjqGjTJoEyfQ== X-Received: by 2002:a05:6402:74f:: with SMTP id p15mr3166309edy.333.1622109332779; Thu, 27 May 2021 02:55:32 -0700 (PDT) Received: from localhost.localdomain.at (62-178-82-229.cable.dynamic.surfer.at. [62.178.82.229]) by smtp.gmail.com with ESMTPSA id l19sm70623edw.58.2021.05.27.02.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 May 2021 02:55:32 -0700 (PDT) From: Christian Gmeiner To: linux-kernel@vger.kernel.org Cc: Christian Gmeiner , stable@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , YueHaibing , Tobias Diedrich , Geert Uytterhoeven , Du Huanpeng , Ralf Ramsauer , linux-serial@vger.kernel.org Subject: [PATCH] serial: 8250_pci: handle FL_NOIRQ board flag Date: Thu, 27 May 2021 11:54:40 +0200 Message-Id: <20210527095529.26281-1-christian.gmeiner@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/tty/serial/8250/8250_pci.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c index 689d8227f95f..3b8217844c0b 100644 --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c @@ -3944,21 +3944,26 @@ pciserial_init_ports(struct pci_dev *dev, const struct pciserial_board *board) 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++) { -- 2.31.1