- 15 3月, 2016 2 次提交
-
-
由 Heikki Krogerus 提交于
PCI-SIG has defined Interface FEh for Base Class 0Ch, Sub-Class 03h as "USB Device (not host controller)". It is already being used in various USB device controller drivers for matching, so add PCI_CLASS_SERIAL_USB_DEVICE and use it. Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Andreas Ziegler 提交于
Clean up style issues in drivers/pci/pcie/Kconfig, in particular all indentation is now done using tabs, not spaces, and the definition of PCIEASPM_DEBUG is now separated from the definition of PCIEASPM with a newline. Signed-off-by: NAndreas Ziegler <andreas.ziegler@fau.de> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 12 3月, 2016 9 次提交
-
-
由 David Daney 提交于
The cavium,pci-thunder-ecam devices are exactly ECAM-based PCI root complexes. These root complexes (loosely referred to as ECAM units in the hardware manuals) are used to access the Thunder on-chip devices. They are special in that all the BARs on devices behind these root complexes are at fixed addresses. Add a driver for these devices that synthesizes Enhanced Allocation (EA) capability entries for each BAR. Since this EA synthesis is needed for exactly two chip models, we can hard- code some assumptions about the device topology and the layout of the config space of specific DEVFNs in the driver. [bhelgaas: changelog, whitespace] Signed-off-by: NDavid Daney <david.daney@cavium.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRob Herring <robh@kernel.org>
-
由 David Daney 提交于
The root complexes used to access off-chip PCIe devices (called PEM units in the hardware manuals) on some Cavium ThunderX processors require quirky access methods for the config space of the PCIe bridge. Add a driver to provide these config space accessor functions. Use the pci-host-common code to configure the PCI machinery. Signed-off-by: NDavid Daney <david.daney@cavium.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRob Herring <robh@kernel.org> Acked-by: NArnd Bergmann <arnd@arndb.de>
-
由 David Daney 提交于
Move pci_host_common_probe() and associated functions to pci-host-common.c, where it can be shared with other drivers. Make it public (not static) and update Kconfig and Makefile to build it. No functional change intended. [bhelgaas: split into separate patch, changelog] Signed-off-by: NDavid Daney <david.daney@cavium.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NWill Deacon <will.deacon@arm.com>
-
由 David Daney 提交于
Factor gen_pci_probe(), moving most of it into pci_host_common_probe() where it can be shared with other drivers that have slightly different config accessors. No functional change intended. [bhelgaas: split into separate patch, changelog] Signed-off-by: NDavid Daney <david.daney@cavium.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NWill Deacon <will.deacon@arm.com>
-
由 David Daney 提交于
Move definitions for generic PCI host controller driver structures to a separate header file so we can share them with other drivers. No functional change intended. [bhelgaas: split into separate patch, changelog] Signed-off-by: NDavid Daney <david.daney@cavium.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NWill Deacon <will.deacon@arm.com>
-
由 Bharat Kumar Gogada 提交于
Add PCIe Root Port driver for Xilinx PCIe NWL bridge IP. [bhelgaas: wait for link like dw_pcie_wait_for_link(), simplify bitmap error path, typos, whitespace, fold in Dan Carpenter's PTR_ERR() fix] Signed-off-by: NBharat Kumar Gogada <bharatku@xilinx.com> Signed-off-by: NRavi Kiran Gummaluri <rgummal@xilinx.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NMarc Zyngier <marc.zyngier@arm.com> Acked-by: NRob Herring <robh@kernel.org>
-
由 Shawn Lin 提交于
A SerDes PHY is optional, so if devm_phy_get() doesn't find one at all, that's fine. But if devm_phy_get() finds a PHY that doesn't have a driver yet, it returns -EPROBE_DEFER. In that case, defer probing the Keystone driver. We may be able to load it later after a PHY driver is loaded. [bhelgaas: changelog, check for -EPROBE_DEFER first] Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Ley Foon Tan 提交于
Originally altera_pcie_link_is_up() decided the link was up if any of the low four bits of the LTSSM register were set. But the link is only up if the LTSSM state is L0, so check for that exact value. [bhelgaas: changelog] Signed-off-by: NLey Foon Tan <lftan@altera.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Simon Horman 提交于
Make the R-Car drivers depend on ARCH_RENESAS instead of ARCH_SHMOBILE. This is part of an ongoing process to migrate from ARCH_SHMOBILE to ARCH_RENESAS. The motivation is that RENESAS seems to be a more appropriate name than SHMOBILE for the majority of Renesas ARM-based SoCs. Signed-off-by: NSimon Horman <horms+renesas@verge.net.au> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NGeert Uytterhoeven <geert+renesas@glider.be>
-
- 11 3月, 2016 3 次提交
-
-
由 Alex Williamson 提交于
Some devices take longer than the spec indicates to return from FLR reset, a notable case of this is Intel integrated graphics (IGD), which can often take an additional 300ms powering down an attached LCD panel as part of the FLR. Allow devices up to 1000ms, testing every 100ms whether the second dword of config space is read as -1. Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Babu Moger 提交于
On some devices, reading or writing VPD causes a system panic. This can be easily reproduced by running "lspci -vvv" or "cat /sys/bus/devices/XX../vpd". Blacklist these devices so we don't access VPD data at all. [bhelgaas: changelog, comment, drop pci/access.c changes] Link: https://bugzilla.kernel.org/show_bug.cgi?id=110681Tested-by: NShane Seymour <shane.seymour@hpe.com> Tested-by: NBabu Moger <babu.moger@oracle.com> Signed-off-by: NBabu Moger <babu.moger@oracle.com> Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Cc: Alexander Duyck <alexander.duyck@gmail.com>
-
由 Bjorn Helgaas 提交于
Use usleep_range() instead of udelay() while waiting for a VPD access to complete. This is not a performance path, so no need to hog the CPU. Rationale for usleep_range() parameters: We clear PCI_VPD_ADDR_F for a read (or set it for a write), then wait for the device to change it. For a device that updates PCI_VPD_ADDR between our config write and subsequent config read, we won't sleep at all and can get the device's maximum rate. Sleeping a minimum of 10 usec per 4-byte access limits throughput to about 400Kbytes/second. VPD is small (32K bytes at most), and most devices use only a fraction of that. We back off exponentially up to 1024 usec per iteration. If we reach 1024, we've already waited up to 1008 usec (16 + 32 + ... + 512), so if we miss an update and wait an extra 1024 usec, we can still get about 1/2 of the device's maximum rate. Tested-by: NShane Seymour <shane.seymour@hpe.com> Tested-by: NBabu Moger <babu.moger@oracle.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NHannes Reinecke <hare@suse.com>
-
- 09 3月, 2016 16 次提交
-
-
由 Robin H. Johnson 提交于
Introduce PCI_VENDOR/PCI_SUBVENDOR/PCI_SUBDEVICE defines to replace the constants scattered in the kernel already used to detect QEMU. They are defined in the QEMU codebase per docs/specs/pci-ids.txt. Signed-off-by: NRobin H. Johnson <robbat2@gentoo.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NTakashi Iwai <tiwai@suse.de> Reviewed-by: NGerd Hoffmann <kraxel@redhat.com> Acked-by: NMichael S. Tsirkin <mst@redhat.com> Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
-
由 Jean Delvare 提交于
Log successful error injections so that injected errors can be differentiated from real errors. Suggested-by: NBjorn Helgaas <bhelgaas@google.com> Signed-off-by: NJean Delvare <jdelvare@suse.de> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> CC: Borislav Petkov <bp@suse.de>
-
由 Jean Delvare 提交于
The aer_inject driver is very quiet. In most cases, it merely returns an error code to user-space, leaving the user with little clue about the actual reason for the failure. So, log error messages for 4 of the most frequent causes of failure: * Can't find the root port of the specified device. * Device doesn't support AER. * Root port doesn't support AER. * AER device not found. This gives the user a chance to understand why aer-inject failed. Based on a preliminary patch by Thomas Renninger. Signed-off-by: NJean Delvare <jdelvare@suse.de> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> CC: Borislav Petkov <bp@suse.de> CC: Thomas Renninger <trenn@suse.de>
-
由 Jean Delvare 提交于
dev_warn() is better than printk(LOG_WARNING...) as it records which device the message relates to. Also add a prefix "aer_inject:" to help differentiate real errors from injected errors. Signed-off-by: NJean Delvare <jdelvare@suse.de> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> CC: Borislav Petkov <bp@suse.de>
-
由 Jean Delvare 提交于
EPERM means "Operation not permitted", which doesn't reflect the lack of support for AER. EPROTONOSUPPORT (Protocol not supported) is a better choice of error code if the device or its root port lack support for AER. Likewise, EINVAL means "Invalid argument", which is not suitable for cases where the AER error device is missing or unusable. ENODEV and EPROTONOSUPPORT, respectively, fit better. Suggested-by: NBorislav Petkov <bp@suse.de> Signed-off-by: NJean Delvare <jdelvare@suse.de> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> CC: Borislav Petkov <bp@suse.de> CC: Prarit Bhargava <prarit@redhat.com>
-
由 Thierry Reding 提交于
BARs are disabled when the size register is 0, so it's misleading to write a base address into the start register. Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Thierry Reding 提交于
Track the offsets of the bus -> CPU mapping for I/O and memory. This is cosmetic for current Tegra chips because the offset is always 0. But to properly support legacy use-cases, like VGA, this would be needed so that PCI bus addresses can be relocated. While at it, also request the I/O resource both in physical memory and I/O space to make /proc/iomem consistent, as well as add the I/O region to the list of host bridge resources. Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Thierry Reding 提交于
The num_ports field of the tegra_pcie structure is never used so remove it. Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Thierry Reding 提交于
The configuration space mapping on Tegra is somewhat special, and in order to avoid wasting virtual address space the configuration space for each bus needs to be stitched together from several blocks which form a single continuous virtual address range for accessors. Currently the configuration space is mapped upon the first access to one of its registers. However, the mapping operation may sleep under certain circumstances, so doing it from the configuration space accessors (they are protected by a spin lock) will trigger a warning. To avoid the warning, use the ->add_bus() callback to perform the mapping at enumeration time when the operation is allowed to sleep. Also add an implementation of ->remove_bus() that undoes the mapping established by the ->add_bus() callback. While it isn't currently possible to unload the module, there is work underway to remedy this, and this code will come in handy when that happens. Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Thierry Reding 提交于
Add pci_ops.{add,remove}_bus() callbacks, which will be called on every newly created bus and when a bus is being removed, respectively. This can be used by drivers to implement driver-specific initialization and teardown of the bus, in addition to the architecture-specifics implemented by the pcibios_add_bus() and the pcibios_remove_bus() functions. Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Bjorn Helgaas 提交于
Include pci/hotplug/Kconfig directly from pci/Kconfig, so arches don't have to source both pci/Kconfig and pci/hotplug/Kconfig. Note that this effectively adds pci/hotplug/Kconfig to the following arches, because they already sourced drivers/pci/Kconfig but they previously did not source drivers/pci/hotplug/Kconfig: alpha arm avr32 frv m68k microblaze mn10300 sparc unicore32 Inspired-by-patch-from: Bogicevic Sasa <brutallesale@gmail.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Bogicevic Sasa 提交于
Include pci/pcie/Kconfig directly from pci/Kconfig, so arches don't have to source both pci/Kconfig and pci/pcie/Kconfig. Note that this effectively adds pci/pcie/Kconfig to the following arches, because they already sourced drivers/pci/Kconfig but they previously did not source drivers/pci/pcie/Kconfig: alpha avr32 blackfin frv m32r m68k microblaze mn10300 parisc sparc unicore32 xtensa [bhelgaas: changelog, source pci/pcie/Kconfig at top of pci/Kconfig, whitespace] Signed-off-by: NSasa Bogicevic <brutallesale@gmail.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Bharat Kumar Gogada 提交于
Modify the Microblaze PCI subsystem to work with the generic drivers/pci/host/pcie-xilinx.c driver on Microblaze and Zynq. [bhelgaas: changelog] Signed-off-by: NBharat Kumar Gogada <bharatku@xilinx.com> Signed-off-by: NRavi Kiran Gummaluri <rgummal@xilinx.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NMichal Simek <michal.simek@xilinx.com>
-
由 Bharat Kumar Gogada 提交于
The Xilinx AXI PCIe Host Bridge Soft IP driver was previously only supported on ARM (in particular, on ARCH_ZYNC), and pci_fixup_irqs() is available there. But Microblaze will do IRQ fixup in pcibios_add_device(), so pci_fixup_irqs() is not available on Microblaze. Don't call pci_fixup_irqs() on Microblaze, so the driver can work on both Zynq and Microblaze Architectures. [bhelgaas: revise changelog to show similarity to bdb8a184 ("PCI: iproc: Call pci_fixup_irqs() for ARM64 as well as ARM")] Signed-off-by: NBharat Kumar Gogada <bharatku@xilinx.com> Signed-off-by: NRavi Kiran Gummaluri <rgummal@xilinx.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NMichal Simek <michal.simek@xilinx.com>
-
由 Bharat Kumar Gogada 提交于
The Xilinx PCIe host controller driver uses pci_common_init_dev(), which is ARM-specific and requires the ARM struct hw_pci. The part of pci_common_init_dev() that is needed is limited and can be done here without using hw_pci. Create and scan the root bus directly without using the ARM pci_common_init_dev() interface. [bhelgaas: revise changelog to show similarity to 79953dd2 ("PCI: rcar: Remove dependency on ARM-specific struct hw_pci")] Signed-off-by: NBharat Kumar Gogada <bharatku@xilinx.com> Signed-off-by: NRavi Kiran Gummaluri <rgummal@xilinx.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NMichal Simek <michal.simek@xilinx.com>
-
由 Bharat Kumar Gogada 提交于
Use the new of_pci_get_host_bridge_resources() API in place of the PCI OF DT parser. [bhelgaas: revise changelog to show similarity to 0021d22b ("PCI: designware: Use of_pci_get_host_bridge_resources() to parse DT")] Signed-off-by: NBharat Kumar Gogada <bharatku@xilinx.com> Signed-off-by: NRavi Kiran Gummaluri <rgummal@xilinx.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NMichal Simek <michal.simek@xilinx.com>
-
- 08 3月, 2016 1 次提交
-
-
由 Bjorn Helgaas 提交于
Christoph added a generic include/linux/pci-dma-compat.h, so now there's one place with most of the PCI DMA interfaces. Move more PCI DMA-related things there: - The PCI_DMA_* direction constants from linux/pci.h - The pci_set_dma_max_seg_size() and pci_set_dma_seg_boundary() CONFIG_PCI implementations from drivers/pci/pci.c - The pci_set_dma_max_seg_size() and pci_set_dma_seg_boundary() !CONFIG_PCI stubs from linux/pci.h - The pci_set_dma_mask() and pci_set_consistent_dma_mask() !CONFIG_PCI stubs from linux/pci.h Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 01 3月, 2016 9 次提交
-
-
由 Bjorn Helgaas 提交于
We only support one flavor of VPD, so there's no need to complicate things by having a "generic" struct pci_vpd and a more specific struct pci_vpd_pci22. Fold struct pci_vpd_pci22 directly into struct pci_vpd. [bhelgaas: remove NULL check before kfree of dev->vpd (per kfreeaddr.cocci)] Tested-by: NShane Seymour <shane.seymour@hpe.com> Tested-by: NBabu Moger <babu.moger@oracle.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NHannes Reinecke <hare@suse.com>
-
由 Bjorn Helgaas 提交于
There's only one kind of VPD, so we don't need to qualify it as "the version described by PCI spec rev 2.2." Rename the following symbols to remove unnecessary "pci22": PCI_VPD_PCI22_SIZE -> PCI_VPD_MAX_SIZE pci_vpd_pci22_size() -> pci_vpd_size() pci_vpd_pci22_wait() -> pci_vpd_wait() pci_vpd_pci22_read() -> pci_vpd_read() pci_vpd_pci22_write() -> pci_vpd_write() pci_vpd_pci22_ops -> pci_vpd_ops pci_vpd_pci22_init() -> pci_vpd_init() Tested-by: NShane Seymour <shane.seymour@hpe.com> Tested-by: NBabu Moger <babu.moger@oracle.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NHannes Reinecke <hare@suse.com>
-
由 Bjorn Helgaas 提交于
The struct pci_vpd_ops.release function pointer is always pci_vpd_pci22_release(), so there's no need for the flexibility of a function pointer. Inline the pci_vpd_pci22_release() body into pci_vpd_release() and remove pci_vpd_pci22_release() and the struct pci_vpd_ops.release function pointer. Tested-by: NShane Seymour <shane.seymour@hpe.com> Tested-by: NBabu Moger <babu.moger@oracle.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NHannes Reinecke <hare@suse.com>
-
由 Bjorn Helgaas 提交于
Move pci_vpd_release() so it's next to the other VPD functions. This puts it next to pci_vpd_pci22_init(), which allocates the space freed by pci_vpd_release(). Tested-by: NShane Seymour <shane.seymour@hpe.com> Tested-by: NBabu Moger <babu.moger@oracle.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NHannes Reinecke <hare@suse.com>
-
由 Bjorn Helgaas 提交于
pci_read_vpd() and pci_write_vpd() were stranded in the middle of config accessor functions. Move them close to the other VPD code in the file. No functional change. Tested-by: NShane Seymour <shane.seymour@hpe.com> Tested-by: NBabu Moger <babu.moger@oracle.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NHannes Reinecke <hare@suse.com>
-
由 Hannes Reinecke 提交于
PCI-2.2 VPD entries have a maximum size of 32k, but might actually be smaller than that. To figure out the actual size one has to read the VPD area until the 'end marker' is reached. Per spec, reading outside of the VPD space is "not allowed." In practice, it may cause simple read errors or even crash the card. To make matters worse not every PCI card implements this properly, leaving us with no 'end' marker or even completely invalid data. Try to determine the size of the VPD data when it's first accessed. If no valid data can be read an I/O error will be returned when reading or writing the sysfs attribute. As the amount of VPD data is unknown initially the size of the sysfs attribute will always be set to '0'. [bhelgaas: changelog, use 0/1 (not false/true) for bitfield, tweak pci_vpd_pci22_read() error checking] Tested-by: NShane Seymour <shane.seymour@hpe.com> Tested-by: NBabu Moger <babu.moger@oracle.com> Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Cc: Alexander Duyck <alexander.duyck@gmail.com>
-
由 Bjorn Helgaas 提交于
Make struct pci_vpd_pci22.busy a 1-bit field instead of a bool. We intend to add another flag, and two bitfields are cheaper than two bools. Tested-by: NShane Seymour <shane.seymour@hpe.com> Tested-by: NBabu Moger <babu.moger@oracle.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NHannes Reinecke <hare@suse.com>
-
由 Hannes Reinecke 提交于
It is not always possible to determine the actual size of the VPD data, so allow access to them if the size is set to '0'. Tested-by: NShane Seymour <shane.seymour@hpe.com> Tested-by: NBabu Moger <babu.moger@oracle.com> Signed-off-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Cc: Alexander Duyck <alexander.duyck@gmail.com>
-
由 Justin Waters 提交于
The settings in GPR8 are dependent upon the particular layout of the hardware platform. As such, they should be configurable via the device tree. Look up PHY Tx driver settings from the device tree. Fall back to the original hard-coded values if they are not specified in the device tree. Signed-off-by: NJustin Waters <justin.waters@timesys.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NLucas Stach <l.stach@pengutronix.de>
-