From: Arnd Bergmann <arnd@arndb.de>
To: Srikanth Thokala <sthokal@xilinx.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
will.deacon@arm.com, michals@xilinx.com,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH] PCI: Generic Configuration Access Mechanism support
Date: Wed, 21 May 2014 09:52:57 +0200 [thread overview]
Message-ID: <4459842.TR2Vcq3XUx@wuerfel> (raw)
In-Reply-To: <CA+mB=1KsxjJR0Yswmo2y_Gej64OPZLddXxJ+qn8YOx7=_EsqeA@mail.gmail.com>
On Tuesday 20 May 2014 20:01:01 Srikanth Thokala wrote:
> On Mon, May 19, 2014 at 10:33 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Sunday 18 May 2014 19:38:45 Srikanth Thokala wrote:
> >> +
> >> + if (cfg->ops->is_valid_cfg_access) {
> >> + if (!cfg->ops->is_valid_cfg_access(bus, devfn)) {
> >> + *val = PCI_CFG_INVALID_DEVFN;
> >> + return PCIBIOS_DEVICE_NOT_FOUND;
> >> + }
> >> + }
> >
> > Can you explain why this callback is needed? If the space for the
> > bus is mapped, any access should just work.
>
> As I was explaining to Will, there are some controllers which doesn't
> return FF's
> when a device is not found on the bus (as per the PCI specification) and
> accessing such a device address from the kernel results in an external abort.
> So, I added this additional logic in my driver to bypass this and
> return FF's. Our IP
> and even other controllers like Tegra, Renesas have similar implementation.
> We cant think of a better solution and please let you us know if you
> have any inputs.
Does your hardware need this? My first response would otherwise be to
treat that as noncompliant and not handle this case in the generic implementation.
Arnd
next prev parent reply other threads:[~2014-05-21 7:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-18 14:08 [PATCH] PCI: Generic Configuration Access Mechanism support Srikanth Thokala
2014-05-19 16:32 ` Will Deacon
2014-05-19 16:59 ` Arnd Bergmann
2014-05-19 17:03 ` Arnd Bergmann
2014-05-20 14:31 ` Srikanth Thokala
2014-05-21 7:52 ` Arnd Bergmann [this message]
2014-05-21 8:54 ` Srikanth Thokala
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=4459842.TR2Vcq3XUx@wuerfel \
--to=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=michals@xilinx.com \
--cc=sthokal@xilinx.com \
--cc=will.deacon@arm.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