Displaying 1 result from an estimated 1 matches for "pci_base_address_mem_type_32".
2009 Apr 03
0
[PATCH] PCI: sync up the SR-IOV changes between Dom0 and upstream kernels
...u32 bar, start, size;
if (PAGE_SIZE > 0x10000)
return;
- if (pci_read_config_dword(dev, 0x184, &bar))
+ flags = pci_resource_flags(dev, 0);
+ if ((flags & PCI_BASE_ADDRESS_SPACE) !=
+ PCI_BASE_ADDRESS_SPACE_MEMORY ||
+ (flags & PCI_BASE_ADDRESS_MEM_TYPE_MASK) !=
+ PCI_BASE_ADDRESS_MEM_TYPE_32)
return;
+ pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_SRIOV);
+ if (!pos)
+ return;
+
+ pci_read_config_dword(dev, pos + PCI_SRIOV_BAR, &bar);
if (bar & PCI_BASE_ADDRESS_MEM_MASK)
return;
- i = 1;
- flags = pci_resource_flags(dev, i);
- if ((flags & PCI_BASE_ADDRESS_...