All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Grant Grundler <grundler@parisc-linux.org>
Cc: Alexander Beregalov <a.beregalov@gmail.com>,
	linux-parisc@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.31-rc1: parisc: multiple PCI BAR collisions
Date: Fri, 26 Jun 2009 11:44:18 -0600	[thread overview]
Message-ID: <20090626174418.GX19977@parisc-linux.org> (raw)
In-Reply-To: <20090626170304.GA20871@lackof.org>

On Fri, Jun 26, 2009 at 11:03:04AM -0600, Grant Grundler wrote:
> On Fri, Jun 26, 2009 at 12:58:22PM +0400, Alexander Beregalov wrote:
> > Hi
> > 
> > Hardware is HP j6000.
> > It cannot initialize many PCI devices (sym53c8xx, tulip, STI,
> > usb(onci)) and cannot boot (no root device).
> > Messages like this:
> > sym53c8xx 0:0:0f.0: device not available because of BAR 1 [0xf4005000
> > - 0xf40053ff] collisions.
> 
> I'm pretty sure this is a problem of the root bus resources not getting
> setup correctly. I'm not clear on what's wrong. jejb and willy are looking
> at it now as well.

This patch fixes it for me.

----

Fix PCI resource allocation on non-PAT SBA machines

We weren't marking the resources as memory resources, so they weren't
being found by pci_claim_resource().

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Reviewed-by: Grant Grundler <grundler@parisc-linux.org>

diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c
index d46dd57..123d8fe 100644
--- a/drivers/parisc/sba_iommu.c
+++ b/drivers/parisc/sba_iommu.c
@@ -2057,6 +2057,7 @@ void sba_directed_lmmio(struct parisc_device *pci_hba, struct resource *r)
 		r->start = (base & ~1UL) | PCI_F_EXTEND;
 		size = ~ READ_REG32(reg + LMMIO_DIRECT0_MASK);
 		r->end = r->start + size;
+		r->flags = IORESOURCE_MEM;
 	}
 }
 
@@ -2093,4 +2094,5 @@ void sba_distributed_lmmio(struct parisc_device *pci_hba, struct resource *r )
 	size = (~READ_REG32(sba->sba_hpa + LMMIO_DIST_MASK)) / ROPES_PER_IOC;
 	r->start += rope * (size + 1);	/* adjust base for this rope */
 	r->end = r->start + size;
+	r->flags = IORESOURCE_MEM;
 }

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

  reply	other threads:[~2009-06-26 17:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-26  8:58 2.6.31-rc1: parisc: multiple PCI BAR collisions Alexander Beregalov
2009-06-26 14:37 ` James Bottomley
2009-06-26 15:08   ` Jeroen Roovers
2009-06-26 16:02     ` James Bottomley
2009-06-26 17:03 ` Grant Grundler
2009-06-26 17:44   ` Matthew Wilcox [this message]
2009-06-26 20:16     ` Kyle McMartin

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=20090626174418.GX19977@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=a.beregalov@gmail.com \
    --cc=grundler@parisc-linux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.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 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.