lkml.org 
[lkml]   [2007]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Possible issue with dangling PCI BARs
On Fri, Dec 14, 2007 at 07:51:06AM +1100, Benjamin Herrenschmidt wrote:
> If the device is behind a P2P bridge and the BIOS has set the windows of
> that bridge so tightly that there is no room to allocate the MMIO BAR,
> then a full disable/full enable would fail on a device that would
> otherwise work using only PIO.

It won't be a problem with separate io/mmio enable.

> However, I'd be curious to see that happening in practice :-)
>
> But I think it's fair enough to do an IO only / MEM only approach. I've
> seen cases where IO is just not useable because of other constraints and
> so I expect the MEM-only case to be more common, especially on non-x86.

Everybody wants MEM if it's available - it's just faster :-)
So I guess a common case will be

if (pci_enable_device_mmio(dev)) {
/* failed, fallback to IO */
if (pci_enable_device_io(dev))
return -ENODEV;
...
}

Ivan.


\
 
 \ /
  Last update: 2007-12-13 22:15    [W:0.068 / U:22.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site