Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Andrew Sharp <andy.sharp@onstor.com>
Cc: Michael Buesch <mb@bu3sch.de>,
	ralf@linux-mips.org, linux-mips@linux-mips.org
Subject: Re: Linux MIPS PCI resource sanity check
Date: Mon, 18 Feb 2008 16:55:41 +0300	[thread overview]
Message-ID: <47B98E5D.2030301@ru.mvista.com> (raw)
In-Reply-To: <20080216153530.7a426a73@ripper.onstor.net>

Andrew Sharp wrote:

>>>There's a sanity check in pcibios_enable_resources() that looks
>>>like this:

>>>	r = &dev->resource[idx];
>>>	if (!r->start && r->end) {
>>>		printk(KERN_ERR "PCI: Device %s not available
>>>because of resource collisions\n", pci_name(dev)); return -EINVAL;
>>>	}

>>>What is this check actually doing?

>>   It makes sure that a PCI resource is allocated (base of 0 means
>>that it's unallocated due to previously detected resource conlict (or
>>some other reason).

> Actually, IIRC, resources are based on what the device requested, so a
> device behind a bridge could request a resource starting at 0.  I had

    Zero value in BAR was considered unallocated resource in the PCI 2.2 spec...

> to change this for a system as well.  I changed it to

> if (!r->start && !r->end) {

    r->end can't be 0.

WBR, Sergei

  parent reply	other threads:[~2008-02-18 13:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-16 10:39 Linux MIPS PCI resource sanity check Michael Buesch
2008-02-16 10:49 ` Sergei Shtylyov
2008-02-16 10:55   ` Michael Buesch
2008-02-16 23:35   ` Andrew Sharp
2008-02-17 11:19     ` Michael Buesch
2008-02-18 13:55     ` Sergei Shtylyov [this message]
2008-02-19 15:30   ` Ralf Baechle
2008-02-19 15:51 ` Ralf Baechle

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=47B98E5D.2030301@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=andy.sharp@onstor.com \
    --cc=linux-mips@linux-mips.org \
    --cc=mb@bu3sch.de \
    --cc=ralf@linux-mips.org \
    /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