Skip to content

Commit 08da742

Browse files
committed
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 5136b2d ("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"
2 parents 653bc77 + d8e7d53 commit 08da742

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

drivers/pci/host/pci-imx6.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,15 +275,22 @@ static int imx6_pcie_deassert_core_reset(struct pcie_port *pp)
275275
goto err_pcie;
276276
}
277277

278-
/* allow the clocks to stabilize */
279-
usleep_range(200, 500);
280-
281278
/* power up core phy and enable ref clock */
282279
regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1,
283280
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);
284288
regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1,
285289
IMX6Q_GPR1_PCIE_REF_CLK_EN, 1 << 16);
286290

291+
/* allow the clocks to stabilize */
292+
usleep_range(200, 500);
293+
287294
/* Some boards don't have PCIe reset GPIO. */
288295
if (gpio_is_valid(imx6_pcie->reset_gpio)) {
289296
gpio_set_value(imx6_pcie->reset_gpio, 0);

drivers/pci/hotplug/pciehp_core.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,6 @@ static int pciehp_probe(struct pcie_device *dev)
262262
goto err_out_none;
263263
}
264264

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-
272265
ctrl = pcie_init(dev);
273266
if (!ctrl) {
274267
dev_err(&dev->device, "Controller initialization failed\n");

drivers/pci/pci-sysfs.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
185185
}
186186
static DEVICE_ATTR_RO(modalias);
187187

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,
189189
const char *buf, size_t count)
190190
{
191191
struct pci_dev *pdev = to_pci_dev(dev);
@@ -210,15 +210,15 @@ static ssize_t enabled_store(struct device *dev, struct device_attribute *attr,
210210
return result < 0 ? result : count;
211211
}
212212

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,
214214
char *buf)
215215
{
216216
struct pci_dev *pdev;
217217

218218
pdev = to_pci_dev(dev);
219219
return sprintf(buf, "%u\n", atomic_read(&pdev->enable_cnt));
220220
}
221-
static DEVICE_ATTR_RW(enabled);
221+
static DEVICE_ATTR_RW(enable);
222222

223223
#ifdef CONFIG_NUMA
224224
static ssize_t numa_node_show(struct device *dev, struct device_attribute *attr,
@@ -563,7 +563,7 @@ static struct attribute *pci_dev_attrs[] = {
563563
#endif
564564
&dev_attr_dma_mask_bits.attr,
565565
&dev_attr_consistent_dma_mask_bits.attr,
566-
&dev_attr_enabled.attr,
566+
&dev_attr_enable.attr,
567567
&dev_attr_broken_parity_status.attr,
568568
&dev_attr_msi_bus.attr,
569569
#if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI)

0 commit comments

Comments
 (0)