From: Bjorn Helgaas <helgaas@kernel.org>
To: "Mateusz Jończyk" <mat.jonczyk@o2.pl>
Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
linux-acpi@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
Bjorn Helgaas <bhelgaas@google.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, Borislav Petkov <bp@suse.de>
Subject: Re: [PATCH v2] acpi,pci: handle duplicate IRQ routing entries returned from _PRT
Date: Tue, 27 Sep 2022 14:28:28 -0500 [thread overview]
Message-ID: <20220927192828.GA1723692@bhelgaas> (raw)
In-Reply-To: <20220917090944.110885-1-mat.jonczyk@o2.pl>
On Sat, Sep 17, 2022 at 11:09:44AM +0200, Mateusz Jończyk wrote:
> On some platforms, the ACPI _PRT function returns duplicate interrupt
> routing entries. Linux uses the first matching entry, but sometimes the
> second matching entry contains the correct interrupt vector.
>
> This happens on a Dell Latitude E6500 laptop with the i2c-i801 Intel
> SMBus controller. This controller was nonfunctional unless its interrupt
> usage was disabled (using the "disable_features=0x10" module parameter).
>
> After investigation, it turned out that the driver was using an
> incorrect interrupt vector: in lspci output for this device there was:
> Interrupt: pin B routed to IRQ 19
> but after running i2cdetect (without using any i2c-i801 module
> parameters) the following was logged to dmesg:
>
> [...]
> [ 132.248657] i801_smbus 0000:00:1f.3: Timeout waiting for interrupt!
> [ 132.248669] i801_smbus 0000:00:1f.3: Transaction timeout
> [ 132.452649] i801_smbus 0000:00:1f.3: Timeout waiting for interrupt!
> [ 132.452662] i801_smbus 0000:00:1f.3: Transaction timeout
> [ 132.467682] irq 17: nobody cared (try booting with the "irqpoll" option)
Drop the timestamps; they add clutter but not useful information.
> Existence of duplicate entries in a table returned by the _PRT method
> was confirmed by disassembling the ACPI DSTD table.
>
> Linux used the first matching entry, which was incorrect. In order not
> to disrupt existing systems, use the first matching entry unless the
> pci=prtlast kernel parameter is used or a Dell Latitude E6500 laptop is
> detected.
Do we have a reason to believe that in general, using the first
matching entry is incorrect? I don't see anything in the ACPI spec
(r6.5, sec 6.2.13) that sheds light on this.
Presumably this works on Windows, and I doubt Windows would have a
platform quirk for this, so I hypothesize that Windows treats _PRT
entries as assignments, and the last one rules. Maybe Linux should
adopt that rule?
Bjorn
next prev parent reply other threads:[~2022-09-27 19:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-17 9:09 [PATCH v2] acpi,pci: handle duplicate IRQ routing entries returned from _PRT Mateusz Jończyk
2022-09-27 19:28 ` Bjorn Helgaas [this message]
2022-09-29 18:03 ` Mateusz Jończyk
2022-11-12 0:20 ` Bjorn Helgaas
2022-11-12 20:07 ` Mateusz Jończyk
2022-11-12 20:09 ` [PATCH] acpi,pci: warn about " Mateusz Jończyk
2022-11-13 17:34 ` [PATCH v2] " Mateusz Jończyk
2022-11-15 8:36 ` Jean Delvare
2022-11-23 20:28 ` Mateusz Jończyk
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=20220927192828.GA1723692@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=bp@suse.de \
--cc=corbet@lwn.net \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mat.jonczyk@o2.pl \
--cc=rafael@kernel.org \
/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