]> git.baikalelectronics.ru Git - kernel.git/commit
xen/pci: We don't do multiple MSI's.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 28 Feb 2013 14:05:41 +0000 (09:05 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 1 Mar 2013 15:54:21 +0000 (10:54 -0500)
commitc14745a1731912d05a40ded686b178c34ed744be
tree4b2d8a9a6635ac4bed522f93ad9ad838b2e2d7f7
parentad90d9c7f1b7ccf753c533c0debe06ffd03967cd
xen/pci: We don't do multiple MSI's.

There is no hypercall to setup multiple MSI per PCI device.
As such with these two new commits:
-  b5c062a0eb8eeaabb9884b908dc0a921e167ca43
   PCI/MSI: Enable multiple MSIs with pci_enable_msi_block_auto()
50256d1ac2aaa3efec00de4efba540e2137b861c
   AHCI: Support multiple MSIs

we would call the PHYSDEVOP_map_pirq 'nvec' times with the same
contents of the PCI device. Sander discovered that we would get
the same PIRQ value 'nvec' times and return said values to the
caller. That of course meant that the device was configured only
with one MSI and AHCI would fail with:

ahci 0000:00:11.0: version 3.0
xen: registering gsi 19 triggering 0 polarity 1
xen: --> pirq=19 -> irq=19 (gsi=19)
(XEN) [2013-02-27 19:43:07] IOAPIC[0]: Set PCI routing entry (6-19 -> 0x99 -> IRQ 19 Mode:1 Active:1)
ahci 0000:00:11.0: AHCI 0001.0200 32 slots 4 ports 6 Gbps 0xf impl SATA mode
ahci 0000:00:11.0: flags: 64bit ncq sntf ilck pm led clo pmp pio slum part
ahci: probe of 0000:00:11.0 failed with error -22

That is b/c in ahci_host_activate the second call to
devm_request_threaded_irq  would return -EINVAL as we passed in
(on the second run) an IRQ that was never initialized.

CC: stable@vger.kernel.org
Reported-and-Tested-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/pci/xen.c