Bug 228409 - PCI-PCI bridge IRQ not shared between ath0 and re0
Summary: PCI-PCI bridge IRQ not shared between ath0 and re0
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: i386 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
Keywords: patch
Depends on:
Reported: 2018-05-22 00:43 UTC by Tim Chase
Modified: 2019-05-21 19:44 UTC (History)
4 users (show)

See Also:

Make PCI-PCI bridge shareable (432 bytes, patch)
2018-07-28 18:01 UTC, Tim Chase
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Chase 2018-05-22 00:43:00 UTC
I replaced the non-functioning Broadcom wifi card in my Dell Mini10 netbook with an ath0 wireless card (https://www.amazon.com/gp/product/B00JESLUWQ/). The dmesg output showed that it was identified, but that it couldn't allocate an interrupt:

# dmesg | grep ath0
ath0: <Atheros 9280> mem 0xd8000000-0xd800ffff irq 17 at device 0.0 on pci2
ath0: could not map interrupt
device_attach: ath0 attach returned 6

Checking on it, IRQ17 was in use by my pcib1:

# dmesg | grep "irq 17"
pcib1: <ACPI PCI-PCI bridge> irq 17 at device 28.0 on pci0
ath0: <Atheros 9280> mem 0xd8000000-0xd800ffff irq 17 at device 0.0 on pci2

Oleksandr Tymoshenko suggested a one-line diff (https://people.freebsd.org/~gonzo/patches/pci_pci-shareable-irq.diff) to make the PCI-PCI be RF_SHAREABLE.  Building with that diff resolved the issue and now both the re0 (which AFAIC is the only item on pci1 on that pcib1) and the ath0 are working fine.

So it *looks* like this solves the issue, but Adrian Chad informed me that "warner says "pcie interrupts aren't shared."" and requested that I open a PR on the matter to get more eyeballs on it.  So I'm opening this as requested.

Full conversation leading up to this can be found at
including the initial dmesg output and the relevant new dmesg ath0 output after applying Oleksandr's patch.
Comment 1 Tim Chase 2018-07-28 18:01:06 UTC
Created attachment 195548 [details]
Make PCI-PCI bridge shareable

Patch from Oleksandr Tymoshenko (gonzo@?) that solves the problem for me.
Comment 2 Tim Chase 2018-07-28 18:10:50 UTC
I don't want to pester, but did want to follow up.

Warner says (via Adrian Chad) that "pcie interrupts aren't shared."

However, this patch from Oleksandr Tymoshenko (gonzo@?) resolves the issue for me getting my ath0 up and working by sharing the PCIE interrupt.

Does something need to be done to tell ath0 to use a different interrupt that *is* shareable (or at least tell it not to use IRQ17), or is there some other solution I should try if the patch is unacceptable?


(and despite the subject being changed, the conflict does seem to be pcib1-vs-ath0 not re0-vs-ath0 unless I'm totally misunderstanding the dmesg output)
Comment 3 Ed Maste freebsd_committer 2019-05-21 19:17:25 UTC
gonzo@ what's the next step here?
Comment 4 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2019-05-21 19:44:58 UTC
(In reply to Ed Maste from comment #3)

Confirm that sharable interrupts are OK for PCI-PCI bridge with someone who's familiar with PCI internals and commit the fix if it's OK.