- 11 11月, 2014 2 次提交
-
-
由 Quentin Lambert 提交于
Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci Signed-off-by: NQuentin Lambert <lambert.quentin@gmail.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Markus Elfring 提交于
The functions pci_dev_put(), pci_pme_wakeup_bus(), and put_device() return immediately if their argument is NULL. Thus the test before the call is not needed. Remove these unnecessary tests. This issue was detected by using the Coccinelle software. Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 06 10月, 2014 1 次提交
-
-
由 David Vrabel 提交于
The DEFINE_XENBUS_DRIVER() macro looks a bit weird and causes sparse errors. Replace the uses with standard structure definitions instead. This is similar to pci and usb device registration. Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
-
- 02 10月, 2014 11 次提交
-
-
由 Marti Raudsepp 提交于
AMD has confirmed that peer-to-peer between two southbridge functions does not occur. Add a quirk to indicate that these functions are isolated even though they don't have an ACS capability. Link: https://bugzilla.kernel.org/show_bug.cgi?id=81841Signed-off-by: NMarti Raudsepp <marti@juffo.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NJoel Schopp <joel.schopp@amd.com>
-
由 Tanmay Inamdar 提交于
Add the AppliedMicro X-Gene SOC PCIe host controller driver. The X-Gene PCIe controller supports up to 8 lanes and GEN3 speed. The X-Gene SOC supports up to 5 PCIe ports. [bhelgaas: folded in MAINTAINERS and bindings updates] Tested-by: NMing Lei <ming.lei@canonical.com> Tested-by: NDann Frazier <dann.frazier@canonical.com> Signed-off-by: NTanmay Inamdar <tinamdar@apm.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: Liviu Dudau <Liviu.Dudau@arm.com> (driver)
-
由 Lucas Stach 提交于
Replace them by using the standard kernel bitmap ops. No functional change, but makes the code a lot cleaner. Signed-off-by: NLucas Stach <l.stach@pengutronix.de> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NPratyush Anand <pratyush.anand@st.com> Acked-by: NJingoo Han <jg1.han@samsung.com>
-
由 Bjorn Helgaas 提交于
The only use of "status" is to hold a value which is immediately returned, so just return and remove the variable directly. Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Yijing Wang 提交于
default_restore_msi_irq() already has the struct msi_desc pointer required by __write_msi_msg(), so call it directly instead of having write_msi_msg() look it up from the IRQ. No functional change. [bhelgaas: split into separate patch] Signed-off-by: NYijing Wang <wangyijing@huawei.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Yijing Wang 提交于
The "msi_bus" sysfs file for bridges sets a bus flag to allow or disallow future driver requests for MSI or MSI-X. Previously, the sysfs file existed for endpoints but did nothing. Add "msi_bus" support for endpoints, so an administrator can prevent the use of MSI and MSI-X for individual devices. Note that as for bridges, these changes only affect future driver requests for MSI or MSI-X, so drivers may need to be reloaded. Add documentation for the "msi_bus" sysfs file. [bhelgaas: changelog, comments, add "subordinate", add endpoint printk, rework bus_flags setting, make bus_flags printk unconditional] Signed-off-by: NYijing Wang <wangyijing@huawei.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Yijing Wang 提交于
"msi_attrib.pos" is only used for MSI (not MSI-X), and we already cache the MSI capability offset in "dev->msi_cap". Remove "pos" from the struct msi_attrib and use "dev->msi_cap" directly. [bhelgaas: changelog, fix whitespace] Signed-off-by: NYijing Wang <wangyijing@huawei.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Yijing Wang 提交于
After commit 1c51b50c ("PCI/MSI: Export MSI mode using attributes, not kobjects"), the kobject in struct msi_desc is unused. Remove the unused struct kobject from struct msi_desc. [bhelgaas: changelog] Fixes: 1c51b50c ("PCI/MSI: Export MSI mode using attributes, not kobjects") Signed-off-by: NYijing Wang <wangyijing@huawei.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Alexander Gordeev 提交于
Rename pci_msi_check_device() to pci_msi_supported() for clarity. Note that pci_msi_supported() returns true if MSI/MSI-X is supported, so code like: if (pci_msi_supported(...)) reads naturally. [bhelgaas: changelog, split to separate patch, reverse sense] Signed-off-by: NAlexander Gordeev <agordeev@redhat.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Alexander Gordeev 提交于
Both callers of pci_msi_check_device() check that the device is in D0 state, so move the check from the callers into pci_msi_check_device() itself. In pci_enable_msi_range(), note that pci_msi_check_device() never returns a positive value any more, so the loop that called it until it returns zero or negative is no longer necessary. [bhelgaas: changelog, split to separate patch] Signed-off-by: NAlexander Gordeev <agordeev@redhat.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Alexander Gordeev 提交于
No architectures implement arch_msi_check_device() or the struct msi_chip .check_device() method, so remove them. Remove the "type" parameter to pci_msi_check_device() because it was only used to call arch_msi_check_device() and is no longer needed. [bhelgaas: changelog, split to separate patch] Signed-off-by: NAlexander Gordeev <agordeev@redhat.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 01 10月, 2014 6 次提交
-
-
由 Liviu Dudau 提交于
Add pci_remap_iospace() to map bus I/O resources into the CPU virtual address space. Architectures with special needs may provide their own version, but most should be able to use this one. This function is useful for PCI host bridge drivers that need to map the PCI I/O resources into virtual memory space. [bhelgaas: phys_addr description, drop temporary "err" variable] Signed-off-by: NLiviu Dudau <Liviu.Dudau@arm.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NRob Herring <robh@kernel.org> Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com> CC: Arnd Bergmann <arnd@arndb.de>
-
由 Liviu Dudau 提交于
Add pci_get_new_domain_nr() to allocate a new domain number and of_get_pci_domain_nr() to retrieve the PCI domain number of a given device from DT. Host bridge drivers or architecture-specific code can choose to implement their PCI domain number policy using these two functions. Using of_get_pci_domain_nr() guarantees a stable PCI domain number on every boot provided that all host bridge controllers are assigned a number in the device tree using "linux,pci-domain" property. Mixing use of pci_get_new_domain_nr() and of_get_pci_domain_nr() is not recommended as it can lead to potentially conflicting domain numbers being assigned to root buses behind different host bridges. Signed-off-by: NLiviu Dudau <Liviu.Dudau@arm.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> CC: Arnd Bergmann <arnd@arndb.de> CC: Grant Likely <grant.likely@linaro.org> CC: Rob Herring <robh+dt@kernel.org> CC: Catalin Marinas <catalin.marinas@arm.com>
-
由 Catalin Marinas 提交于
The handling of PCI domains (or PCI segments in ACPI speak) is usually a straightforward affair but its implementation is currently left to the architectural code, with pci_domain_nr(b) querying the value of the domain associated with bus b. This patch introduces CONFIG_PCI_DOMAINS_GENERIC as an option that can be selected if an architecture wants a simple implementation where the value of the domain associated with a bus is stored in struct pci_bus. The architectures that select CONFIG_PCI_DOMAINS_GENERIC will then have to implement pci_bus_assign_domain_nr() as a way of setting the domain number associated with a root bus. All child buses except the root bus will inherit the domain_nr value from their parent. Signed-off-by: NCatalin Marinas <Catalin.Marinas@arm.com> [Renamed pci_set_domain_nr() to pci_bus_assign_domain_nr()] Signed-off-by: NLiviu Dudau <Liviu.Dudau@arm.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> CC: Arnd Bergmann <arnd@arndb.de>
-
由 Liviu Dudau 提交于
The ranges property for a host bridge controller in DT describes the mapping between the PCI bus address and the CPU physical address. The resources framework however expects that the IO resources start at a pseudo "port" address 0 (zero) and have a maximum size of IO_SPACE_LIMIT. The conversion from PCI ranges to resources failed to take that into account, returning a CPU physical address instead of a port number. Also fix all the drivers that depend on the old behaviour by fetching the CPU physical address based on the port number where it is being needed. Signed-off-by: NLiviu Dudau <Liviu.Dudau@arm.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> CC: Grant Likely <grant.likely@linaro.org> CC: Rob Herring <robh+dt@kernel.org> CC: Arnd Bergmann <arnd@arndb.de> CC: Thierry Reding <thierry.reding@gmail.com> CC: Simon Horman <horms@verge.net.au> CC: Catalin Marinas <catalin.marinas@arm.com>
-
由 Lucas Stach 提交于
The setup_irq function is supposed to set up exactly one MSI IRQ. Multiple IRQ setup is handled differently, to respect the choices made by the upper layers. Also only clear one MSI IRQ at a time; the PCI core will call into this function multiple times if it has to tear down more than one MSI IRQ. Signed-off-by: NLucas Stach <l.stach@pengutronix.de> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Reviewed-by: NPratyush Anand <pratyush.anand@st.com> Acked-by: NJingoo Han <jg1.han@samsung.com>
-
由 Yinghai Lu 提交于
In 5b285415 ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources"), we added IORESOURCE_MEM_64 to the mask in pci_assign_unassigned_root_bus_resources(), but not to the mask in pci_assign_unassigned_bridge_resources(). Add IORESOURCE_MEM_64 to the pci_assign_unassigned_bridge_resources() type mask. Fixes: 5b285415 ("PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources") Signed-off-by: NYinghai Lu <yinghai@kernel.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> CC: stable@vger.kernel.org # v3.16+
-
- 30 9月, 2014 2 次提交
-
-
由 Alex Williamson 提交于
Intel has verified there is no peer-to-peer between functions for the below selection of 82598, 82599, and X520 10G NICs. These NICs lack an ACS capability, so we're not able to determine this isolation without the help of quirks. Generalize the Solarflare quirk and add these Intel 10G NICs. Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NJohn Ronciak <John.ronciak@intel.com>
-
由 Gavin Shan 提交于
The patch exports 2 MSI message relevant functions, which will be used by VFIO PCI driver. The VFIO PCI driver would be built as a module. Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: NBjorn Helgaas <bhelgaas@google.com> Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
-
- 25 9月, 2014 1 次提交
-
-
由 Chen, Gong 提交于
Add strings for all AER error bits defined in PCIe r3.0. [bhelgaas: changelog, drop designated initializer change] Signed-off-by: NChen, Gong <gong.chen@linux.intel.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 24 9月, 2014 11 次提交
-
-
由 Quentin Lambert 提交于
The modifications effectively change the value of len_tmp in the case where the first condition is not met. Signed-off-by: NQuentin Lambert <lambert.quentin@gmail.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Quentin Lambert 提交于
The following Coccinelle semantic patch was used to find and correct cases of assignments in "if" conditions: @@ expression var, expr; statement S; @@ + var = expr; if( - (var = expr) + var ) S Signed-off-by: NQuentin Lambert <lambert.quentin@gmail.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Quentin Lambert 提交于
Remove curly braces in simple "if" cases. No functional change. Signed-off-by: NQuentin Lambert <lambert.quentin@gmail.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Quentin Lambert 提交于
Add space before open parenthesis as is conventional. No functional change. [bhelgaas: fix a few more in ibmphp, shpchp] Signed-off-by: NQuentin Lambert <lambert.quentin@gmail.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Minghuan Lian 提交于
Add a struct pcie_host_ops .get_msi_data() method for platforms to return their special MSI message data. Signed-off-by: NMinghuan Lian <Minghuan.Lian@freescale.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NMohit KUMAR <mohit.kumar@st.com>
-
由 Minghuan Lian 提交于
The struct pcie_host_ops .get_msi_data() method returns the MSI message address. To accurately express its purpose, rename it to .get_msi_addr(). Signed-off-by: NMinghuan Lian <Minghuan.Lian@freescale.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NMohit KUMAR <mohit.kumar@st.com>
-
由 Minghuan Lian 提交于
End address should be equal to start_addr + size - 1. Fix PCI IO resource end address calculation. Signed-off-by: NMinghuan Lian <Minghuan.Lian@freescale.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NMohit KUMAR <mohit.kumar@st.com>
-
由 Minghuan Lian 提交于
The code has calculated cfg0_base and cfg1_base when parsing 'reg' or 'ranges' property of PCI DTS node, so remove duplicate calculation. When using 'reg', resource cfg is not used, so this code computed an incorrect configuration base. Signed-off-by: NMinghuan Lian <Minghuan.Lian@freescale.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NMohit KUMAR <mohit.kumar@st.com>
-
由 Yinghai Lu 提交于
During pciehp initialization, we previously wrote two hotplug commands: pciehp_probe pcie_init pcie_disable_notification pcie_write_cmd # command 1 pcie_init_notification pcie_enable_notification pcie_write_cmd # command 2 For controllers with errata like Intel CF118, we previously waited for a timeout before issuing the second hotplug command because the first command only updates interrupt enable bits and is not a "real" hotplug command, so the controller doesn't report Command Completed for it. But there's no need to disable notifications in the first place. If BIOS left them enabled, we could easily take an interrupt before disabling them, so there's no benefit in disabling them for the tiny window before we enable them. Drop the unnecessary pcie_disable_notification() call. [bhelgaas: changelog] Link: http://www.intel.com/content/www/us/en/processors/xeon/xeon-e7-v2-spec-update.htmlSigned-off-by: NYinghai Lu <yinghai@kernel.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Yinghai Lu 提交于
Add more Slot Control debug output and move one print after pcie_write_cmd() to be consistent with other debug output. Signed-off-by: NYinghai Lu <yinghai@kernel.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Yinghai Lu 提交于
When we warned about a timeout on a hotplug command, we previously printed the time between calls to pcie_write_cmd(), without accounting for any time spent actually waiting. Consider this sequence: pcie_write_cmd write SLTCTL cmd_started = jiffies # T1 pcie_write_cmd pcie_wait_cmd now = jiffies # T2 wait_event_timeout # we may wait here if (timeout) ctrl_info("Timeout on command issued %u msec ago", jiffies_to_msecs(now - cmd_started)) We previously printed (T2 - T1), but that doesn't include the time spent in wait_event_timeout(). Fix this by using the current jiffies value, not the one cached before calling wait_event_timeout(). [bhelgaas: changelog, use current jiffies instead of adding timeout] Fixes: 40b96083 ("PCI: pciehp: Compute timeout from hotplug command start time") Signed-off-by: NYinghai Lu <yinghai@kernel.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 23 9月, 2014 6 次提交
-
-
由 Yinghai Lu 提交于
pcie_poll_cmd() take msecs instead of jiffies, so convert timeout to msecs. Fixes: 40b96083 ("PCI: pciehp: Compute timeout from hotplug command start time") Signed-off-by: NYinghai Lu <yinghai@kernel.org> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Alex Williamson 提交于
Solarflare confirms that these devices do not allow peer-to-peer between functions. Quirk them to allow IOMMU grouping to expose this isolation. Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NRobert Stonehouse <rstonehouse@solarflare.com>
-
由 Fabio Estevam 提交于
of_get_address() expects pointers in the third and fourth parameters. Pass NULL in order to fix the following sparse warnings: drivers/pci/host/pcie-designware.c:433:51: warning: Using plain integer as NULL pointer drivers/pci/host/pcie-designware.c:433:58: warning: Using plain integer as NULL pointer Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> Acked-by: NLucas Stach <l.stach@pengutronix.de> Acked-by: NJingoo Han <jg1.han@samsung.com>
-
由 Alex Williamson 提交于
pci_get_dma_source() is unused, so remove it. We now have dma_alias_devfn() to describe this. Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Alex Williamson 提交于
pci_find_upstream_pcie_bridge() is unused, so remove it. Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Thomas Petazzoni 提交于
Geert Uytterhoeven reported a warning when building pci-mvebu: drivers/pci/host/pci-mvebu.c: In function 'mvebu_get_tgt_attr': drivers/pci/host/pci-mvebu.c:887:39: warning: 'rtype' may be used uninitialized in this function [-Wmaybe-uninitialized] if (slot == PCI_SLOT(devfn) && type == rtype) { ^ And indeed, the code of mvebu_get_tgt_attr() may lead to the usage of rtype when being uninitialized, even though it would only happen if we had entries other than I/O space and 32 bits memory space. This commit fixes that by simply skipping the current DT range being considered, if it doesn't match the resource type we're looking for. Reported-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com> CC: stable@vger.kernel.org # v3.12+
-