From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
To: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Jason Cooper <jason@lakedaemon.net>,
Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH RESEND] PCI: mvebu - Support a bridge with no IO port window
Date: Tue, 15 Oct 2013 13:51:11 -0600 [thread overview]
Message-ID: <20131015195111.GB30106@obsidianresearch.com> (raw)
In-Reply-To: <20131003140648.52734cfc@skate>
On Thu, Oct 03, 2013 at 02:06:48PM +0200, Thomas Petazzoni wrote:
> Dear Jason Gunthorpe,
>
> On Tue, 1 Oct 2013 11:58:01 -0600, Jason Gunthorpe wrote:
> > Make pcie-io-aperture and the IO port MBUS ID in ranges optional.
> > If not provided the bridge reports to Linux that IO space mapping is
> > not supported and refuses to configure an IO mbus window.
> >
> > This allows both complete disable (do not specify pcie-io-aperture) and
> > per-port disable (do not specify a IO target ranges entry for the port)
> >
> > Most PCIE devices these days do not require IO support to function,
> > so having an option to disable it in the driver is useful.
> >
> > This depends on 'bus: mvebu-mbus: Fix optional pcie-mem/io-aperture properties'
> > to work properly.
>
> This doesn't work here, I get multiple warnings "Attempt to set IO when
> IO is disabled" :
Okay, I looked into this.
The warnings are caused by the bogus mvebu_has_ioport you noted,
and this is also required:
/* Are the new iobase/iolimit values invalid? */
- if (port->bridge.iolimit < port->bridge.iobase ||
+ if (port->bridge.iolimit <= port->bridge.iobase ||
port->bridge.iolimitupper < port->bridge.iobaseupper) {
> > case PCI_IO_BASE:
> > - *value = (bridge->secondary_status << 16 |
> > - bridge->iolimit << 8 |
> > - bridge->iobase);
> > + if (!mvebu_has_ioport(port))
> > + *value = 0;
> > + else
> > + *value = (bridge->secondary_status << 16 |
> > + bridge->iolimit << 8 |
> > + bridge->iobase);
>
> While I do understand that you're returning 0 for iolimit and iobase,
> I'm not sure why the secondary status is affected by the value of
> mvebu_has_ioport().
This is an error, of sorts. 0 is actually the correct value for
secondary status with the current capabilities of the driver.. I'll
fix it here as you noted and send a patch to fix that up separately.
New patches in a sec..
Thanks,
Jason
next prev parent reply other threads:[~2013-10-15 19:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-01 17:58 [PATCH RESEND] PCI: mvebu: Dynamically detect if the PEX link is up to enable hot plug Jason Gunthorpe
2013-10-01 17:58 ` [PATCH RESEND] PCI: mvebu - Support a bridge with no IO port window Jason Gunthorpe
2013-10-03 12:06 ` Thomas Petazzoni
2013-10-15 19:51 ` Jason Gunthorpe [this message]
2013-10-03 12:44 ` [PATCH RESEND] PCI: mvebu: Dynamically detect if the PEX link is up to enable hot plug Thomas Petazzoni
2013-10-07 22:28 ` Bjorn Helgaas
2013-10-07 22:40 ` Jason Gunthorpe
2013-10-07 22:51 ` Bjorn Helgaas
2013-10-08 7:32 ` Thomas Petazzoni
2013-10-08 11:57 ` Jason Cooper
2013-10-08 16:54 ` Jason Cooper
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=20131015195111.GB30106@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch.com \
--cc=ezequiel.garcia@free-electrons.com \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=thomas.petazzoni@free-electrons.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;
as well as URLs for NNTP newsgroup(s).