Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'pci/misc' into next

* pci/misc:
PCI: pciehp: Drop suspend/resume ENTRY messages
PCI: Document MPS parameters pci=pcie_bus_safe, pci=pcie_bus_perf, etc
PCI: Document hpiosize= and hpmemsize= resource reservation parameters
PCI: Use PCI Express Capability accessor
PCI: Introduce accessor to retrieve PCIe Capabilities Register
PCI: Kill pci_is_reassigndev()

+37 -20
+21
Documentation/kernel-parameters.txt
··· 2227 2227 This sorting is done to get a device 2228 2228 order compatible with older (<= 2.4) kernels. 2229 2229 nobfsort Don't sort PCI devices into breadth-first order. 2230 + pcie_bus_tune_off Disable PCIe MPS (Max Payload Size) 2231 + tuning and use the BIOS-configured MPS defaults. 2232 + pcie_bus_safe Set every device's MPS to the largest value 2233 + supported by all devices below the root complex. 2234 + pcie_bus_perf Set device MPS to the largest allowable MPS 2235 + based on its parent bus. Also set MRRS (Max 2236 + Read Request Size) to the largest supported 2237 + value (no larger than the MPS that the device 2238 + or bus can support) for best performance. 2239 + pcie_bus_peer2peer Set every device's MPS to 128B, which 2240 + every device is guaranteed to support. This 2241 + configuration allows peer-to-peer DMA between 2242 + any pair of devices, possibly at the cost of 2243 + reduced performance. This also guarantees 2244 + that hot-added devices will work. 2230 2245 cbiosize=nn[KMG] The fixed amount of bus space which is 2231 2246 reserved for the CardBus bridge's IO window. 2232 2247 The default value is 256 bytes. ··· 2263 2248 the default. 2264 2249 off: Turn ECRC off 2265 2250 on: Turn ECRC on. 2251 + hpiosize=nn[KMG] The fixed amount of bus space which is 2252 + reserved for hotplug bridge's IO window. 2253 + Default size is 256 bytes. 2254 + hpmemsize=nn[KMG] The fixed amount of bus space which is 2255 + reserved for hotplug bridge's memory window. 2256 + Default size is 2 megabytes. 2266 2257 realloc= Enable/disable reallocating PCI bridge resources 2267 2258 if allocations done by BIOS are too small to 2268 2259 accommodate resources required by all child
+2 -2
drivers/pci/access.c
··· 472 472 473 473 static inline int pcie_cap_version(const struct pci_dev *dev) 474 474 { 475 - return dev->pcie_flags_reg & PCI_EXP_FLAGS_VERS; 475 + return pcie_caps_reg(dev) & PCI_EXP_FLAGS_VERS; 476 476 } 477 477 478 478 static inline bool pcie_cap_has_devctl(const struct pci_dev *dev) ··· 497 497 return pcie_cap_version(dev) > 1 || 498 498 type == PCI_EXP_TYPE_ROOT_PORT || 499 499 (type == PCI_EXP_TYPE_DOWNSTREAM && 500 - dev->pcie_flags_reg & PCI_EXP_FLAGS_SLOT); 500 + pcie_caps_reg(dev) & PCI_EXP_FLAGS_SLOT); 501 501 } 502 502 503 503 static inline bool pcie_cap_has_rtctl(const struct pci_dev *dev)
-2
drivers/pci/hotplug/pciehp_core.c
··· 294 294 #ifdef CONFIG_PM 295 295 static int pciehp_suspend (struct pcie_device *dev) 296 296 { 297 - dev_info(&dev->device, "%s ENTRY\n", __func__); 298 297 return 0; 299 298 } 300 299 ··· 303 304 struct slot *slot; 304 305 u8 status; 305 306 306 - dev_info(&dev->device, "%s ENTRY\n", __func__); 307 307 ctrl = get_service_data(dev); 308 308 309 309 /* reinitialize the chipset's event detection logic */
+3 -14
drivers/pci/pci.c
··· 3748 3748 return align; 3749 3749 } 3750 3750 3751 - /** 3752 - * pci_is_reassigndev - check if specified PCI is target device to reassign 3753 - * @dev: the PCI device to check 3754 - * 3755 - * RETURNS: non-zero for PCI device is a target device to reassign, 3756 - * or zero is not. 3757 - */ 3758 - int pci_is_reassigndev(struct pci_dev *dev) 3759 - { 3760 - return (pci_specified_resource_alignment(dev) != 0); 3761 - } 3762 - 3763 3751 /* 3764 3752 * This function disables memory decoding and releases memory resources 3765 3753 * of the device specified by kernel's boot parameter 'pci=resource_alignment='. ··· 3762 3774 resource_size_t align, size; 3763 3775 u16 command; 3764 3776 3765 - if (!pci_is_reassigndev(dev)) 3777 + /* check if specified PCI is target device to reassign */ 3778 + align = pci_specified_resource_alignment(dev); 3779 + if (!align) 3766 3780 return; 3767 3781 3768 3782 if (dev->hdr_type == PCI_HEADER_TYPE_NORMAL && ··· 3780 3790 command &= ~PCI_COMMAND_MEMORY; 3781 3791 pci_write_config_word(dev, PCI_COMMAND, command); 3782 3792 3783 - align = pci_specified_resource_alignment(dev); 3784 3793 for (i = 0; i < PCI_BRIDGE_RESOURCES; i++) { 3785 3794 r = &dev->resource[i]; 3786 3795 if (!(r->flags & IORESOURCE_MEM))
+1 -1
drivers/pci/pcie/portdrv_core.c
··· 272 272 273 273 /* Hot-Plug Capable */ 274 274 if ((cap_mask & PCIE_PORT_SERVICE_HP) && 275 - dev->pcie_flags_reg & PCI_EXP_FLAGS_SLOT) { 275 + pcie_caps_reg(dev) & PCI_EXP_FLAGS_SLOT) { 276 276 pcie_capability_read_dword(dev, PCI_EXP_SLTCAP, &reg32); 277 277 if (reg32 & PCI_EXP_SLTCAP_HPC) { 278 278 services |= PCIE_PORT_SERVICE_HP;
+10 -1
include/linux/pci.h
··· 1697 1697 } 1698 1698 1699 1699 /** 1700 + * pcie_caps_reg - get the PCIe Capabilities Register 1701 + * @dev: PCI device 1702 + */ 1703 + static inline u16 pcie_caps_reg(const struct pci_dev *dev) 1704 + { 1705 + return dev->pcie_flags_reg; 1706 + } 1707 + 1708 + /** 1700 1709 * pci_pcie_type - get the PCIe device/port type 1701 1710 * @dev: PCI device 1702 1711 */ 1703 1712 static inline int pci_pcie_type(const struct pci_dev *dev) 1704 1713 { 1705 - return (dev->pcie_flags_reg & PCI_EXP_FLAGS_TYPE) >> 4; 1714 + return (pcie_caps_reg(dev) & PCI_EXP_FLAGS_TYPE) >> 4; 1706 1715 } 1707 1716 1708 1717 void pci_request_acs(void);