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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pci-v3.18-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fixes from Bjorn Helgaas:
"These changes, intended for v3.18, fix:

Sysfs
- Fix "enable" filename change (Greg Kroah-Hartman)

An unintentional sysfs filename change in commit 5136b2da770d
("PCI: convert bus code to use dev_groups"), which appeared in
v3.13, changed "enable" to "enabled", and this changes it back.

Old users of "enable" are currently broken and will be helped by
this change. Anything that started to use "enabled" after v3.13
will be broken by this change. If necessary, we can add a symlink
to make both work, but this patch doesn't do that.

PCI device hotplug
- Revert duplicate merge (Kamal Mostafa)

A mistaken duplicate merge that added a check twice. Nothing's
broken; this just removes the unnecessary code.

Freescale i.MX6
- Wait for clocks to stabilize after ref_en (Richard Zhu)

An i.MX6 clock problem that prevents mx6 nitrogen boards from booting"

* tag 'pci-v3.18-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
PCI: Rename sysfs 'enabled' file back to 'enable'
PCI: imx6: Wait for clocks to stabilize after ref_en
Revert duplicate "PCI: pciehp: Prevent NULL dereference during probe"

+14 -14
+10 -3
drivers/pci/host/pci-imx6.c
··· 275 275 goto err_pcie; 276 276 } 277 277 278 - /* allow the clocks to stabilize */ 279 - usleep_range(200, 500); 280 - 281 278 /* power up core phy and enable ref clock */ 282 279 regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1, 283 280 IMX6Q_GPR1_PCIE_TEST_PD, 0 << 18); 281 + /* 282 + * the async reset input need ref clock to sync internally, 283 + * when the ref clock comes after reset, internal synced 284 + * reset time is too short, cannot meet the requirement. 285 + * add one ~10us delay here. 286 + */ 287 + udelay(10); 284 288 regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1, 285 289 IMX6Q_GPR1_PCIE_REF_CLK_EN, 1 << 16); 290 + 291 + /* allow the clocks to stabilize */ 292 + usleep_range(200, 500); 286 293 287 294 /* Some boards don't have PCIe reset GPIO. */ 288 295 if (gpio_is_valid(imx6_pcie->reset_gpio)) {
-7
drivers/pci/hotplug/pciehp_core.c
··· 262 262 goto err_out_none; 263 263 } 264 264 265 - if (!dev->port->subordinate) { 266 - /* Can happen if we run out of bus numbers during probe */ 267 - dev_err(&dev->device, 268 - "Hotplug bridge without secondary bus, ignoring\n"); 269 - goto err_out_none; 270 - } 271 - 272 265 ctrl = pcie_init(dev); 273 266 if (!ctrl) { 274 267 dev_err(&dev->device, "Controller initialization failed\n");
+4 -4
drivers/pci/pci-sysfs.c
··· 185 185 } 186 186 static DEVICE_ATTR_RO(modalias); 187 187 188 - static ssize_t enabled_store(struct device *dev, struct device_attribute *attr, 188 + static ssize_t enable_store(struct device *dev, struct device_attribute *attr, 189 189 const char *buf, size_t count) 190 190 { 191 191 struct pci_dev *pdev = to_pci_dev(dev); ··· 210 210 return result < 0 ? result : count; 211 211 } 212 212 213 - static ssize_t enabled_show(struct device *dev, struct device_attribute *attr, 213 + static ssize_t enable_show(struct device *dev, struct device_attribute *attr, 214 214 char *buf) 215 215 { 216 216 struct pci_dev *pdev; ··· 218 218 pdev = to_pci_dev(dev); 219 219 return sprintf(buf, "%u\n", atomic_read(&pdev->enable_cnt)); 220 220 } 221 - static DEVICE_ATTR_RW(enabled); 221 + static DEVICE_ATTR_RW(enable); 222 222 223 223 #ifdef CONFIG_NUMA 224 224 static ssize_t numa_node_show(struct device *dev, struct device_attribute *attr, ··· 563 563 #endif 564 564 &dev_attr_dma_mask_bits.attr, 565 565 &dev_attr_consistent_dma_mask_bits.attr, 566 - &dev_attr_enabled.attr, 566 + &dev_attr_enable.attr, 567 567 &dev_attr_broken_parity_status.attr, 568 568 &dev_attr_msi_bus.attr, 569 569 #if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI)