linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yang <weiyang@linux.vnet.ibm.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Wei Yang <weiyang@linux.vnet.ibm.com>,
	Andreas Noever <andreas.noever@gmail.com>,
	David Henningsson <david.henningsson@canonical.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	Thomas Richter <thor@math.tu-berlin.de>,
	gwshan@linux.vnet.ibm.com
Subject: Re: [PATCH] Add pci=assign-busses quirk to Dell Latitude D505
Date: Tue, 16 Sep 2014 16:49:42 +0800	[thread overview]
Message-ID: <20140916084942.GA15258@richard> (raw)
In-Reply-To: <20140915190319.GA15350@google.com>

On Mon, Sep 15, 2014 at 01:03:19PM -0600, Bjorn Helgaas wrote:
>On Mon, Sep 15, 2014 at 05:53:05PM +0800, Wei Yang wrote:
>> On Mon, Sep 15, 2014 at 12:10:27AM +0200, Andreas Noever wrote:
>> ...
>
>> >@@ -840,8 +863,10 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass)
>> >
>> > 		if (max >= bus->busn_res.end) {
>> > 			dev_warn(&dev->dev, "can't allocate child bus %02x from %pR\n",
>> >-				 max, &bus->busn_res);
>> >-			goto out;
>> >+				 max + 1, &bus->busn_res);
>> >+			/* Try to resize bus */
>> >+			if (pci_grow_bus(bus, max + 1))
>> >+				goto out;
>> 
>> On some platforms, like powerpc, we have some limitations of the bus number a
>> bridge could have. Sometimes, we need the start bus number to be power 2
>> aligned.
>
>Huh.  I have to admit that I'm getting tired of all the powerpc-specific
>PCI hacks.  It's hard enough to get this stuff working on hardware that
>conforms to the spec, and scattering pcibios_*() hooks around makes the
>code even harder to follow.
>

Yep, those powerpc-specific things are not friendly :-(

I feel very sad it brings a lot difficulties to maintain it in linux mainline.
Sorry to bring so many trouble to you.

>What would happen if powerpc used PCI_PROBE_ONLY?  Do you really depend on
>the PCI core to configure anything for you, or does your firmware set
>everything up the way it needs to be?
>

Hmm... I had a try with PCI_PROBE_ONLY set, sounds can't bring up the machine.
Currently, we rely on the kernel to assign devices' resources. When
PCI_PROBE_ONLY is set, device resources will not be setup properly.

>Changing bridge configuration seems like something we should avoid under
>PCI_PROBE_ONLY (I haven't read Andreas' patch in detail, so I don't know if
>that's how it works).  If PCI_PROBE_ONLY would work for powerpc, then we
>wouldn't have an issue here.
>
>Bjorn

-- 
Richard Yang
Help you, Help me


  reply	other threads:[~2014-09-16  8:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-29  9:10 [PATCH] Add pci=assign-busses quirk to Dell Latitude D505 David Henningsson
2014-08-29 14:22 ` Bjorn Helgaas
2014-08-29 14:44   ` David Henningsson
2014-08-29 17:36     ` Bjorn Helgaas
2014-09-10 18:08       ` Bjorn Helgaas
2014-09-10 19:50         ` Andreas Noever
2014-09-10 20:37           ` Bjorn Helgaas
2014-09-11  8:13         ` David Henningsson
2014-09-13  3:18           ` Bjorn Helgaas
2014-09-14 22:10             ` Andreas Noever
2014-09-15  9:53               ` Wei Yang
2014-09-15 10:04                 ` Andreas Noever
2014-09-16  1:37                   ` Wei Yang
2014-09-16  3:00                     ` Gavin Shan
2014-09-15 19:03                 ` Bjorn Helgaas
2014-09-16  8:49                   ` Wei Yang [this message]
2014-09-19 17:04             ` 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=20140916084942.GA15258@richard \
    --to=weiyang@linux.vnet.ibm.com \
    --cc=andreas.noever@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=david.henningsson@canonical.com \
    --cc=gwshan@linux.vnet.ibm.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=thor@math.tu-berlin.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).