- 12 3月, 2016 3 次提交
-
-
由 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>
-
- 21 1月, 2016 1 次提交
-
-
由 Tim Sander 提交于
Add function 1 DMA alias quirk for Lite-On/Plextor M6e/Marvell 88SS9183. Signed-off-by: NTim Sander <tim@krieglstein.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NAlex Williamson <alex.williamson@redhat.com>
-
- 16 1月, 2016 2 次提交
-
-
由 Simon Horman 提交于
Like the NFP6000, the NFP4000 as an erratum where reading/writing to PCI config space addresses above 0x600 can cause the NFP to generate PCIe completion timeouts. Limit the NFP4000's PF's config space size to 0x600 bytes as is already done for the NFP6000. The NFP4000's VF is 0x6004 (PCI_DEVICE_ID_NETRONOME_NFP6000_VF), the same device ID as the NFP6000's VF. Thus, its config space is already limited by the existing use of quirk_nfp6000(). Signed-off-by: NSimon Horman <simon.horman@netronome.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Keith Busch 提交于
The Intel Volume Management Device (VMD) supports 32-bit domain numbers. To accommodate this, use u32 instead of u16 to store domain numbers. [bhelgaas: changelog] Signed-off-by: NKeith Busch <keith.busch@intel.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 11 1月, 2016 5 次提交
-
-
由 Phil Edworthy 提交于
For PCIe compliance, the PHY registers need setting as per the manual. Signed-off-by: NPhil Edworthy <phil.edworthy@renesas.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
-
由 Phil Edworthy 提交于
If runtime PM is enabled in the kernel config, simply enable the clocks once during probe. Signed-off-by: NPhil Edworthy <phil.edworthy@renesas.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
-
由 Bjorn Helgaas 提交于
Drivers based on the DesignWare core can override the config read accessors by supplying rd_own_conf() and rd_other_conf() function pointers. dw_pcie_rd_conf() calls dw_pcie_rd_own_conf() (for accesses to the root bus) or dw_pcie_rd_other_conf(): dw_pcie_rd_conf dw_pcie_rd_own_conf # if on root bus dw_pcie_rd_other_conf # if not on root bus Previously we checked for rd_other_conf() directly in dw_pcie_rd_conf(), but we checked for rd_own_conf() in dw_pcie_rd_own_conf(). Check for rd_other_conf() in dw_pcie_rd_other_conf() to make this symmetric with the rd_own_conf() checking, and similarly for the write path. No functional change intended. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NPratyush Anand <pratyush.anand@gmail.com>
-
由 Julia Lawall 提交于
Remove unneeded NULL test. The index variable of list_for_each_entry is never NULL, as it is the structure that contains the list pointer. Generated by: scripts/coccinelle/iterators/itnull.cocci Signed-off-by: NFengguang Wu <fengguang.wu@intel.com> Signed-off-by: NJulia Lawall <julia.lawall@lip6.fr> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> CC: Geliang Tang <geliangtang@163.com>
-
由 Geliang Tang 提交于
Use list_for_each_entry() instead of list_for_each() to simplify the code. Signed-off-by: NGeliang Tang <geliangtang@163.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 09 1月, 2016 8 次提交
-
-
由 Phil Edworthy 提交于
The pci_sys_data struct was previously used by pci_common_init_dev() and by the ARM pcibios_align_resource(), but recent commits removed those uses: cbce7900 ("PCI: designware: Make driver arch-agnostic") b3a72384 ("ARM/PCI: Replace pci_sys_data->align_resource with global function pointer") cbce7900 removed the use of pci_common_init_dev() by DesignWare drivers, including pcie-rcar.c, and b3a72384 removed the use of struct pci_sys_data by the ARM pcibios_align_resource(). Remove struct pci_sys_data from pcie-rcar.c. [bhelgaas: changelog] Signed-off-by: NPhil Edworthy <phil.edworthy@renesas.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Gabriele Paoloni 提交于
Add support for the HiSilicon Hip06 SoC. Documentation has been updated to include Hip06. Add Gabriele Paoloni as maintainer of the driver. Signed-off-by: NGabriele Paoloni <gabriele.paoloni@huawei.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NZhou Wang <wangzhou1@hisilicon.com>
-
由 Edward O'Callaghan 提交于
If the 'image' pointer has been advanced more than 'size', we've already iterated through memory outside the resource window. We have zero control over whatever we find in the option ROM, if it's even an option ROM and not just an accident of random data just happening to look like an option ROM. Signed-off-by: NEdward O'Callaghan <eocallaghan@alterapraxis.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Colin Ian King 提交于
ibm_slot_from_id() can return null if the des header signature is not "aPCI" or if the kmalloc() for the return ACPI descriptor fails, causing potential null pointer dereferences on the return null descriptor. Handle the null case with appropriate check and error return. Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Julia Lawall 提交于
The hpc_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Geliang Tang 提交于
Use kobj_to_dev() instead of open-coding it. Signed-off-by: NGeliang Tang <geliangtang@163.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Geliang Tang 提交于
Use to_pci_dev() instead of open-coding it. Signed-off-by: NGeliang Tang <geliangtang@163.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Bogicevic Sasa 提交于
Fix all whitespace issues (missing or needed whitespace) in all files in drivers/pci. Code is compiled with allyesconfig before and after code changes and objects are recorded and checked with objdiff and they are not changed after this commit. Signed-off-by: NBogicevic Sasa <brutallesale@gmail.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 08 1月, 2016 1 次提交
-
-
由 Richard Cochran 提交于
Mark the dra7xx PCI host driver as broken. This driver was first merged in v3.17 and has never worked. Although the driver compiles just fine, it is missing an essential device reset. If the driver is included, the kernel locks up hard shortly after booting, before any console output appears. Signed-off-by: NRichard Cochran <richardcochran@gmail.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 07 1月, 2016 3 次提交
-
-
由 Ray Jui 提交于
Add PCIe MSI support for both PAXB and PAXC interfaces on all iProc-based platforms. The iProc PCIe MSI support deploys an event queue-based implementation. Each event queue is serviced by a GIC interrupt and can support up to 64 MSI vectors. Host memory is allocated for the event queues, and each event queue consists of 64 word-sized entries. MSI data is written to the lower 16-bit of each entry, whereas the upper 16-bit of the entry is reserved for the controller for internal processing. Each event queue is tracked by a head pointer and tail pointer. Head pointer indicates the next entry in the event queue to be processed by the driver and is updated by the driver after processing is done. The controller uses the tail pointer as the next MSI data insertion point. The controller ensures MSI data is flushed to host memory before updating the tail pointer and then triggering the interrupt. MSI IRQ affinity is supported by evenly distributing the interrupts to each CPU core. MSI vector is moved from one GIC interrupt to another in order to steer to the target CPU. Therefore, the actual number of supported MSI vectors is: M * 64 / N where M denotes the number of GIC interrupts (event queues), and N denotes the number of CPU cores. This iProc event queue-based MSI support should not be used with newer platforms with integrated MSI support in the GIC (e.g., giv2m or gicv3-its). [bhelgaas: fold in Kconfig fixes from Arnd Bergmann <arnd@arndb.de>] Signed-off-by: NRay Jui <rjui@broadcom.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NAnup Patel <anup.patel@broadcom.com> Reviewed-by: NVikram Prakash <vikramp@broadcom.com> Reviewed-by: NScott Branden <sbranden@broadcom.com> Reviewed-by: NMarc Zyngier <marc.zyngier@arm.com>
-
由 Grygorii Strashko 提交于
On -RT and if kernel is booting with "threadirqs" cmd line parameter, PCIe/PCI (MSI) IRQ cascade handlers (like dra7xx_pcie_msi_irq_handler()) will be forced threaded and, as result, will generate warnings like this: WARNING: CPU: 1 PID: 82 at kernel/irq/handle.c:150 handle_irq_event_percpu+0x14c/0x174() irq 460 handler irq_default_primary_handler+0x0/0x14 enabled interrupts Backtrace: (warn_slowpath_common) from (warn_slowpath_fmt+0x38/0x40) (warn_slowpath_fmt) from (handle_irq_event_percpu+0x14c/0x174) (handle_irq_event_percpu) from (handle_irq_event+0x84/0xb8) (handle_irq_event) from (handle_simple_irq+0x90/0x118) (handle_simple_irq) from (generic_handle_irq+0x30/0x44) (generic_handle_irq) from (dra7xx_pcie_msi_irq_handler+0x7c/0x8c) (dra7xx_pcie_msi_irq_handler) from (irq_forced_thread_fn+0x28/0x5c) (irq_forced_thread_fn) from (irq_thread+0x128/0x204) This happens because all of them invoke generic_handle_irq() from the requested handler. generic_handle_irq() grabs raw_locks and thus needs to run in raw-IRQ context. This issue was originally reproduced on TI dra7-evem, but, as was identified during discussion [1], other hosts can also suffer from this issue. Fix all them at once by marking PCIe/PCI (MSI) IRQ cascade handlers IRQF_NO_THREAD explicitly. [1] http://lkml.kernel.org/r/1448027966-21610-1-git-send-email-grygorii.strashko@ti.com [bhelgaas: add stable tag, fix typos] Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> (for imx6) CC: stable@vger.kernel.org CC: Kishon Vijay Abraham I <kishon@ti.com> CC: Jingoo Han <jingoohan1@gmail.com> CC: Kukjin Kim <kgene@kernel.org> CC: Krzysztof Kozlowski <k.kozlowski@samsung.com> CC: Richard Zhu <Richard.Zhu@freescale.com> CC: Thierry Reding <thierry.reding@gmail.com> CC: Stephen Warren <swarren@wwwdotorg.org> CC: Alexandre Courbot <gnurou@gmail.com> CC: Simon Horman <horms@verge.net.au> CC: Pratyush Anand <pratyush.anand@gmail.com> CC: Michal Simek <michal.simek@xilinx.com> CC: "Sören Brinkmann" <soren.brinkmann@xilinx.com> CC: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
-
由 Christoph Biedl 提交于
Commit 36e097a8 ("PCI: Split out bridge window override of minimum allocation address") claimed to do no functional changes but unfortunately did: The "min" variable is altered. At least the AVM A1 PCMCIA adapter was no longer detected, breaking ISDN operation. Use a local copy of "min" to restore the previous behaviour. [bhelgaas: avoid gcc "?:" extension for portability and readability] Fixes: 36e097a8 ("PCI: Split out bridge window override of minimum allocation address") Signed-off-by: NChristoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> CC: stable@vger.kernel.org # v3.14+
-
- 06 1月, 2016 3 次提交
-
-
由 Bjorn Helgaas 提交于
Return values immediately when possible to simplify the control flow. No functional change intended. Folded in unused variable removal as pointed out by Fabio Estevam <fabio.estevam@nxp.com>, Arnd Bergmann <arnd@arndb.de>, and Thierry Reding <thierry.reding@gmail.com>. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NPratyush Anand <pratyush.anand@gmail.com>
-
由 Stanimir Varbanov 提交于
The PCIe driver reuses the Designware common code for host and MSI initialization, and also programs the Qualcomm application specific registers. [bhelgaas: remove COMPILE_TEST Kconfig dependency] Signed-off-by: NStanimir Varbanov <svarbanov@mm-sol.com> Signed-off-by: NStanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Stanimir Varbanov 提交于
Read back the ATU CR2 register to ensure ATU programming is effective before any subsequent I/O or config space accesses. Without this, PCI device enumeration is unreliable. [bhelgaas: changelog, comment] Signed-off-by: NStanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NPratyush Anand <pratyush.anand@gmail.com>
-
- 21 12月, 2015 1 次提交
-
-
由 Suravee Suthikulpanit 提交于
This patch introduces pci_msi_register_fwnode_provider() for irqchip to register a callback, to provide a way to determine appropriate MSI domain for a pci device. It also introduces pci_host_bridge_acpi_msi_domain(), which returns the MSI domain of the specified PCI host bridge with DOMAIN_BUS_PCI_MSI bus token. Then, it is assigned to pci device. Reviewed-by: NMarc Zyngier <marc.zyngier@arm.com> Acked-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRafael J. Wysocki <rjw@rjwysocki.net> Signed-off-by: NSuravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
-
- 20 12月, 2015 1 次提交
-
-
由 Jake Oshins 提交于
The Linux kernel already has the concept of IRQ domain, wherein a component can expose a set of IRQs which are managed by a particular interrupt controller chip or other subsystem. The PCI driver exposes the notion of an IRQ domain for Message-Signaled Interrupts (MSI) from PCI Express devices. This patch exposes the functions which are necessary for creating a MSI IRQ domain within a module. [ tglx: Split it into x86 and core irq parts ] Signed-off-by: NJake Oshins <jakeo@microsoft.com> Cc: gregkh@linuxfoundation.org Cc: kys@microsoft.com Cc: devel@linuxdriverproject.org Cc: olaf@aepfle.de Cc: apw@canonical.com Cc: vkuznets@redhat.com Cc: haiyangz@microsoft.com Cc: marc.zyngier@arm.com Cc: bhelgaas@google.com Link: http://lkml.kernel.org/r/1449769983-12948-4-git-send-email-jakeo@microsoft.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
-
- 11 12月, 2015 5 次提交
-
-
由 Bjorn Helgaas 提交于
Restructure the logic so we return the config space size as soon as we know it. This reduces indentation, removes negations, and removes gotos. No functional change. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Jason S. McMullan 提交于
The NFP6000 has an erratum where reading/writing to PCI config space addresses above 0x600 can cause the NFP to generate PCIe completion timeouts. Limit the NFP6000's config space size to 0x600 bytes. Signed-off-by: NJason S. McMullan <jason.mcmullan@netronome.com> [simon: edited changelog] Signed-off-by: NSimon Horman <simon.horman@netronome.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Jason S. McMullan 提交于
If a device quirk modifies the pci_dev->cfg_size to be less than PCI_CFG_SPACE_EXP_SIZE (4096), but greater than PCI_CFG_SPACE_SIZE (256), the PCI sysfs interface truncates the readable size to PCI_CFG_SPACE_SIZE. Allow sysfs access to config space up to cfg_size, even if the device doesn't support the entire 4096-byte PCIe config space. Note that pci_read_config() and pci_write_config() limit access to dev->cfg_size even though pcie_config_attr contains 4096 (the maximum size). Signed-off-by: NJason S. McMullan <jason.mcmullan@netronome.com> [simon: edited changelog] Signed-off-by: NSimon Horman <simon.horman@netronome.com> [bhelgaas: more changelog edits] Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Vladis Dronov 提交于
We've always validated that both bytes of the Expansion ROM signature and all four bytes of the PCI Data Structure signature (see PCI Firmware spec r3.0, sec 5.1.1), but we only printed a warning if the first byte of the ROM signature was invalid. Print warnings if *any* of those bytes are invalid. Note that we only look at these headers if we map or read the ROM. [bhelgaas: changelog, tweak printk format] Signed-off-by: NVladis Dronov <vdronov@redhat.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Bjorn Helgaas 提交于
Bit 7 of the "Header Type" register indicates a multi-function device when set. Bits 0-6 contain encoded values, where 0x1 indicates a PCI-PCI bridge. It is incorrect to test this as though it were a mask. For example, while the PCI 3.0 spec only defines values 0x0, 0x1, and 0x2, it's conceivable that a future spec could define 0x3 to mean something else; then tests for "(hdr_type & 0x7f) & PCI_HEADER_TYPE_BRIDGE" would incorrectly succeed for this new 0x3 header type. Test bits 0-6 of the Header Type for equality with PCI_HEADER_TYPE_BRIDGE. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 10 12月, 2015 2 次提交
-
-
由 Simon Horman 提交于
Add fallback compatibility string for R-Car Gen 2 family. This is in keeping with the fallback scheme being adopted wherever appropriate for drivers for Renesas SoCs. Signed-off-by: NSimon Horman <horms+renesas@verge.net.au> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Simon Horman 提交于
Add fallback compatibility string for R-Car Gen 2 family. This is in keeping with the fallback scheme being adopted wherever appropriate for drivers for Renesas SoCs. Signed-off-by: NSimon Horman <horms+renesas@verge.net.au> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRob Herring <robh@kernel.org>
-
- 09 12月, 2015 4 次提交
-
-
由 Julia Lawall 提交于
The pci_platform_pm_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Acked-by: NBjorn Helgaas <bhelgaas@google.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
由 Harunobu Kurokawa 提交于
Add the "renesas,pcie-r8a7795" property for the R-Car H3 device to the pcie-rcar driver. Tested-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NHarunobu Kurokawa <harunobu.kurokawa.dn@renesas.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
-
由 Phil Edworthy 提交于
Now that we can build on arm64, revert commit 7c537c67 ("PCI: rcar: Build pcie-rcar.c only on ARM"). Signed-off-by: NPhil Edworthy <phil.edworthy@renesas.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Phil Edworthy 提交于
The main purpose of this change is to avoid calling pci_ioremap_io() as this is not available on arm64. However, instead of doing the range parsing in this driver we can utilise of_pci_get_host_bridge_resources(). This is similar to changes made to the generic PCI host driver in commit dbf9826d ("PCI: generic: Convert to DT resource parsing API") Reported-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Tested-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NPhil Edworthy <phil.edworthy@renesas.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NSimon Horman <horms+renesas@verge.net.au>
-
- 08 12月, 2015 1 次提交
-
-
由 Ray Jui 提交于
Traditionally, all iProc PCIe root complexes use PAXB-based wrapper, with an integrated on-chip Serdes to support external endpoint devices. On newer iProc platforms, a PAXC-based wrapper is introduced, for connection with internally emulated PCIe endpoint devices in the ASIC. Add support for PAXC-based iProc PCIe root complex in the iProc PCIe core driver. This change factors out common logic between PAXB and PAXC, and uses tables to store register offsets that are different between PAXB and PAXC. This allows the driver to be scaled to support subsequent PAXC revisions in the future. Signed-off-by: NRay Jui <rjui@broadcom.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NScott Branden <sbranden@broadcom.com>
-