linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: linux-pci@vger.kernel.org
Cc: Bjorn Helgaas <bhelgaas@google.com>, Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] PCI/portdrv: Set master earlier
Date: Wed, 9 Oct 2013 16:33:04 +0200	[thread overview]
Message-ID: <20131009163304.62b439a9@endymion.delvare> (raw)

Since kernel 3.12-rc3, I get the following warning messages at boot:
pcieport 0000:00:07.0: driver skip pci_set_master, fix it!
pcieport 0000:00:01.0: driver skip pci_set_master, fix it!

These are:
00:01.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 1 (rev 13)
00:07.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 7 (rev 13)

Calling pci_set_master() immediately after pci_enable_device() makes
the warning messages go away.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Bjorn Helgaas <bhelgaas@google.com>
---
Please note that I am far from certain that this is the correct fix.
Another approach would be to disable the device if
get_port_device_capability() returns no capabilities. I suppose the
device would then be re-enabled later if really needed. What's the best
approach?

 drivers/pci/pcie/portdrv_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-3.12-rc4.orig/drivers/pci/pcie/portdrv_core.c	2013-09-24 00:41:09.000000000 +0200
+++ linux-3.12-rc4/drivers/pci/pcie/portdrv_core.c	2013-10-09 15:43:54.205943783 +0200
@@ -366,13 +366,13 @@ int pcie_port_device_register(struct pci
 	status = pci_enable_device(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

             reply	other threads:[~2013-10-09 14:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-09 14:33 Jean Delvare [this message]
2013-12-07 22:23 ` [PATCH] PCI/portdrv: Set master earlier Bjorn Helgaas
2013-12-08  3:26   ` Yinghai Lu
2013-12-09  3:07     ` Benjamin Herrenschmidt
2013-12-17  0:53       ` Bjorn Helgaas
2013-12-08 13:09   ` Jean Delvare

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=20131009163304.62b439a9@endymion.delvare \
    --to=jdelvare@suse.de \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=tiwai@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).