summaryrefslogtreecommitdiffstats
path: root/drivers/pci
Commit message (Collapse)AuthorAgeFilesLines
* copyright owner and author clean up for intel iommu and related filesmark gross2008-02-235-11/+16
| | | | | | | | | | The following is a clean up and correction of the copyright holding entities for the files associated with the intel iommu code. Signed-off-by: <mgross@linux.intel.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* PM: Introduce PM_EVENT_HIBERNATE callback stateRafael J. Wysocki2008-02-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | During the last step of hibernation in the "platform" mode (with the help of ACPI) we use the suspend code, including the devices' ->suspend() methods, to prepare the system for entering the ACPI S4 system sleep state. But at least for some devices the operations performed by the ->suspend() callback in that case must be different from its operations during regular suspend. For this reason, introduce the new PM event type PM_EVENT_HIBERNATE and pass it to the device drivers' ->suspend() methods during the last phase of hibernation, so that they can distinguish this case and handle it as appropriate. Modify the drivers that handle PM_EVENT_SUSPEND in a special way and need to handle PM_EVENT_HIBERNATE in the same way. These changes are necessary to fix a hibernation regression related to the i915 driver (ref. http://lkml.org/lkml/2008/2/22/488). Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Tested-by: Jeff Chua <jeff.chua.linux@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'release' of ↵Linus Torvalds2008-02-211-2/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (26 commits) PM: Make suspend_device() static PCI ACPI: Fix comment describing acpi_pci_choose_state Hibernation: Handle DEBUG_PAGEALLOC on x86 ACPI: fix build warning ACPI: TSC breaks atkbd suspend ACPI: remove is_processor_present prototype acer-wmi: Add DMI match for mail LED on Acer TravelMate 4200 series ACPI: sparse fix, replace macro with static function ACPI: thinkpad-acpi: add tablet-mode reporting ACPI: thinkpad-acpi: minor hotkey_radio_sw fixes ACPI: thinkpad-acpi: improve thinkpad-acpi input device documentation ACPI: thinkpad-acpi: issue input events for tablet swivel events ACPI: thinkpad-acpi: make the video output feature optional ACPI: thinkpad-acpi: synchronize input device switches ACPI: thinkpad-acpi: always track input device open/close ACPI: thinkpad-acpi: trivial fix to documentation ACPI: thinkpad-acpi: trivial fix to module_desc typo intel_menlo: extract return values using PTR_ERR ACPI video: check for error from thermal_cooling_device_register ACPI thermal: extract return values using PTR_ERR ...
| *-. Merge branches 'release', 'bugzilla-9916', 'bugzilla-9982', 'bugzilla-9989', ↵Len Brown2008-02-211-2/+1
| |\ \ | | | | | | | | | | | | 'misc', 'suspend', 'thermal', 'thinkpad' and 'tsc' into release
| | | * PCI ACPI: Fix comment describing acpi_pci_choose_stateRafael J. Wysocki2008-02-211-2/+0
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | The last line of the comment preceding the definition of acpi_pci_choose_state() is incorrect. Remove it. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Len Brown <len.brown@intel.com>
| | * kernel-doc: fix pci-acpi warningRandy Dunlap2008-02-151-0/+1
| |/ | | | | | | | | | | | | | | Fix PCI kernel-doc warning: Warning(linux-2.6.24-git12//drivers/pci/pci-acpi.c:166): No description found for parameter 'hid' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | PCI: Fix wrong reference counter check for proc_dir_entryKenji Kaneshige2008-02-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix wrong counter check for proc_dir_entry in pci_proc_detach_device(). The pci_proc_detach_device() returns with -EBUSY before calling remove_proc_entry() if the reference counter of proc_dir_entry is not 0. But this check is wrong and pci_proc_detach_device() always fails because the reference counter of proc_dir_entry is initialized with 1 at creating time and decremented in remove_proc_entry(). This bug cause strange behaviour as followings: - Accessing /proc/bus/pci/XXXX/YY file after hot-removing pci adapter card causes kernel panic. - Repeating hot-add/hot-remove of pci adapter card increases files with the same name under /proc/bus/pci/XXXX/ directory. For example: # pwd /proc/bus/pci/0002:09 # ls 01.0 # for i in `seq 5` > do > echo 0 > /sys/bus/pci/slots/0009_0032/power > echo 1 > /sys/bus/pci/slots/0009_0032/power > done # ls 01.0 01.0 01.0 01.0 01.0 01.0 The pci_proc_detach_device() should check if the reference counter is not larger than 1 instead. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | PCI: fix up setup-bus.c #ifdefAndrew Morton2008-02-211-4/+2
| | | | | | | | | | | | | | | | | | Use upper_32_bits(): no code changes, one less ifdef. Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | PCI: don't load acpi_php when acpi is disabledYinghai Lu2008-02-211-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When acpi=off and pci=nomsi, don't load acpiphp. Fixes this: pci_hotplug: PCI Hot Plug PCI Core version: 0.5 acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 ACPI Exception (utmutex-0263): AE_BAD_PARAMETER, Thread FFFF81103CC54000 could not acquire Mutex [1] [20070126] [akpm@linux-foundation.org: export acpi_pci_disabled for acpiphp.ko] [akpm@linux-foundation.org: fix return statement] Signed-off-by: Yinghai Lu <yinghai.lu@sun.com> Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | PCI: quirks: set 'En' bit of MSI Mapping for devices onHT-based nvidia platformPeer Chen2008-02-211-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to HT spec, to get message interrupt from devices mapped to HT interrupt message, the 'En' bit of MSI Mapping capability need to be set. The patch do this setting in quirks code for the devices on HT-based nvidia platform. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Andy Currid <acurrid@nvidia.com> Signed-off-by: Peer Chen <pchen@nvidia.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | PCI: kernel-doc: fix pci-acpi warningRandy Dunlap2008-02-211-0/+1
| | | | | | | | | | | | | | | | | | Fix PCI kernel-doc warning: Warning(linux-2.6.24-git12//drivers/pci/pci-acpi.c:166): No description found for parameter 'hid' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | PCI: AMD SATA IDE mode quirkCrane Cai2008-02-211-7/+10
| | | | | | | | | | | | | | | | | | | | | | PCI: modify SATA IDE mode quirk When initialize and resume, SB600/700/800 need to set SATA mode correctly. Signed-off-by: Crane Cai <crane.cai@amd.com> Acked-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | PCI: hotplug: acpiphp_ibm: Remove get device informationGary Hade2008-02-211-16/+17
|/ | | | | | | | | | | | | | | drivers/pci/hotplug/acpiphp_ibm.c:ibm_find_acpi_device() is not large enough to accommodate data returned by the _CID method executed from acpi_get_object_info(). This patch eliminates the problem by letting ACPI code (instead of driver code) determine and obtain a correctly sized buffer. Signed-off-by: Gary Hade <garyhade@us.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* mn10300: add the MN10300/AM33 architecture to the kernelDavid Howells2008-02-081-0/+1
| | | | | | | | | | | | | | | | Add architecture support for the MN10300/AM33 CPUs produced by MEI to the kernel. This patch also adds board support for the ASB2303 with the ASB2308 daughter board, and the ASB2305. The only processor supported is the MN103E010, which is an AM33v2 core plus on-chip devices. [akpm@linux-foundation.org: nuke cvs control strings] Signed-off-by: Masakazu Urade <urade.masakazu@jp.panasonic.com> Signed-off-by: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* intel-iommu: fault_reason index cleanupmark gross2008-02-081-6/+5
| | | | | | | | | | | | | Fix an off by one bug in the fault reason string reporting function, and clean up some of the code around this buglet. [akpm@linux-foundation.org: cleanup] Signed-off-by: mark gross <mgross@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* intel-iommu: PMEN supportmark gross2008-02-082-1/+24
| | | | | | | | | | | | | | | Add support for protected memory enable bits by clearing them if they are set at startup time. Some future boot loaders or firmware could have this bit set after it loads the kernel, and it needs to be cleared if DMA's are going to happen effectively. Signed-off-by: mark gross <mgross@intel.com> Acked-by: Muli Ben-Yehuda <muli@il.ibm.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Genericizing iova.[ch]David Miller2008-02-065-20/+23
| | | | | | | | | | | | | | | | I would like to potentially move the sparc64 IOMMU code over to using the nice new drivers/pci/iova.[ch] code for free area management.. In order to do that we have to detach the IOMMU page size assumptions which only really need to exist in the intel-iommu.[ch] code. This patch attempts to implement that. [akpm@linux-foundation.org: build fix] Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* iommu sg merging: PCI: add dma segment boundary supportFUJITA Tomonori2008-02-052-0/+9
| | | | | | | | | | | | | | | This adds PCI's accessor for segment_boundary_mask in device_dma_parameters. The default segment_boundary is set to 0xffffffff, same to the block layer's default value (and the scsi mid layer uses the same value). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Greg KH <greg@kroah.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* iommu sg merging: PCI: add device_dma_parameters supportFUJITA Tomonori2008-02-052-0/+11
| | | | | | | | | | | | | | | This adds struct device_dma_parameters in struct pci_dev and properly sets up a pointer in struct device. The default max_segment_size is set to 64K, same to the block layer's default value. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Mostly-acked-by: Jeff Garzik <jeff@garzik.org> Cc: James Bottomley <James.Bottomley@steeleye.com> Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* PCI: fix 4x section mismatch warningsSam Ravnborg2008-02-022-4/+4
| | | | | | | | | | | | | | | | | | | | | | The following warnings were issued during build of drivers/pci with an allyesconfig build: WARNING: o-x86_64/drivers/pci/built-in.o(.text+0xdaf): Section mismatch in reference from the function pci_add_new_bus() to the function .devinit.text:pci_alloc_child_bus() WARNING: o-x86_64/drivers/pci/built-in.o(.text+0x15e2): Section mismatch in reference from the function pci_scan_single_device() to the function .devinit.text:pci_scan_device() WARNING: o-x86_64/drivers/pci/built-in.o(.text+0x1b0c5): Section mismatch in reference from the function pci_bus_assign_resources() to the function .devinit.text:pci_setup_bridge() WARNING: o-x86_64/drivers/pci/built-in.o(.text+0x1b32d): Section mismatch in reference from the function pci_bus_size_bridges() to the function .devinit.text:pci_bus_size_cardbus() Investigating each case closer it looked like all referred functions are only used in the init phase or during hotplug. So to avoid wasting too much memory in the non-hotplug case the simpler fix was to allow the fuctions to use code/data from the __devinit sections. This was done in all four case by adding the __ref annotation. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Adrian Bunk <bunk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* PCI: fix section mismatch warnings referring to pci_do_scan_busSam Ravnborg2008-02-023-15/+23
| | | | | | | | | | | | | | | Fix following warnings: WARNING: o-x86_64/drivers/pci/built-in.o(.text+0xb054): Section mismatch in reference from the function cpci_configure_slot() to the function .devinit.text:pci_do_scan_bus() WARNING: o-x86_64/drivers/pci/built-in.o(.text+0x153ab): Section mismatch in reference from the function shpchp_configure_device() to the function .devinit.text:pci_do_scan_bus() WARNING: o-x86_64/drivers/pci/built-in.o(__ksymtab+0xc0): Section mismatch in reference from the variable __ksymtab_pci_do_scan_bus to the function .devinit.text:pci_do_scan_bus() PCI hotplug were the only user of pci_do_scan_bus() so moving this function to a separate file that is build only when we enable CONFIG_HOTPLUG_PCI. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Adrian Bunk <bunk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Revert "PCI: PCIE ASPM support"Greg Kroah-Hartman2008-02-027-843/+0
| | | | | | | | | | | This reverts commit 6c723d5bd89f03fc3ef627d50f89ade054d2ee3b. It caused build errors on non-x86 platforms, config file confusion, and even some boot errors on some x86-64 boxes. All around, not quite ready for prime-time :( Cc: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6Linus Torvalds2008-02-0238-635/+1714
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6: (64 commits) PCI: make pci_bus a struct device PCI: fix codingstyle issues in include/linux/pci.h PCI: fix codingstyle issues in drivers/pci/pci.h PCI: PCIE ASPM support PCI: Fix fakephp deadlock PCI: modify SB700 SATA MSI quirk PCI: Run ACPI _OSC method on root bridges only PCI ACPI: AER driver should only register PCIe devices with _OSC PCI ACPI: Added a function to register _OSC with only PCIe devices. PCI: constify function pointer tables PCI: Convert drivers/pci/proc.c to use unlocked_ioctl pciehp: block new requests from the device before power off pciehp: workaround against Bad DLLP during power off pciehp: wait for 1000ms before LED operation after power off PCI: Remove pci_enable_device_bars() from documentation PCI: Remove pci_enable_device_bars() PCI: Remove users of pci_enable_device_bars() PCI: Add pci_enable_device_{io,mem} intefaces PCI: avoid save the same type of cap multiple times PCI: correctly initialize a structure for pcie_save_pcix_state() ...
| * PCI: make pci_bus a struct deviceGreg Kroah-Hartman2008-02-015-51/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the pci_bus class device to be a real struct device and at the same time, place it in the device tree in the correct location. Note, the old "bridge" symlink is now gone, but this was a non-standard link and no userspace program used it. If you need to determine the device that the bus is on, follow the standard device symlink, or walk up the device tree. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: fix codingstyle issues in drivers/pci/pci.hGreg Kroah-Hartman2008-02-011-3/+5
| | | | | | | | | | | | Fixes a few coding style issues in the internal pci.h file Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: PCIE ASPM supportShaohua Li2008-02-017-0/+843
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PCI Express ASPM defines a protocol for PCI Express components in the D0 state to reduce Link power by placing their Links into a low power state and instructing the other end of the Link to do likewise. This capability allows hardware-autonomous, dynamic Link power reduction beyond what is achievable by software-only controlled power management. However, The device should be configured by software appropriately. Enabling ASPM will save power, but will introduce device latency. This patch adds ASPM support in Linux. It introduces a global policy for ASPM, a sysfs file /sys/module/pcie_aspm/parameters/policy can control it. The interface can be used as a boot option too. Currently we have below setting: -default, BIOS default setting -powersave, highest power saving mode, enable all available ASPM state and clock power management -performance, highest performance, disable ASPM and clock power management By default, the 'default' policy is used currently. In my test, power difference between powersave mode and performance mode is about 1.3w in a system with 3 PCIE links. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: Fix fakephp deadlockIan Abbott2008-02-011-4/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the fakephp driver is used to emulate removal of a PCI device by writing text string "0" to the "power" sysfs attribute file, this causes its parent directory and its contents (including the "power" file) to be deleted before the write operation returns. Unfortunately, it ends up in a deadlock waiting for itself to complete. The deadlock is as follows: sysfs_write_file calls flush_write_buffer which calls sysfs_get_active_two before calling power_write_file in pci_hotplug_core.c via the sysfs store operation. The power_write_file function calls disable_slot in fakephp.c via the slot operation. The disable_slot function calls remove_slot which calls pci_hp_deregister (back in pci_hotplug_core.c) which calls fs_remove_slot which calls sysfs_remove_file to remove the "power" file. The sysfs_remove_file function calls sysfs_hash_and_remove which calls sysfs_addrm_finish which calls sysfs_deactivate. The sysfs_deactivate function sees that something has an active reference on the sysfs_dirent (from the previous call to sysfs_get_active_two back up the call stack somewhere) so waits for the active reference to go away, which is of course impossible. The problem has been present since 2.6.21. This patch breaks the deadlock by queuing work queue items on a single- threaded work queue to remove a slot from sysfs, and to rescan the PCI buses. There is also some protection against disabling a slot that is already being removed. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Cc: Kristen Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: modify SB700 SATA MSI quirkShane Huang2008-02-011-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | SB700 SATA MSI bug will be fixed in SB700 revision A21 at hardware level, but the SB700 revision older than A21 will also be found in the market. This patch modify the original quirk commit bc38b411fe696fad32b261f492cb4afbf1835256 instead of withdrawing it. The patch also removes quirk to 0x4395 because 0x4395 is SB800 device ID. Signed-off-by: Shane Huang <shane.huang@amd.com> Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: Run ACPI _OSC method on root bridges onlyAndrew Patterson2008-02-011-16/+6
| | | | | | | | | | | | | | | | | | | | | | | | According to the PCI Firmware Specification Revision 3.0 section 4.5, _OSC should only be called on a root brdige. Here is the relevant passage: "The _OSC interface defined in this section applies only to Host Bridge ACPI devices that originate PCI, PCI-X, or PCI Express hierarchies". Changed the code to find the parent root bridge of the device and call _OSC on that. Signed-off-by: Andrew Patterson <andrew.patterson@hp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI ACPI: AER driver should only register PCIe devices with _OSCAndrew Patterson2008-02-011-1/+1
| | | | | | | | | | | | | | | | | | AER is only used with PCIe devices so we should only check PCIe devices for _OSC support. Signed-off-by: Andrew Patterson <andrew.patterson@hp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI ACPI: Added a function to register _OSC with only PCIe devices.Andrew Patterson2008-02-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The function pci_osc_support_set() traverses every root bridge when checking for _OSC support for a capability. It quits as soon as it finds a device/bridge that doesn't support the requested capability. This won't work for systems that have mixed PCI and PCIe bridges when checking for PCIe features. I split this function into two -- pci_osc_support_set() and pcie_osc_support_set(). The latter is used when only PCIe devices should be traversed. Signed-off-by: Andrew Patterson <andrew.patterson@hp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: constify function pointer tablesJan Engelhardt2008-02-011-1/+1
| | | | | | | | | | | | Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: Convert drivers/pci/proc.c to use unlocked_ioctlMathieu Segaud2008-02-011-3/+8
| | | | | | | | | | | | | | | | | | | | Change access to inode thru file->f_dentry->d_inode, and add explicit lock/unlock_kernel() calls. Signed-off-by: Mathieu Segaud <mathieu.segaud@regala.cx> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * pciehp: block new requests from the device before power offKenji Kaneshige2008-02-011-12/+21
| | | | | | | | | | | | | | | | | | | | | | Disable Bus Master, SERR# and INTx to ensure that no new Requests will be generated from the device before turning power off, in accordance with the specification. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * pciehp: workaround against Bad DLLP during power offKenji Kaneshige2008-02-011-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set Bad DLLP Mask bit in Correctable Error Mask Register during turning power off the slot. This is the workaround against Bad DLLP error that sometimes happen during turning power off on the slot which conforms to PCI Express 1.0a spec. The cause of this error seems that PCI Express 1.0a spec doesn't have the following consideration that was added to PCI Express 1.1 spec. "If the port is associated with a hot-pluggable slot (Hot-Plug Capable bit in the Slot Capabilities register set to 1b), and Power Controller Control bit in Slot Control register is 1b(Off), then any transition to DL Inactive must not be considered an error." Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * pciehp: wait for 1000ms before LED operation after power offKenji Kaneshige2008-02-012-12/+7
| | | | | | | | | | | | | | | | | | | | After turning power off, we must wait for at least 1 second *before* LED operation. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: Remove pci_enable_device_bars()Benjamin Herrenschmidt2008-02-011-24/+0
| | | | | | | | | | | | | | | | | | Now that all in-tree users are gone, this removes pci_enable_device_bars() completely. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: Add pci_enable_device_{io,mem} intefacesBenjamin Herrenschmidt2008-02-011-1/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pci_enable_device_bars() interface isn't well suited to PCI because you can't actually enable/disable BARs individually on a device. So for example, if a device has 2 memory BARs 0 and 1, and one of them (let's say 1) has not been successfully allocated by the firmware or the kernel, then enabling memory decoding shouldn't be permitted for the entire device since it will decode whatever random address is still in that BAR 1. So a device must be either fully enabled for IO, for Memory, or for both. Not on a per-BAR basis. This provides two new functions, pci_enable_device_io() and pci_enable_device_mem() to replace pci_enable_device_bars(). The implementation internally builds a BAR mask in order to be able to use existing arch infrastructure. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: avoid save the same type of cap multiple timesShaohua Li2008-02-011-2/+10
| | | | | | | | | | | | | | | | Avoid adding the same type of cap multiple times, otherwise we will see dead loop. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: correctly initialize a structure for pcie_save_pcix_state()Shaohua Li2008-02-011-0/+2
| | | | | | | | | | | | | | | | | | save_state->cap_nr should be correctly set, otherwise we can't find the saved cap at resume. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: fix typo in pci_save_pcix_stateShaohua Li2008-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | pci_save/store_state has multiple bugs, which will cause cap can't be saved/restored correctly. Below 3 patches fix them. fix the typo in pci_save_pcix_state Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: use dev_printk in quirk messagesbjorn.helgaas@hp.com2008-02-011-60/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert quirk printks to dev_printk(). I made the MSI disable messages a little more consistent: - always use "disabled", not "deactivated" - specify "device MSI disabled" or "subordinate MSI disabled" when disabling MSI for only a specific device or subordinate bus Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: print quirk name in debug messagesbjorn.helgaas@hp.com2008-02-011-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of printing this: PCI: Calling quirk c023b250 for 0000:00:00.0 we can print this: pci 0000:00:00.0: calling quirk 0xc023b270: quirk_cardbus_legacy+0x0/0x30() The address is superfluous because sprint_symbol() includes the address if the symbol lookup fails, but this is the same style used in do_initcalls() and pnp_fixup_device(). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: fix for quirk_e100_interrupt()Ivan Kokshaysky2008-02-011-1/+13
| | | | | | | | | | | | | | | | | | | | | | Check that the e100 is in the D0 power state. If it's not, it won't respond to MMIO accesses and we end up with master-abort machine checks on some platforms. Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: Spelling fixesJoe Perches2008-02-012-2/+2
| | | | | | | | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: drivers/pci/msi.c: move arch hooks to the topAdrian Bunk2008-02-011-46/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following problem present with older gcc versions: <-- snip --> ... CC drivers/pci/msi.o /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/pci/msi.c:692: warning: weak declaration of `arch_msi_check_device' after first use results in unspecified behavior /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/pci/msi.c:704: warning: weak declaration of `arch_setup_msi_irqs' after first use results in unspecified behavior /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/pci/msi.c:724: warning: weak declaration of `arch_teardown_msi_irqs' after first use results in unspecified behavior ... <-- snip --> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: quirk: enable MSI Mapping on HT1000Sebastien Dugue2008-02-011-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a quirk to enable the MSI mapping capability on HyperTransport bridges. Wire Broadcom's HT1000 to use the quirk. Signed-off-by: Sebastien Dugue <sebastien.dugue@bull.net> Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Andy Currid <acurrid@nvidia.com> Cc: Peer Chen <pchen@nvidia.com> Cc: Prakash Punnoor <prakash@punnoor.de> Cc: Andrew Morton <akpm@linux-foundation.org> Acked-by: Michael Chan <mchan@broadcom.com> Cc: Greg KH <greg@kroah.com> Cc: Andy Currid <acurrid@nvidia.com> Cc: Peer Chen <pchen@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: Fix warning in setup-res.c on 32-bit platforms with 64-bit resourcesBenjamin Herrenschmidt2008-02-011-2/+4
| | | | | | | | | | | | | | | | | | This adds appropriate casts to avoid a warning and print the correct values in pr_debug. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI: Fix bus resource assignment on 32 bits with 64b resourcesBenjamin Herrenschmidt2008-02-011-24/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | The current pci_assign_unassigned_resources() code doesn't work properly on 32 bits platforms with 64 bits resources. The main reason is the use of unsigned long in various places instead of resource_size_t. This is a pre-requisite for making powerpc use the generic code instead of its own half-useful implementation. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * PCI Hotplug: PCIeHP: Fix some whitespace damageRolf Eike Beer2008-02-011-2/+1
| | | | | | | | | | | | | | | | | | PCIeHP: Fix some whitespace damage Signed-off-by: Rolf Eike Beer <eike-hotplug@sf-tec.de> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>