linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bug] PCI: Enable INTx if BIOS left them disabled - triggers during rescan
@ 2014-03-07 14:33 Andreas Noever
  2014-03-07 16:45 ` Bjorn Helgaas
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Noever @ 2014-03-07 14:33 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	Bjorn Helgaas

Hi,

After upgrading to the latest RC I noticed that suprise removal
stopped working. Linux did not notice that the devices where gone.
Bisection points to

1f42db786b14a31bf807fc41ee5583a00c08fcb1 PCI: Enable INTx if BIOS left
them disabled
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1f42db786b14a31bf807fc41ee5583a00c08fcb1

It seems that the above patch is triggered on the bridge itself (!)
when a new device is added below it. At this point the hotplug driver
for the bridge has already enabled MSI. Reenabling INTX kills MSI and
prevents later suprise removal notifications.

The following stacktrace is from a "echo 1 > rescan" on the bridge:
do_pci_enable_device+0x59/0x140
pci_reenable_device+0x1f/0x30
pci_assign_unassigned_bridge_resources+0x123/0x160
pci_rescan_bus_bridge_resize+0x28/0x40
dev_bus_rescan_store+0x85/0xa0
dev_attr_store+0x18/0x30
sysfs_kf_write+0x3d/0x50
kernfs_fop_write+0xd2/0x140
vfs_write+0xba/0x1e0
SyS_write+0x49/0xa0
system_call_fastpath+0x1a/0x1f

Similarly for a hotplug event:
do_pci_enable_device+0x59/0x140
pci_reenable_device+0x1f/0x30
pci_assign_unassigned_bridge_resources+0x123/0x160
pciehp_configure_device+0x90/0x160
pciehp_enable_slot+0x163/0x280
pciehp_power_thread+0xb8/0xe0
process_one_work+0x167/0x420
worker_thread+0x121/0x3a0

In both cases DisINTx is turned off and the hotplug driver stops
reacting to events.

Andreas

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-03-17 16:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-07 14:33 [Bug] PCI: Enable INTx if BIOS left them disabled - triggers during rescan Andreas Noever
2014-03-07 16:45 ` Bjorn Helgaas
2014-03-07 19:39   ` Yinghai Lu
2014-03-08  1:04     ` Bjorn Helgaas
2014-03-08  9:55       ` Andreas Noever
2014-03-10 20:43         ` Bjorn Helgaas
     [not found]           ` <CAMxnaaWr0z1zbpFQPX6UvYbnxhfA+3aj4ffhCBpp1i4ZLsGTPg@mail.gmail.com>
2014-03-11  0:10             ` Bjorn Helgaas
2014-03-11 12:52               ` Andreas Noever
2014-03-17 16:36                 ` Bjorn Helgaas

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).