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

On Sunday 17 February 2008 00:35:30 Andrew Sharp wrote:
> 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
> to change this for a system as well.  I changed it to
> 
> if (!r->start && !r->end) {
> 
> because I couldn't see anything in the code that made r->start == 0 an
> improper thing.  Not to mention I couldn't access the device any other
> way.  Both being 0 is definitelty bogus.

I think what's happening for me is the following:
I have a PCI bridge and behind that bridge is one device.
This has a fixed location and fixed size memory window (hardwired).

register_pci_controller() requires me to pass some io_resource
and mem_resource in the controller struct. So I pass the memory window
which is assigned to the controller and the devices behind it.
Later I fixup the bases and sizes for each resource in the
pcibios_plat_dev_init() routine.

So, well. I still don't know where the mips PCI subsystem would
detect this resource conflict and what that means to me.
If I simply rip out the check everything works fine, as I fixup
the addresses and sizes later anyway. (I fixup more stuff like the
IRQ routing an so on, too).

The code is in drivers/ssb/driver_pcicore.c

-- 
Greetings Michael.

  reply	other threads:[~2008-02-17 11:20 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 [this message]
2008-02-18 13:55     ` Sergei Shtylyov
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=200802171219.42251.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=andy.sharp@onstor.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=sshtylyov@ru.mvista.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