linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dongdong Liu <liudongdong3@huawei.com>
To: <helgaas@kernel.org>, <lorenzo.pieralisi@arm.com>
Cc: <linux-pci@vger.kernel.org>, <linuxarm@huawei.com>,
	<charles.chenxin@huawei.com>,
	Dongdong Liu <liudongdong3@huawei.com>
Subject: [RFC PATCH] ARM64/PCI: Set dev->irq=0 before calling acpi_pci_irq_enable()
Date: Sat, 10 Mar 2018 10:58:12 +0800	[thread overview]
Message-ID: <1520650692-62705-1-git-send-email-liudongdong3@huawei.com> (raw)

The init value of dev->irq is from PCI_INTERRUPT_LINE register.The default
value of dev->irq usually is 255 before calling acpi_pci_irq_enable().
This will cause a problem When the platform does not support INTx well.
For example, we do not config _PRT on our HIP07 platform, we met irq 255
confilict.

The error message is as below.
snd_hda_intel 000d:33:00.1: PCI INT B: no GSI
snd_hda_intel 000d:33:00.1: enabling device (0000 -> 0002)
snd_hda_intel 000d:33:00.1: Force to snoop mode by module option
snd_hda_intel 000d:33:00.1: Device has broken 64-bit MSI but arch tried to
assign one above 4G
genirq: Flags mismatch irq 255. 00000001 (enahisic2i0-tx1) vs. 00000081
(snd_hda_intel:card0)
hns-nic HISI00C2:00 enahisic2i0: request irq(255) fail

enahisic2i0-tx1: this device is a platform device.
snd_hda_intel:card0: this device is a PCI device.

Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
---
 arch/arm64/kernel/pci.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
index 0e2ea1c..6a77bef 100644
--- a/arch/arm64/kernel/pci.c
+++ b/arch/arm64/kernel/pci.c
@@ -28,8 +28,11 @@
  */
 int pcibios_alloc_irq(struct pci_dev *dev)
 {
-	if (!acpi_disabled)
+	if (!acpi_disabled) {
+		dev->irq = 0;
 		acpi_pci_irq_enable(dev);
+	}
+
 
 	return 0;
 }
-- 
1.9.1

             reply	other threads:[~2018-03-10  2:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-10  2:58 Dongdong Liu [this message]
2018-03-13  0:18 ` [RFC PATCH] ARM64/PCI: Set dev->irq=0 before calling acpi_pci_irq_enable() Bjorn Helgaas
2018-03-13 10:22   ` Lorenzo Pieralisi
2018-03-13 11:20   ` Dongdong Liu
2018-03-13 11:42     ` Lorenzo Pieralisi
2018-03-15 10:35       ` Dongdong Liu

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=1520650692-62705-1-git-send-email-liudongdong3@huawei.com \
    --to=liudongdong3@huawei.com \
    --cc=charles.chenxin@huawei.com \
    --cc=helgaas@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=lorenzo.pieralisi@arm.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).