linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: 李捷 <jie6.li@samsung.com>
To: "mst@redhat.com" <mst@redhat.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: 김경산 <ks0204.kim@samsung.com>, 何兴 <xing84.he@samsung.com>,
	吕高飞 <gaofei.lv@samsung.com>
Subject: [PATCH] uio: uio_pci_generic: don't fail probe if pdev->irq equals to IRQ_NOTCONNECTED
Date: Thu, 07 Jan 2021 19:32:07 +0800	[thread overview]
Message-ID: <20210107113207epcms5p268119bdd826f36a0e5e488a5476f82ca@epcms5p2> (raw)
In-Reply-To: CGME20210107113207epcms5p268119bdd826f36a0e5e488a5476f82ca@epcms5p2

From 0fbcd7e386898d829d3000d094358a91e626ee4a Mon Sep 17 00:00:00 2001
From: Jie Li <jie6.li@samsung.com>
Date: Mon, 7 Dec 2020 08:05:07 +0800
Subject: [PATCH] uio: uio_pci_generic: don't fail probe if pdev->irq equals to
 IRQ_NOTCONNECTED

Some devices use 255 as default value of Interrupt Line register, and this
maybe causes pdev->irq is set as IRQ_NOTCONNECTED in some scenarios. For
example, NVMe controller connects to Intel Volume Management Device (VMD).
In this situation, IRQ_NOTCONNECTED means INTx line is not connected, not
fault. If bind uio_pci_generic to these devices, uio frame will return
-ENOTCONN through request_irq.

This patch allows binding uio_pci_generic to device with dev->irq of
IRQ_NOTCONNECTED.

Signed-off-by: Jie Li <jie6.li@samsung.com>
Acked-by: Kyungsan Kim <ks0204.kim@samsung.com>
---
 drivers/uio/uio_pci_generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/uio/uio_pci_generic.c b/drivers/uio/uio_pci_generic.c
index b8e44d16279f..c7d681fef198 100644
--- a/drivers/uio/uio_pci_generic.c
+++ b/drivers/uio/uio_pci_generic.c
@@ -92,7 +92,7 @@ static int probe(struct pci_dev *pdev,
 	gdev->info.version = DRIVER_VERSION;
 	gdev->info.release = release;
 	gdev->pdev = pdev;
-	if (pdev->irq) {
+	if (pdev->irq && (pdev->irq != IRQ_NOTCONNECTED)) {
 		gdev->info.irq = pdev->irq;
 		gdev->info.irq_flags = IRQF_SHARED;
 		gdev->info.handler = irqhandler;
-- 
2.17.1


       reply	other threads:[~2021-01-07 11:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210107113207epcms5p268119bdd826f36a0e5e488a5476f82ca@epcms5p2>
2021-01-07 11:32 ` 李捷 [this message]
2021-01-07 11:38   ` [PATCH] uio: uio_pci_generic: don't fail probe if pdev->irq equals to IRQ_NOTCONNECTED gregkh
     [not found] <CGME20210201042758epcas5p1a6cb788bf5eb1bf85efa66662db2edf6@epcas5p1.samsung.com>
2021-02-01  4:25 ` jie6.li
     [not found] <CGME20210107075037epcms5p2b53d8edb70df2ad0f75613ecbbcf9456@epcms5p2>
     [not found] ` <20210107075037epcms5p2b53d8edb70df2ad0f75613ecbbcf9456@epcms5p2>
2021-01-07  9:27   ` gregkh
     [not found] <CGME20210106114851epcms5p81f6ba47c45047d28fda8f201b54d3ae6@epcms5p8>
     [not found] ` <1269705030.4191784.1609933731961@mail-kr5-0>
2021-01-06 12:28   ` gregkh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210107113207epcms5p268119bdd826f36a0e5e488a5476f82ca@epcms5p2 \
    --to=jie6.li@samsung.com \
    --cc=gaofei.lv@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ks0204.kim@samsung.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=xing84.he@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).