linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Sarah Sharp <sarah.a.sharp@linux.intel.com>,
	"Bulkow, David" <David.Bulkow@stratus.com>
Cc: "Lawrence, Joe" <Joe.Lawrence@stratus.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: USB PCI quirk issue
Date: Mon, 15 Apr 2013 13:41:20 -0700	[thread overview]
Message-ID: <CAE9FiQVe95hT2mv4G+v_FMk5_qQDSg0e0fPdZdoe8Cgam70EnA@mail.gmail.com> (raw)
In-Reply-To: <20130415182614.GB9224@xanatos>

[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]

On Mon, Apr 15, 2013 at 11:26 AM, Sarah Sharp
<sarah.a.sharp@linux.intel.com> wrote:
> Cc-ing the public Linux PCI and USB mailing lists.
>
> On Fri, Apr 12, 2013 at 02:59:29PM -0400, Bulkow, David wrote:
>> Susan,
>
> I'm Sarah. :)
>
>> While testing Linux 3.9 we ran into an issue which I believe is a
>> conflict between a couple of PCI changes.  Stratus has hardware that
>> can hot add/remove chunks of its PCI hierarchy which has tickled some
>> of the newer code.  I am mailing you because I believe the second
>> change I list below holds the key.
>>
>> I believe we are experiencing a collision between two changes.  The
>> first:
>>
>> PCI: Put pci_dev in device tree as early as possible
>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4f535093cf8f6da8cfda7c36c2c1ecd2e9586ee4
>>
>> is causing device_add to be called during pci_scan_slot.  The second:
>>
>> USB: Fix handoff when BIOS disables host PCI device
>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cab928ee1f221c9cc48d6615070fefe2e444384a
>>
>> is getting activated by device_add.

looks like we call quirk_final too early for hotadd path.

Please check if attached can workaround the problem.

Thanks

Yinghai

[-- Attachment #2: fix_qurik_final_hotadd.patch --]
[-- Type: application/octet-stream, Size: 753 bytes --]

diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index bdc1e8b..1edffb7 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -201,6 +201,7 @@ void pci_bus_add_devices(const struct pci_bus *bus)
 		/* Skip already-added devices */
 		if (dev->is_added)
 			continue;
+		pci_fixup_device(pci_fixup_final, dev);
 		retval = pci_bus_add_device(dev);
 	}
 
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 43ece5d..67cd045 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1341,7 +1341,6 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)
 	list_add_tail(&dev->bus_list, &bus->devices);
 	up_write(&pci_bus_sem);
 
-	pci_fixup_device(pci_fixup_final, dev);
 	ret = pcibios_add_device(dev);
 	WARN_ON(ret < 0);
 

  reply	other threads:[~2013-04-15 20:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5AA430FFE4486C448003201AC83BC85E01F83F0D@EXHQ.corp.stratus.com>
2013-04-15 18:26 ` USB PCI quirk issue Sarah Sharp
2013-04-15 20:41   ` Yinghai Lu [this message]
2013-04-16 20:17     ` Bulkow, David
     [not found]       ` <5AA430FFE4486C448003201AC83BC85E01F83F13@EXHQ.corp.stratus.com>
2013-04-24 17:08         ` Yinghai Lu
2013-04-24 18:32           ` Bulkow, David
2013-04-26  1:47             ` [PATCH] PCI: Remove duplicate pci_disable_device for pcie port Yinghai Lu
2013-04-26  4:02               ` Yijing Wang
2013-04-26  6:20                 ` Yinghai Lu
2013-04-26  9:41                   ` Yijing Wang
2013-04-26  1:47       ` [PATCH] PCI: move down pci_fixup_final for hotplug path Yinghai Lu
2013-05-07 21:32         ` Bjorn Helgaas
2013-05-07 21:38           ` Bjorn Helgaas
2013-05-07 22:36             ` Yinghai Lu

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=CAE9FiQVe95hT2mv4G+v_FMk5_qQDSg0e0fPdZdoe8Cgam70EnA@mail.gmail.com \
    --to=yinghai@kernel.org \
    --cc=David.Bulkow@stratus.com \
    --cc=Joe.Lawrence@stratus.com \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=sarah.a.sharp@linux.intel.com \
    /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).