All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Dutile <ddutile@redhat.com>
To: James Paradis <jparadis@redhat.com>
Cc: Prarit Bhargava <prarit@redhat.com>,
	linux-pci@vger.kernel.org, mstowe@redhat.com,
	matthew wilcox <matthew.wilcox@linux.intel.com>,
	jbarnes@virtuousgeek.org, Matthew Wilcox <matthew@wil.cx>
Subject: Re: [PATCH] pci: Workaround Stratus broken PCIE hierarchy
Date: Fri, 11 Nov 2011 14:13:12 -0500	[thread overview]
Message-ID: <4EBD73C8.8070407@redhat.com> (raw)
In-Reply-To: <bd3514f0-1a80-45ac-a08e-b327a367b276@zmail15.collab.prod.int.phx2.redhat.com>

On 11/11/2011 12:41 PM, James Paradis wrote:
> Hmmm... would it be better to do this as a quirk or as a boot
> parameter?  I've heard reports that other systems may be running
Hearsay?  if you have definite cases, then please share them,
so folks know when to flip the boot parameter on.  
note: it would have to be an early boot param as well.
> into similar issues... if we don't know exactly which systems
> these are then maybe a boot parameter would be a more flexible
> approach...
>
> --jim
>
> ----- Original Message -----
>> On 11/10/2011 09:31 AM, Matthew Wilcox wrote:
>>> On Thu, Nov 10, 2011 at 09:00:13AM -0500, Prarit Bhargava wrote:
>>>> Stratus systems have a hierarchy that includes a PCIE Downstream
>>>> bridge
>>>> connected to a PCIE Upstream bridge and a PCI Downstream bridge.
>>>>   The system
>>>> boots with this wrong hierarchy into a crippled mode (USB doesn't
>>>> work,
>>>> network doesn't work ...).  Avoiding the Downstream bridge check
>>>> in
>>>> only_one_child() causes all the bridges to be enumerated and the
>>>> system
>>>> to function properly.
>>>
>>>> @@ -1275,7 +1276,15 @@ static int only_one_child(struct pci_bus
>>>> *bus)
>>>>    	struct pci_dev *parent = bus->self;
>>>>    	if (!parent || !pci_is_pcie(parent))
>>>>    		return 0;
>>>> -	if (parent->pcie_type == PCI_EXP_TYPE_ROOT_PORT ||
>>>> +	if (parent->pcie_type == PCI_EXP_TYPE_ROOT_PORT)
>>>> +		return 1;
>>>> +	/*
>>>> +	 * Stratus/NEC ftServer systems have a broken PCIE hierarchy in
>>>> which
>>>> +	 * one upstream and one downstream port are plugged into a
>>>> downstream
>>>> +	 * port.  Avoiding the downstream port check here results in a
>>>> +	 * functional system.
>>>> +	 */
>>>> +	if (!dmi_name_in_vendors("ftServer")&&
>>>>    	parent->pcie_type == PCI_EXP_TYPE_DOWNSTREAM)
>>>>    		return 1;
>>>>    	return 0;
>>>
>>> dmi_name_in_vendors is relatively expensive, so the order of these
>>> two
>>> should be swapped, at least:
>>>
>>>> 	if (parent->pcie_type == PCI_EXP_TYPE_DOWNSTREAM&&
>>>>    	!dmi_name_in_vendors("ftServer"))
>>>
>>> Plus, this gets called for every PCI bridge.  We should be caching
>>> it
>>> somewhere, so it's only called once.
>>>
>> Then i recommend a dmi_name_in_vendors() check at init; stick result
>> in
>> global (or local static), and then it's not exec'd on each bridge,
>> just
>> a simple flag check.
>> If that's the case, I'd re-cast my vote for putting the code in
>> pci_quirks
>> with an export, so it is tracked as a quirk.  that may get messy
>> wrt other arches though (the export in common code; not sure if
>> quirks is
>> included on all arches).
>>
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2011-11-11 19:13 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-10 14:00 [PATCH] pci: Workaround Stratus broken PCIE hierarchy Prarit Bhargava
2011-11-10 14:31 ` Matthew Wilcox
2011-11-10 16:50   ` Don Dutile
2011-11-11 17:41     ` James Paradis
2011-11-11 19:13       ` Don Dutile [this message]
2011-11-11 20:29         ` Bjorn Helgaas
2011-11-11 20:35           ` Don Dutile
2011-11-14 14:44             ` Prarit Bhargava
2011-11-14 18:14               ` Matthew Wilcox
2011-11-14 19:50                 ` Prarit Bhargava
2011-11-15 20:16                   ` Matthew Wilcox
2011-11-15 15:56                 ` Prarit Bhargava
2011-11-15 16:08                   ` Rolf Eike Beer
2011-11-15 18:14                     ` Bjorn Helgaas
2011-11-15 18:25                       ` Prarit Bhargava
2011-11-15 21:08                         ` James Paradis
2011-11-15 21:52                           ` Myron Stowe
2011-11-15 22:14                             ` James Paradis
2011-11-15 20:15                   ` Matthew Wilcox
2011-11-16 16:53                     ` Prarit Bhargava
2011-11-17  0:18                       ` Prarit Bhargava
2011-11-15 21:53                   ` James Paradis
2011-11-15 22:27           ` James Paradis
2011-11-15 23:07             ` Don Dutile
  -- strict thread matches above, loose matches on Subject: below --
2012-04-25 17:56 Prarit Bhargava
2012-04-25 23:35 ` Bjorn Helgaas

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=4EBD73C8.8070407@redhat.com \
    --to=ddutile@redhat.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=jparadis@redhat.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=matthew.wilcox@linux.intel.com \
    --cc=matthew@wil.cx \
    --cc=mstowe@redhat.com \
    --cc=prarit@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.