Re: Memory BARs for sfc devices unmapped in 3.0-rc1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2011-05-31 at 21:25 -0600, Bjorn Helgaas wrote:
> On Tue, May 31, 2011 at 6:51 PM, Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
[...]
> > solution would be
> > make SRIOV register BAR to be in good to have list
> 
> I don't think that's the right solution.  Here's the path leading to
> 0c:00.0 and .1:
> 
> pci_root PNP0A08:00: host bridge window [mem 0xe4000000-0xef4fffff]
> pci 0000:00:08.0: PCI bridge to [bus 0c-0c]
> pci 0000:00:08.0:   bridge window [mem 0xec000000-0xeeffffff] (48MB)
> pci 0000:0c:00.0: reg 18: [mem 0xed000000-0xedffffff 64bit] (16MB)
> pci 0000:0c:00.0: reg 20: [mem 0xecfe0000-0xecfeffff 64bit] (64KB)
> pci 0000:0c:00.0: reg 30: [mem 0xec000000-0xec01ffff pref] (128KB)
> pci 0000:0c:00.0: reg 184: [mem 0x00000000-0x00001fff 64bit] (8KB)
> pci 0000:0c:00.0: reg 18c: [mem 0x00000000-0x0000ffff 64bit] (64KB)
> pci 0000:0c:00.1: reg 18: [mem 0xee000000-0xeeffffff 64bit]
> pci 0000:0c:00.1: reg 20: [mem 0xecff0000-0xecffffff 64bit]
> pci 0000:0c:00.1: reg 30: [mem 0xec000000-0xec01ffff pref]
> pci 0000:0c:00.1: reg 184: [mem 0x00000000-0x00001fff 64bit]
> pci 0000:0c:00.1: reg 18c: [mem 0x00000000-0x0000ffff 64bit]
> 
> Each function needs 16MB + 264KB.  Both functions together will easily
> fit in the 48MB bridge window, even if we allocate separate ROM space
> and all the SR-IOV BARs.
> 
> But we're doing something wrong when assigning the second SR-IOV BAR:
> 
> pci 0000:0c:00.0: BAR 9: assigned [mem 0xec040000-0xec82ffff 64bit]
> 
> This has a size of 0x7f0000 when it should only be 0x10000 (64KB).  I
> don't think 0x7f0000 is even a legal size for a PCI BAR; it should be
> a power of two.

I would guess this is because we advertise support for up to 127 VFs per
PF.  (Which is the correct number when SR-IOV functionality is actually
enabled in the firmware.)

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux