diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/Kconfig | 12 | ||||
-rw-r--r-- | drivers/pci/ats.c | 1 | ||||
-rw-r--r-- | drivers/pci/hotplug-pci.c | 1 | ||||
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 29 | ||||
-rw-r--r-- | drivers/pci/hotplug/pciehp_acpi.c | 1 | ||||
-rw-r--r-- | drivers/pci/hotplug/pciehp_ctrl.c | 3 | ||||
-rw-r--r-- | drivers/pci/hotplug/pciehp_hpc.c | 27 | ||||
-rw-r--r-- | drivers/pci/hotplug/pcihp_slot.c | 1 | ||||
-rw-r--r-- | drivers/pci/hotplug/rpadlpar_core.c | 1 | ||||
-rw-r--r-- | drivers/pci/hotplug/shpchp_core.c | 4 | ||||
-rw-r--r-- | drivers/pci/hotplug/shpchp_hpc.c | 4 | ||||
-rw-r--r-- | drivers/pci/htirq.c | 1 | ||||
-rw-r--r-- | drivers/pci/ioapic.c | 1 | ||||
-rw-r--r-- | drivers/pci/iov.c | 1 | ||||
-rw-r--r-- | drivers/pci/irq.c | 1 | ||||
-rw-r--r-- | drivers/pci/msi.c | 1 | ||||
-rw-r--r-- | drivers/pci/pci-sysfs.c | 1 | ||||
-rw-r--r-- | drivers/pci/quirks.c | 1 | ||||
-rw-r--r-- | drivers/pci/rom.c | 1 | ||||
-rw-r--r-- | drivers/pci/setup-res.c | 1 | ||||
-rw-r--r-- | drivers/pci/slot.c | 1 | ||||
-rw-r--r-- | drivers/pci/vpd.c | 1 |
22 files changed, 63 insertions, 32 deletions
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index cec66064ee4..f02b5235056 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -51,17 +51,6 @@ config XEN_PCIDEV_FRONTEND The PCI device frontend driver allows the kernel to import arbitrary PCI devices from a PCI backend to support PCI driver domains. -config XEN_PCIDEV_FE_DEBUG - bool "Xen PCI Frontend debugging" - depends on XEN_PCIDEV_FRONTEND && PCI_DEBUG - help - Say Y here if you want the Xen PCI frontend to produce a bunch of debug - messages to the system log. Select this if you are having a - problem with Xen PCI frontend support and want to see more of what is - going on. - - When in doubt, say N. - config HT_IRQ bool "Interrupts on hypertransport devices" default y @@ -87,6 +76,7 @@ config PCI_IOV config PCI_PRI bool "PCI PRI support" + depends on PCI select PCI_ATS help PRI is the PCI Page Request Interface. It allows PCI devices that are diff --git a/drivers/pci/ats.c b/drivers/pci/ats.c index f727a09eb72..7ec56fb0bd7 100644 --- a/drivers/pci/ats.c +++ b/drivers/pci/ats.c @@ -10,6 +10,7 @@ * PASID support added by Joerg Roedel <joerg.roedel@amd.com> */ +#include <linux/export.h> #include <linux/pci-ats.h> #include <linux/pci.h> diff --git a/drivers/pci/hotplug-pci.c b/drivers/pci/hotplug-pci.c index 4d4a6447840..d3509cdeb55 100644 --- a/drivers/pci/hotplug-pci.c +++ b/drivers/pci/hotplug-pci.c @@ -1,6 +1,7 @@ /* Core PCI functionality used only by PCI hotplug */ #include <linux/pci.h> +#include <linux/export.h> #include "pci.h" diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 596172b4ae9..fce1c54a0c8 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c @@ -459,8 +459,17 @@ static int add_bridge(acpi_handle handle) { acpi_status status; unsigned long long tmp; + struct acpi_pci_root *root; acpi_handle dummy_handle; + /* + * We shouldn't use this bridge if PCIe native hotplug control has been + * granted by the BIOS for it. + */ + root = acpi_pci_find_root(handle); + if (root && (root->osc_control_set & OSC_PCI_EXPRESS_NATIVE_HP_CONTROL)) + return -ENODEV; + /* if the bridge doesn't have _STA, we assume it is always there */ status = acpi_get_handle(handle, "_STA", &dummy_handle); if (ACPI_SUCCESS(status)) { @@ -1376,13 +1385,23 @@ static void handle_hotplug_event_func(acpi_handle handle, u32 type, static acpi_status find_root_bridges(acpi_handle handle, u32 lvl, void *context, void **rv) { + struct acpi_pci_root *root; int *count = (int *)context; - if (acpi_is_root_bridge(handle)) { - acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, - handle_hotplug_event_bridge, NULL); - (*count)++; - } + if (!acpi_is_root_bridge(handle)) + return AE_OK; + + root = acpi_pci_find_root(handle); + if (!root) + return AE_OK; + + if (root->osc_control_set & OSC_PCI_EXPRESS_NATIVE_HP_CONTROL) + return AE_OK; + + (*count)++; + acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, + handle_hotplug_event_bridge, NULL); + return AE_OK ; } diff --git a/drivers/pci/hotplug/pciehp_acpi.c b/drivers/pci/hotplug/pciehp_acpi.c index 5f7226223a6..376d70d1717 100644 --- a/drivers/pci/hotplug/pciehp_acpi.c +++ b/drivers/pci/hotplug/pciehp_acpi.c @@ -27,6 +27,7 @@ #include <linux/pci.h> #include <linux/pci_hotplug.h> #include <linux/slab.h> +#include <linux/module.h> #include "pciehp.h" #define PCIEHP_DETECT_PCIE (0) diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c index 1e9c9aacc3a..085dbb5fc16 100644 --- a/drivers/pci/hotplug/pciehp_ctrl.c +++ b/drivers/pci/hotplug/pciehp_ctrl.c @@ -213,9 +213,6 @@ static int board_added(struct slot *p_slot) goto err_exit; } - /* Wait for 1 second after checking link training status */ - msleep(1000); - /* Check for a power fault */ if (ctrl->power_fault_detected || pciehp_query_power_fault(p_slot)) { ctrl_err(ctrl, "Power fault on slot %s\n", slot_name(p_slot)); diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 96dc4734e4a..7b1414810ae 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -280,6 +280,14 @@ int pciehp_check_link_status(struct controller *ctrl) else msleep(1000); + /* + * Need to wait for 1000 ms after Data Link Layer Link Active + * (DLLLA) bit reads 1b before sending configuration request. + * We need it before checking Link Training (LT) bit becuase + * LT is still set even after DLLLA bit is set on some platform. + */ + msleep(1000); + retval = pciehp_readw(ctrl, PCI_EXP_LNKSTA, &lnk_status); if (retval) { ctrl_err(ctrl, "Cannot read LNKSTATUS register\n"); @@ -294,6 +302,16 @@ int pciehp_check_link_status(struct controller *ctrl) return retval; } + /* + * If the port supports Link speeds greater than 5.0 GT/s, we + * must wait for 100 ms after Link training completes before + * sending configuration request. + */ + if (ctrl->pcie->port->subordinate->max_bus_speed > PCIE_SPEED_5_0GT) + msleep(100); + + pcie_update_link_speed(ctrl->pcie->port->subordinate, lnk_status); + return retval; } @@ -484,7 +502,6 @@ int pciehp_power_on_slot(struct slot * slot) u16 slot_cmd; u16 cmd_mask; u16 slot_status; - u16 lnk_status; int retval = 0; /* Clear sticky power-fault bit from previous power failures */ @@ -516,14 +533,6 @@ int pciehp_power_on_slot(struct slot * slot) ctrl_dbg(ctrl, "%s: SLOTCTRL %x write cmd %x\n", __func__, pci_pcie_cap(ctrl->pcie->port) + PCI_EXP_SLTCTL, slot_cmd); - retval = pciehp_readw(ctrl, PCI_EXP_LNKSTA, &lnk_status); - if (retval) { - ctrl_err(ctrl, "%s: Cannot read LNKSTA register\n", - __func__); - return retval; - } - pcie_update_link_speed(ctrl->pcie->port->subordinate, lnk_status); - return retval; } diff --git a/drivers/pci/hotplug/pcihp_slot.c b/drivers/pci/hotplug/pcihp_slot.c index 3ffd9c1acc0..8c05a18c977 100644 --- a/drivers/pci/hotplug/pcihp_slot.c +++ b/drivers/pci/hotplug/pcihp_slot.c @@ -24,6 +24,7 @@ */ #include <linux/pci.h> +#include <linux/export.h> #include <linux/pci_hotplug.h> static struct hpp_type0 pci_default_type0 = { diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c index 1d002b1c2bf..c56a9413e1a 100644 --- a/drivers/pci/hotplug/rpadlpar_core.c +++ b/drivers/pci/hotplug/rpadlpar_core.c @@ -18,6 +18,7 @@ #undef DEBUG #include <linux/init.h> +#include <linux/module.h> #include <linux/pci.h> #include <linux/string.h> #include <linux/vmalloc.h> diff --git a/drivers/pci/hotplug/shpchp_core.c b/drivers/pci/hotplug/shpchp_core.c index aca972bbfb4..dd7e0c51a33 100644 --- a/drivers/pci/hotplug/shpchp_core.c +++ b/drivers/pci/hotplug/shpchp_core.c @@ -278,8 +278,8 @@ static int get_adapter_status (struct hotplug_slot *hotplug_slot, u8 *value) static int is_shpc_capable(struct pci_dev *dev) { - if ((dev->vendor == PCI_VENDOR_ID_AMD) || (dev->device == - PCI_DEVICE_ID_AMD_GOLAM_7450)) + if (dev->vendor == PCI_VENDOR_ID_AMD && + dev->device == PCI_DEVICE_ID_AMD_GOLAM_7450) return 1; if (!pci_find_capability(dev, PCI_CAP_ID_SHPC)) return 0; diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c index 36547f0ce30..75ba2311b54 100644 --- a/drivers/pci/hotplug/shpchp_hpc.c +++ b/drivers/pci/hotplug/shpchp_hpc.c @@ -944,8 +944,8 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev) ctrl->pci_dev = pdev; /* pci_dev of the P2P bridge */ ctrl_dbg(ctrl, "Hotplug Controller:\n"); - if ((pdev->vendor == PCI_VENDOR_ID_AMD) || (pdev->device == - PCI_DEVICE_ID_AMD_GOLAM_7450)) { + if (pdev->vendor == PCI_VENDOR_ID_AMD && + pdev->device == PCI_DEVICE_ID_AMD_GOLAM_7450) { /* amd shpc driver doesn't use Base Offset; assume 0 */ ctrl->mmio_base = pci_resource_start(pdev, 0); ctrl->mmio_size = pci_resource_len(pdev, 0); diff --git a/drivers/pci/htirq.c b/drivers/pci/htirq.c index db057b6fe0c..6e373ea57b3 100644 --- a/drivers/pci/htirq.c +++ b/drivers/pci/htirq.c @@ -9,6 +9,7 @@ #include <linux/irq.h> #include <linux/pci.h> #include <linux/spinlock.h> +#include <linux/export.h> #include <linux/slab.h> #include <linux/htirq.h> diff --git a/drivers/pci/ioapic.c b/drivers/pci/ioapic.c index 203508b227b..5775638ac01 100644 --- a/drivers/pci/ioapic.c +++ b/drivers/pci/ioapic.c @@ -17,6 +17,7 @@ */ #include <linux/pci.h> +#include <linux/export.h> #include <linux/acpi.h> #include <linux/slab.h> #include <acpi/acpi_bus.h> diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index 9b4e88c636f..b82c155d7b3 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c @@ -11,6 +11,7 @@ #include <linux/pci.h> #include <linux/slab.h> #include <linux/mutex.h> +#include <linux/export.h> #include <linux/string.h> #include <linux/delay.h> #include <linux/pci-ats.h> diff --git a/drivers/pci/irq.c b/drivers/pci/irq.c index de01174aff0..e5f69a43b1b 100644 --- a/drivers/pci/irq.c +++ b/drivers/pci/irq.c @@ -7,6 +7,7 @@ #include <linux/acpi.h> #include <linux/device.h> #include <linux/kernel.h> +#include <linux/export.h> #include <linux/pci.h> static void pci_note_irq_problem(struct pci_dev *pdev, const char *reason) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 2f10328bf66..0e6d04d7ba4 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -11,6 +11,7 @@ #include <linux/irq.h> #include <linux/interrupt.h> #include <linux/init.h> +#include <linux/export.h> #include <linux/ioport.h> #include <linux/pci.h> #include <linux/proc_fs.h> diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 7bcf12adced..106be0d08f8 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -19,6 +19,7 @@ #include <linux/sched.h> #include <linux/pci.h> #include <linux/stat.h> +#include <linux/export.h> #include <linux/topology.h> #include <linux/mm.h> #include <linux/fs.h> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 7285145ac1c..64765474676 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -17,6 +17,7 @@ #include <linux/types.h> #include <linux/kernel.h> +#include <linux/export.h> #include <linux/pci.h> #include <linux/init.h> #include <linux/delay.h> diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c index 36864a935d6..48ebdb237f3 100644 --- a/drivers/pci/rom.c +++ b/drivers/pci/rom.c @@ -7,6 +7,7 @@ * PCI ROM access routines */ #include <linux/kernel.h> +#include <linux/export.h> #include <linux/pci.h> #include <linux/slab.h> diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index 51a9095c7da..5717509becb 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c @@ -18,6 +18,7 @@ #include <linux/init.h> #include <linux/kernel.h> +#include <linux/export.h> #include <linux/pci.h> #include <linux/errno.h> #include <linux/ioport.h> diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c index 968cfea04f7..ac6412fb8d6 100644 --- a/drivers/pci/slot.c +++ b/drivers/pci/slot.c @@ -7,6 +7,7 @@ #include <linux/kobject.h> #include <linux/slab.h> +#include <linux/module.h> #include <linux/pci.h> #include <linux/err.h> #include "pci.h" diff --git a/drivers/pci/vpd.c b/drivers/pci/vpd.c index a5a5ca17cfe..39b79070335 100644 --- a/drivers/pci/vpd.c +++ b/drivers/pci/vpd.c @@ -6,6 +6,7 @@ */ #include <linux/pci.h> +#include <linux/export.h> int pci_vpd_find_tag(const u8 *buf, unsigned int off, unsigned int len, u8 rdt) { |