lkml.org 
[lkml]   [2014]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] PCI: Generic Configuration Access Mechanism support
Date
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


\
 
 \ /
  Last update: 2014-05-21 10:21    [W:0.046 / U:1.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site