From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] PCI: mvebu - Support a bridge with no IO port window
Date: Thu, 31 Oct 2013 10:48:10 -0600 [thread overview]
Message-ID: <20131031164810.GA26426@obsidianresearch.com> (raw)
In-Reply-To: <20131031101357.5a56e2d0@skate>
On Thu, Oct 31, 2013 at 10:13:57AM +0100, Thomas Petazzoni wrote:
> Sorry for the delay in testing this, I was busy with kernel summit /
> ELCE. Unfortunately, this patch still causes problems here: it breaks
> usage of I/O region. I have a modified version of the e1000e driver
> that makes it access an I/O region, that I have used for testing that
> I/O handling is at least minimally working. Without your patch, it
> works fine:
No problem, thank you for testing it, I don't have any hardware like
this..
> After debugging, it turns out that the following change is the problem:
>
> - if (port->bridge.iolimit < port->bridge.iobase ||
> + if (port->bridge.iolimit <= port->bridge.iobase ||
Indeed.. I was having problems here because linux was writing 0,0
during discovery to the base,limit registers to 'disable' the IO
window, which triggered a window allocation. So I re-read the PCI
bridge spec (apparently too quickly) and decided 0,0 was OK, and it
should be <=.
However, looking again@the spec - it is very clear, < is the
correct test, and when the values is equal a 4k window should be
created.
So, I wonder if there is a little bug in the Linux discovery code
path, should it write FFFF,0 instead?
In any event, I can respin this patch so it works, I have to drop the
WARN_ON in that routine to accommodate the 0,0 write however.
> window is never created and the pci_ioremap_io() function is never
> called. Reverting this change makes your patch works fine for me.
Great, the next version should be good to go then.
Thanks,
Jason
next prev parent reply other threads:[~2013-10-31 16:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-15 20:16 [PATCH v2] PCI: mvebu - Support a bridge with no IO port window Jason Gunthorpe
2013-10-17 13:10 ` Jason Cooper
2013-10-17 14:41 ` Jason Gunthorpe
2013-10-17 14:47 ` Jason Cooper
2013-10-31 9:13 ` Thomas Petazzoni
2013-10-31 16:48 ` Jason Gunthorpe [this message]
2013-10-31 17:10 ` Bjorn Helgaas
2013-10-31 23:32 ` Jason Gunthorpe
2013-11-01 2:44 ` Bjorn Helgaas
2013-11-01 5:28 ` Jason Gunthorpe
2013-11-01 13:50 ` Bjorn Helgaas
2013-11-01 16:56 ` Jason Gunthorpe
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=20131031164810.GA26426@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).