An error occurred fetching the project authors.
- 10 Nov, 2012 3 commits
-
-
Bjorn Helgaas authored
Use the same names (almost) as the spec for TotalVFs, InitialVFs, NumVFs. Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Donald Dutile authored
Some implementations of SRIOV provide a capability structure value of TotalVFs that is greater than what the software can support. Provide a method to reduce the capability structure reported value to the value the driver can support. This ensures sysfs reports the current capability of the system, hardware and software. Example for its use: igb & ixgbe -- report 8 & 64 as TotalVFs, but drivers only support 7 & 63 maximum. Signed-off-by:
Donald Dutile <ddutile@redhat.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Yinghai Lu authored
Need type filled in device structure so it can be used for visible attribute control in sysfs for pci_dev. Signed-off-by:
Yinghai Lu <yinghai@kernel.org> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
- 05 Jul, 2012 1 commit
-
-
Rafael J. Wysocki authored
Commit cc2893b6 (PCI: Ensure we re-enable devices on resume) addressed the problem with USB not being powered after resume on recent Lenovo machines, but it did that in a suboptimal way. Namely, it should have changed the relevant code paths only, which are pci_pm_resume_noirq() and pci_pm_restore_noirq() supposed to restore the device's power and standard configuration registers after system resume from suspend or hibernation. Instead, however, it modified pci_set_power_state() which is executed in several other situations too. That resulted in some undesirable effects, like attempting to change a device's power state in the same way multiple times in a row (up to as many as 4 times in a row in the snd_hda_intel driver). Fix the bug addressed by commit cc2893b6 in an alternative way, by forcibly powering up all devices in pci_pm_default_resume_early(), which is called by pci_pm_resume_noirq() and pci_pm_restore_noirq() to restore the device's power and standard configuration registers, and modifying pci_pm_runtime_resume() to avoid the forcible power-up if not necessary. Then, revert the changes made by commit cc2893b6 to make the confusion introduced by it go away. Acked-by:
Matthew Garrett <mjg@redhat.com> Signed-off-by:
Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
- 23 Jun, 2012 1 commit
-
-
Huang Ying authored
This patch adds runtime D3cold support and corresponding ACPI platform support. This patch only enables runtime D3cold support; it does not enable D3cold support during system suspend/hibernate. D3cold is the deepest power saving state for a PCIe device, where its main power is removed. While it is in D3cold, you can't access the device at all, not even its configuration space (which is still accessible in D3hot). Therefore the PCI PM registers can not be used to transition into/out of the D3cold state; that must be done by platform logic such as ACPI _PR3. To support wakeup from D3cold, a system may provide auxiliary power, which allows a device to request wakeup using a Beacon or the sideband WAKE# signal. WAKE# is usually connected to platform logic such as ACPI GPE. This is quite different from other power saving states, where devices request wakeup via a PME message on the PCIe link. Some devices, such as those in plug-in slots, have no direct platform logic. For example, there is usually no ACPI _PR3 for them. D3cold support for these devices can be done via the PCIe Downstream Port leading to the device. When the PCIe port is powered on/off, the device is powered on/off too. Wakeup events from the device will be notified to the corresponding PCIe port. For more information about PCIe D3cold and corresponding ACPI support, please refer to: - PCI Express Base Specification Revision 2.0 - Advanced Configuration and Power Interface Specification Revision 5.0 [bhelgaas: changelog] Reviewed-by:
Rafael J. Wysocki <rjw@sisk.pl> Originally-by:
Zheng Yan <zheng.z.yan@intel.com> Signed-off-by:
Huang Ying <ying.huang@intel.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
- 13 Jun, 2012 2 commits
-
-
Yinghai Lu authored
All callers of pci_do_scan_bus() are gone, so remove it. Note that pci_do_scan_bus() was exported, so out-of-tree modules could depend on it. [bhelgaas: changelog] Signed-off-by:
Yinghai Lu <yinghai@kernel.org> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Yinghai Lu authored
This creates a generic pci_hp_add_bridge() that can be used by several hotplug drivers. [bhelgaas: split out from pciehp patch] Signed-off-by:
Yinghai Lu <yinghai@kernel.org> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
- 12 Jun, 2012 1 commit
-
-
Alex Williamson authored
VFIO PCI support will make use of these for user-initiated PCI config accesses. Signed-off-by:
Alex Williamson <alex.williamson@redhat.com> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
- 30 Apr, 2012 2 commits
-
-
Yinghai Lu authored
Use that device for pci_root_bus bridge pointer. Use pci_release_bus_bridge_dev() to release allocated pci_host_bridge in remove path. Use root bus bridge pointer to get host bridge pointer instead of searching host bridge list. That leaves the host bridge list unused, so remove it. Signed-off-by:
Yinghai Lu <yinghai@kernel.org> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
Yinghai Lu authored
Move host bridge-related code from probe.c to a new host-bridge.c. Signed-off-by:
Yinghai Lu <yinghai@kernel.org> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com>
-
- 24 Feb, 2012 2 commits
-
-
Yinghai Lu authored
This isn't really a quirk; calling it directly from pci_add_device makes more sense. Signed-off-by:
Yinghai Lu <yinghai@kernel.org> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
Yinghai Lu authored
Let the user could enable and disable with pci=realloc=on or pci=realloc=off Also 1. move variable and functions near the place they are used. 2. change macro to function 3. change related functions and variable to static and _init 4. update parameter description accordingly. This will let us add a config option to control default behavior, and still allow the user to turn off automatic reallocation if it fails on their platform until a permanent solution is found. -v2: still honor pci=realloc, and treat it as pci=realloc=on also use enum instead of ... -v3: update kernel-paramenters.txt according to Jesse. Signed-off-by:
Yinghai Lu <yinghai@kernel.org> Acked-by:
Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
- 23 Feb, 2012 1 commit
-
-
Yinghai Lu authored
unreferenced object 0xffff880276d17700 (size 64): comm "swapper/0", pid 1, jiffies 4294897182 (age 3976.028s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 18 f9 de 76 02 88 ff ff ...........v.... 10 00 00 00 0e 00 00 00 0f 28 40 00 00 00 00 00 .........(@..... backtrace: [<ffffffff81c8aede>] kmemleak_alloc+0x26/0x43 [<ffffffff811385f0>] __kmalloc+0x121/0x183 [<ffffffff813cf821>] pci_add_cap_save_buffer+0x35/0x7c [<ffffffff813d12b7>] pci_allocate_cap_save_buffers+0x1d/0x65 [<ffffffff813cdb52>] pci_device_add+0x92/0xf1 [<ffffffff81c8afe6>] pci_scan_single_device+0x9f/0xa1 [<ffffffff813cdbd2>] pci_scan_slot.part.20+0x21/0x106 [<ffffffff813cdce2>] pci_scan_slot+0x2b/0x35 [<ffffffff81c8dae4>] __pci_scan_child_bus+0x51/0x107 [<ffffffff81c8d75b>] pci_scan_bridge+0x376/0x6ae [<ffffffff81c8db60>] __pci_scan_child_bus+0xcd/0x107 [<ffffffff81c8dbab>] pci_scan_child_bus+0x11/0x2a [<ffffffff81cca58c>] pci_acpi_scan_root+0x18b/0x21c [<ffffffff81c916be>] acpi_pci_root_add+0x1e1/0x42a [<ffffffff81406210>] acpi_device_probe+0x50/0x190 [<ffffffff814a0227>] really_probe+0x99/0x126 Need to free saved_buffer for capabilities. Signed-off-by:
Yinghai Lu <yinghai@kernel.org> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
- 14 Feb, 2012 1 commit
-
-
Yinghai Lu authored
We can reuse it for pciehp probing. -v2: according to Kenji, fix crs timeout checking, and export the function for later use when pciehp is compiled as a module. Suggested-by:
Matthew Wilcox <matthew@wil.cx> Signed-off-by:
Yinghai Lu <yinghai@kernel.org> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
- 06 Jan, 2012 2 commits
-
-
Hao, Xudong authored
During S3 or S4 resume or PCI reset, ATS regs aren't restored correctly. This patch enables ATS at the device state restore if PCI device has ATS capability. Signed-off-by:
Xudong Hao <xudong.hao@intel.com> Signed-off-by:
Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
Jan Kiszka authored
These new PCI services allow to probe for 2.3-compliant INTx masking support and then use the feature from PCI interrupt handlers. The services are properly synchronized with concurrent config space access via sysfs or on device reset. This enables generic PCI device drivers like uio_pci_generic or KVM's device assignment to implement the necessary kernel-side IRQ handling without any knowledge about device-specific interrupt status and control registers. Acked-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
- 01 Aug, 2011 1 commit
-
-
Ram Pai authored
Allocate resources to cardbus bridge only after all other genuine resources requests are satisfied. Dont retry if resource allocation for cardbus-bridges fail. Signed-off-by:
Ram Pai <linuxram@us.ibm.com> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
- 08 Jul, 2011 1 commit
-
-
Ram Pai authored
Multiple attempts to dynamically reallocate pci resources have unfortunately lead to regressions. Though we continue to fix the regressions and fine tune the dynamic-reallocation behavior, we have not reached a acceptable state yet. This patch provides a interim solution. It disables dynamic reallocation by default, but adds the ability to enable it through pci=realloc kernel command line parameter. Tested-by:
Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by:
Ram Pai <linuxram@us.ibm.com> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
- 21 Jun, 2011 1 commit
-
-
Ohad Ben-Cohen authored
This should ease finding similarities with different platforms, with the intention of solving problems once in a generic framework which everyone can use. Note: to move intel-iommu.c, the declaration of pci_find_upstream_pcie_bridge() has to move from drivers/pci/pci.h to include/linux/pci.h. This is handled in this patch, too. As suggested, also drop DMAR's EXPERIMENTAL tag while we're at it. Compile-tested on x86_64. Signed-off-by:
Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by:
Joerg Roedel <joerg.roedel@amd.com>
-
- 21 May, 2011 2 commits
-
-
Yinghai Lu authored
Requested by Greg KH to fix a race condition in the creating of PCI bus cpuaffinity files. Acked-by:
Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by:
Yinghai Lu <yinghai@kernel.org> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
Yinghai Lu authored
After remove the device from /sys, we have to rescan all or find out the bridge and access /sys../device/rescan there. this patch add /sys/.../pci_bus/.../rescan. So user can rescan more easy. that is more clean and easy to understand. like after remove 0000:c4:00.0, you can rescan 0000:c4 directly. -v2: According to Jesse, use function instead of exposing attr, so could hide #ifdef in header file. also add code to remove rescan file in remove path. -v3: GregKH pointed out that we should use dev_attrs to avoid racing. So add pcibus_attrs and make it to be member of pcibus_attrs. -v4: Change name to pcibus_dev_attrs according to GregKH Acked-by:
Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by:
Yinghai Lu <yinghai@kernel.org> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
- 11 Apr, 2011 1 commit
-
-
Joerg Roedel authored
This patch moves the relevant declarations from the local header file in drivers/pci to a more accessible locations so that it can be used by the AMD IOMMU driver too. The file is named pci-ats.h because support for the PCI PRI capability will also be added there in a later patch-set. Signed-off-by:
Joerg Roedel <joerg.roedel@amd.com> Acked-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
- 04 Mar, 2011 1 commit
-
-
Narendra_K@Dell.com authored
This patch exports ACPI _DSM (Device Specific Method) provided firmware instance number and string name of PCI devices as defined by 'PCI Firmware Specification Revision 3.1' section 4.6.7.( DSM for Naming a PCI or PCI Express Device Under Operating Systems) to sysfs. New files created are: /sys/bus/pci/devices/.../label which contains the firmware name for the device in question, and /sys/bus/pci/devices/.../acpi_index which contains the firmware device type instance for the given device. cat /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/acpi_index 1 cat /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/label Embedded Broadcom 5709C NIC 1 cat /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/acpi_index 2 cat /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.1/label Embedded Broadcom 5709C NIC 2 The ACPI _DSM provided firmware 'instance number' and 'string name' will be given priority if the firmware also provides 'SMBIOS type 41 device type instance and string'. Signed-off-by:
Matthew Garrett <mjg@redhat.com> Signed-off-by:
Jordan Hargrave <jordan_hargrave@dell.com> Signed-off-by:
Narendra K <narendra_k@dell.com> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
- 14 Jan, 2011 2 commits
-
-
Rafael J. Wysocki authored
After recent changes related to wakeup events pm_wakeup_event() automatically checks if the given device is configured to signal wakeup, so pci_wakeup_event() may be a static inline function calling pm_wakeup_event() directly. Signed-off-by:
Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
Rafael J. Wysocki authored
Move the evaluation of acpi_pci_osc_control_set() (to request control of PCI Express native features) into acpi_pci_root_add() to avoid calling it many times for the same root complex with the same arguments. Additionally, check if all of the requisite _OSC support bits are set before calling acpi_pci_osc_control_set() for a given root complex. References: https://bugzilla.kernel.org/show_bug.cgi?id=20232Reported-by:
Ozan Caglayan <ozan@pardus.org.tr> Tested-by:
Ozan Caglayan <ozan@pardus.org.tr> Signed-off-by:
Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
- 11 Nov, 2010 1 commit
-
-
Martin Wilck authored
The checks for valid mmaps of PCI resources made through /proc/bus/pci files that were introduced in 9eff02e2 have several problems: 1. mmap() calls on /proc/bus/pci files are made with real file offsets > 0, whereas under /sys/bus/pci/devices, the start of the resource corresponds to offset 0. This may lead to false negatives in pci_mmap_fits(), which implicitly assumes the /sys/bus/pci/devices layout. 2. The loop in proc_bus_pci_mmap doesn't skip empty resouces. This leads to false positives, because pci_mmap_fits() doesn't treat empty resources correctly (the calculated size is 1 << (8*sizeof(resource_size_t)-PAGE_SHIFT) in this case!). 3. If a user maps resources with BAR > 0, pci_mmap_fits will emit bogus WARNINGS for the first resources that don't fit until the correct one is found. On many controllers the first 2-4 BARs are used, and the others are empty. In this case, an mmap attempt will first fail on the non-empty BARs (including the "right" BAR because of 1.) and emit bogus WARNINGS because of 3., and finally succeed on the first empty BAR because of 2. This is certainly not the intended behaviour. This patch addresses all 3 issues. Updated with an enum type for the additional parameter for pci_mmap_fits(). Cc: stable@kernel.org Signed-off-by:
Martin Wilck <martin.wilck@ts.fujitsu.com> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
- 18 Oct, 2010 1 commit
-
-
Matthew Garrett authored
It's helpful to have some extra PCI power management functions available to platform code, so move the declarations to an exported header. Acked-by:
Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by:
Matthew Garrett <mjg@redhat.com> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
- 09 Sep, 2010 1 commit
-
-
Cam Macdonell authored
This fixes the prototype for both pci_resource_alignment() and pci_sriov_resource_alignment(). Patch started as debugging effort from Cam Macdonell. Cc: Cam Macdonell <cam@cs.ualberta.ca> Cc: Avi Kivity <avi@redhat.com> [chrisw: add iov bits] Signed-off-by:
Chris Wright <chrisw@sous-sol.org> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
- 24 Aug, 2010 1 commit
-
-
Rafael J. Wysocki authored
Introduce a function allowing the caller to check whether to try to enable PCIe AER. Signed-off-by:
Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
- 02 Aug, 2010 1 commit
-
-
Narendra K authored
This patch fixes the below warnings introduced by the commit 911e1c9b ("PCI: export SMBIOS provided firmware instance and label to sysfs"). drivers/pci/pci.h: In function ‘pci_create_firmware_label_files’: drivers/pci/pci.h:16: warning: ‘return’ with a value, in function returning void drivers/pci/pci.h: In function ‘pci_remove_firmware_label_files’: drivers/pci/pci.h:18: warning: ‘return’ with a value, in function returning void The warnings are seen because of the below code, doing a retun 0 from the functions 'pci_create_firmware_label_files' and 'pci_remove_firmware_label_files' defined as void. +#ifndef CONFIG_DMI +static inline void pci_create_firmware_label_files(struct pci_dev *pdev) +{ return 0; } +static inline void pci_remove_firmware_label_files(struct pci_dev *pdev) +{ return 0; } Signed-off-by:
Narendra K <narendra_k@dell.com> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
- 30 Jul, 2010 1 commit
-
-
Narendra K authored
This patch exports SMBIOS provided firmware instance and label of onboard PCI devices to sysfs. New files are: /sys/bus/pci/devices/.../label which contains the firmware name for the device in question, and /sys/bus/pci/devices/.../index which contains the firmware device type instance for the given device. Signed-off-by:
Jordan Hargrave <jordan_hargrave@dell.com> Signed-off-by:
Narendra K <narendra_k@dell.com> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
- 18 Jul, 2010 1 commit
-
-
Rafael J. Wysocki authored
One of the arguments during the suspend blockers discussion was that the mainline kernel didn't contain any mechanisms making it possible to avoid races between wakeup and system suspend. Generally, there are two problems in that area. First, if a wakeup event occurs exactly when /sys/power/state is being written to, it may be delivered to user space right before the freezer kicks in, so the user space consumer of the event may not be able to process it before the system is suspended. Second, if a wakeup event occurs after user space has been frozen, it is not generally guaranteed that the ongoing transition of the system into a sleep state will be aborted. To address these issues introduce a new global sysfs attribute, /sys/power/wakeup_count, associated with a running counter of wakeup events and three helper functions, pm_stay_awake(), pm_relax(), and pm_wakeup_event(), that may be used by kernel subsystems to control the behavior of this attribute and to request the PM core to abort system transitions into a sleep state already in progress. The /sys/power/wakeup_count file may be read from or written to by user space. Reads will always succeed (unless interrupted by a signal) and return the current value of the wakeup events counter. Writes, however, will only succeed if the written number is equal to the current value of the wakeup events counter. If a write is successful, it will cause the kernel to save the current value of the wakeup events counter and to abort the subsequent system transition into a sleep state if any wakeup events are reported after the write has returned. [The assumption is that before writing to /sys/power/state user space will first read from /sys/power/wakeup_count. Next, user space consumers of wakeup events will have a chance to acknowledge or veto the upcoming system transition to a sleep state. Finally, if the transition is allowed to proceed, /sys/power/wakeup_count will be written to and if that succeeds, /sys/power/state will be written to as well. Still, if any wakeup events are reported to the PM core by kernel subsystems after that point, the transition will be aborted.] Additionally, put a wakeup events counter into struct dev_pm_info and make these per-device wakeup event counters available via sysfs, so that it's possible to check the activity of various wakeup event sources within the kernel. To illustrate how subsystems can use pm_wakeup_event(), make the low-level PCI runtime PM wakeup-handling code use it. Signed-off-by:
Rafael J. Wysocki <rjw@sisk.pl> Acked-by:
Jesse Barnes <jbarnes@virtuousgeek.org> Acked-by:
Greg Kroah-Hartman <gregkh@suse.de> Acked-by:
markgross <markgross@thegnar.org> Reviewed-by:
Alan Stern <stern@rowland.harvard.edu>
-
- 11 May, 2010 1 commit
-
-
Bill Pemberton authored
Fix sparse warning: drivers/pci/pci.h:247:25: error: dubious one-bit signed bitfield Signed-off-by:
Bill Pemberton <wfp5p@virginia.edu> CC: linux-pci@vger.kernel.org Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- 23 Feb, 2010 4 commits
-
-
Rafael J. Wysocki authored
Introduce run-time PM callbacks for the PCI bus type. Make the new callbacks work in analogy with the existing system sleep PM callbacks, so that the drivers already converted to struct dev_pm_ops can use their suspend and resume routines for run-time PM without modifications. Signed-off-by:
Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
Rafael J. Wysocki authored
Although the majority of PCI devices can generate PMEs that in principle may be used to wake up devices suspended at run time, platform support is generally necessary to convert PMEs into wake-up events that can be delivered to the kernel. If ACPI is used for this purpose, PME signals generated by a PCI device will trigger the ACPI GPE associated with the device to generate an ACPI wake-up event that we can set up a handler for, provided that everything is configured correctly. Unfortunately, the subset of PCI devices that have GPEs associated with them is quite limited. The devices without dedicated GPEs have to rely on the GPEs associated with other devices (in the majority of cases their upstream bridges and, possibly, the root bridge) to generate ACPI wake-up events in response to PME signals from them. Add ACPI platform support for PCI PME wake-up: o Add a framework making is possible to use ACPI system notify handlers for run-time PM. o Add new PCI platform callback ->run_wake() to struct pci_platform_pm_ops allowing us to enable/disable the platform to generate wake-up events for given device. Implemet this callback for the ACPI platform. o Define ACPI wake-up handlers for PCI devices and PCI root buses and make the PCI-ACPI binding code register wake-up notifiers for all PCI devices present in the ACPI tables. o Add function pci_dev_run_wake() which can be used by PCI drivers to check if given device is capable of generating wake-up events at run time. Developed in cooperation with Matthew Garrett <mjg@redhat.com>. Signed-off-by:
Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
Rafael J. Wysocki authored
Add function pci_check_pme_status() that will check the PME status bit of given device and clear it along with the PME enable bit. It will be necessary for PCI run-time power management. Based on a patch from Shaohua Li <shaohua.li@intel.com> Signed-off-by:
Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
Rafael J. Wysocki authored
Currently, drivers/pci/quirks.c is built unconditionally, but if CONFIG_PCI_QUIRKS is unset, the only things actually built in this file are definitions of global variables and empty functions (due to the #ifdef CONFIG_PCI_QUIRKS embracing all of the code inside the file). This is not particularly nice and if someone overlooks the #ifdef CONFIG_PCI_QUIRKS, build errors are introduced. To clean that up, move the definitions of the global variables in quirks.c that are always built to pci.c, move the definitions of the empty functions (compiled when CONFIG_PCI_QUIRKS is unset) to headers (additionally make these functions static inline) and modify drivers/pci/Makefile so that quirks.c is only built if CONFIG_PCI_QUIRKS is set. Signed-off-by:
Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
- 31 Dec, 2009 1 commit
-
-
Rafael J. Wysocki authored
After commit b9c3b266 ("PCI: support device-specific reset methods") the kernel build is broken if CONFIG_PCI_QUIRKS is unset. Fix this by moving pci_dev_specific_reset() to drivers/pci/quirks.c and providing an empty replacement for !CONFIG_PCI_QUIRKS builds. Signed-off-by:
Rafael J. Wysocki <rjw@sisk.pl> Reported-by:
Ingo Molnar <mingo@elte.hu> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 16 Dec, 2009 1 commit
-
-
Dexuan Cui authored
Add a new type of quirk for resetting devices at pci_dev_reset time. This is necessary to handle device with nonstandard reset procedures, especially useful for guest drivers. Signed-off-by:
Yu Zhao <yu.zhao@intel.com> Signed-off-by:
Dexuan Cui <dexuan.cui@intel.com> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-
- 04 Nov, 2009 1 commit
-
-
Allen Kay authored
Note: dom0 checking in v4 has been separated out into 2/2. This patch enables P2P upstream forwarding in ACS capable PCIe switches. It solves two potential problems in virtualization environment where a PCIe device is assigned to a guest domain using a HW iommu such as VT-d: 1) Unintentional failure caused by guest physical address programmed into the device's DMA that happens to match the memory address range of other downstream ports in the same PCIe switch. This causes the PCI transaction to go to the matching downstream port instead of go to the root complex to get translated by VT-d as it should be. 2) Malicious guest software intentionally attacks another downstream PCIe device by programming the DMA address into the assigned device that matches memory address range of the downstream PCIe port. We are in process of implementing device filtering software in KVM/XEN management software to allow device assignment of PCIe devices behind a PCIe switch only if it has ACS capability and with the P2P upstream forwarding bits enabled. This patch is intended to work for both KVM and Xen environments. Signed-off-by:
Allen Kay <allen.m.kay@intel.com> Reviewed-by:
Mathew Wilcox <willy@linux.intel.com> Reviewed-by:
Chris Wright <chris@sous-sol.org> Signed-off-by:
Jesse Barnes <jbarnes@virtuousgeek.org>
-