[opensuse-kernel] pcieport 0000:00:03.0: driver skip pci_set_master, fix it!
I am getting the message in $SUBJECT with current kernel:HEAD lspci said that device is: 00:03.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 3 (rev 13) No idea how to proceed further or if this something to be concerned. Any hint appreciated. -- "If debugging is the process of removing bugs, then programming must be the process of putting them in." - Edsger Dijkstra -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
Hi Cristian, Le Friday 04 October 2013 à 21:12 -0300, Cristian Rodríguez a écrit :
I am getting the message in $SUBJECT with current kernel:HEAD
lspci said that device is:
00:03.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 3 (rev 13)
I see the same with upstream kernel 3.12-rc3, same chipset but different ports (1 and 7 for me.) I'll try rc4+ now.
No idea how to proceed further or if this something to be concerned.
I have no idea either, but the message strongly suggests that something needs to be done. -- Jean Delvare Suse L3 Support -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
At Wed, 09 Oct 2013 14:55:30 +0200, Jean Delvare wrote:
Hi Cristian,
Le Friday 04 October 2013 à 21:12 -0300, Cristian Rodríguez a écrit :
I am getting the message in $SUBJECT with current kernel:HEAD
lspci said that device is:
00:03.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 3 (rev 13)
I see the same with upstream kernel 3.12-rc3, same chipset but different ports (1 and 7 for me.) I'll try rc4+ now.
No idea how to proceed further or if this something to be concerned.
I have no idea either, but the message strongly suggests that something needs to be done.
Does the patch below fix? Through a quick look at pcieport driver code, there are two places calling pci_enable_device(), and this is the one that may go out without calling pci_set_master(). Takashi --- diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index 31063ac..c2f02fd 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c @@ -367,12 +367,12 @@ int pcie_port_device_register(struct pci_dev *dev) if (status) return status; + pci_set_master(dev); /* Get and check PCI Express port services */ capabilities = get_port_device_capability(dev); if (!capabilities) return 0; - pci_set_master(dev); /* * Initialize service irqs. Don't use service devices that * require interrupts if there is no way to generate them. -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
Hi Takashi, Le Wednesday 09 October 2013 à 15:53 +0200, Takashi Iwai a écrit :
At Wed, 09 Oct 2013 14:55:30 +0200, Jean Delvare wrote:
Hi Cristian,
Le Friday 04 October 2013 à 21:12 -0300, Cristian Rodríguez a écrit :
I am getting the message in $SUBJECT with current kernel:HEAD
lspci said that device is:
00:03.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 3 (rev 13)
I see the same with upstream kernel 3.12-rc3, same chipset but different ports (1 and 7 for me.) I'll try rc4+ now.
No idea how to proceed further or if this something to be concerned.
I have no idea either, but the message strongly suggests that something needs to be done.
Does the patch below fix? Through a quick look at pcieport driver code, there are two places calling pci_enable_device(), and this is the one that may go out without calling pci_set_master().
I came up with the same fix and yes, it does remove the warning. However I am not completely certain that this is the proper fix. It might be better to disable the device if it has no capabilities, on the assumption that it will be re-enabled if (and only if) needed. I'll discuss it upstream.
Takashi
--- diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c index 31063ac..c2f02fd 100644 --- a/drivers/pci/pcie/portdrv_core.c +++ b/drivers/pci/pcie/portdrv_core.c @@ -367,12 +367,12 @@ int pcie_port_device_register(struct pci_dev *dev) if (status) return status;
+ pci_set_master(dev); /* Get and check PCI Express port services */ capabilities = get_port_device_capability(dev); if (!capabilities) return 0;
- pci_set_master(dev); /* * Initialize service irqs. Don't use service devices that * require interrupts if there is no way to generate them.
-- Jean Delvare Suse L3 Support -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
Le Wednesday 09 October 2013 à 14:55 +0200, Jean Delvare a écrit :
Le Friday 04 October 2013 à 21:12 -0300, Cristian Rodríguez a écrit :
I am getting the message in $SUBJECT with current kernel:HEAD
lspci said that device is:
00:03.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 3 (rev 13)
I see the same with upstream kernel 3.12-rc3, same chipset but different ports (1 and 7 for me.) I'll try rc4+ now.
Warning message is still printed by today's rc4+ upstream kernel.
No idea how to proceed further or if this something to be concerned.
I have no idea either, but the message strongly suggests that something needs to be done.
The message was added by commit f41f064c (3.12-rc3). The added code does not only print the warning, it also calls pci_set_master() to workaround the bug. So as a user you can most probably ignore the message. In fact the usefulness of the message is being discussed upstream as we speak: http://marc.info/?l=linux-pci&m=138090218309722&w=2 I think either the warning message will be simply removed, of the pcieport driver will have to be fixed. I suspect simply moving the call to pci_set_master() in pcie_port_device_register() right after the call to pci_enable_device() may be enough. I'll discuss it upstream. -- Jean Delvare Suse L3 Support -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
Le Wednesday 09 October 2013 à 16:01 +0200, Jean Delvare a écrit :
Le Wednesday 09 October 2013 à 14:55 +0200, Jean Delvare a écrit :
Le Friday 04 October 2013 à 21:12 -0300, Cristian Rodríguez a écrit :
I am getting the message in $SUBJECT with current kernel:HEAD
lspci said that device is:
00:03.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 3 (rev 13)
I see the same with upstream kernel 3.12-rc3, same chipset but different ports (1 and 7 for me.) I'll try rc4+ now.
Warning message is still printed by today's rc4+ upstream kernel.
No idea how to proceed further or if this something to be concerned.
I have no idea either, but the message strongly suggests that something needs to be done.
The message was added by commit f41f064c (3.12-rc3). The added code does not only print the warning, it also calls pci_set_master() to workaround the bug. So as a user you can most probably ignore the message. In fact the usefulness of the message is being discussed upstream as we speak:
http://marc.info/?l=linux-pci&m=138090218309722&w=2
I think either the warning message will be simply removed, of the pcieport driver will have to be fixed. I suspect simply moving the call to pci_set_master() in pcie_port_device_register() right after the call to pci_enable_device() may be enough. I'll discuss it upstream.
For reference, upstream's decision was to just remove the warning and silently call pci_set_master() when needed: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/driver... -- Jean Delvare Suse L3 Support -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
participants (3)
-
Cristian Rodríguez
-
Jean Delvare
-
Takashi Iwai