linux-kernel-test/drivers/pci
Dean Nelson bdc2bda7c4 PCI: fix access of PCI_X_CMD by pcix get and set mmrbc functions
An e1000 driver on a system with a PCI-X bus was always being returned
a value of 135 from both pcix_get_mmrbc() and pcix_set_mmrbc(). This
value reflects an error return of PCIBIOS_BAD_REGISTER_NUMBER from
pci_bus_read_config_dword(,, cap + PCI_X_CMD,).

This is because for a dword, the following portion of the PCI_OP_READ()
macro:

	if (PCI_##size##_BAD) return PCIBIOS_BAD_REGISTER_NUMBER;

expands to:

	if (pos & 3) return PCIBIOS_BAD_REGISTER_NUMBER;

And is always true for 'cap + PCI_X_CMD', which is 0xe4 + 2 = 0xe6. ('cap' is
the result of calling pci_find_capability(, PCI_CAP_ID_PCIX).)

The same problem exists for pci_bus_write_config_dword(,, cap + PCI_X_CMD,).
In both cases, instead of calling _dword(), _word() should be called.

Cc: stable@kernel.org
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-03-19 12:40:22 -07:00
..
hotplug Merge branches 'battery-2.6.34', 'bugzilla-10805', 'bugzilla-14668', 'bugzilla-531916-power-state', 'ht-warn-2.6.34', 'pnp', 'processor-rename', 'sony-2.6.34', 'suse-bugzilla-531547', 'tz-check', 'video' and 'misc-2.6.34' into release 2010-03-14 21:30:17 -04:00
pcie PM: Allow PCI devices to suspend/resume asynchronously 2010-02-26 20:39:12 +01:00
.gitignore
access.c PCI: Add pci_bus_set_ops 2009-06-16 14:29:33 -07:00
bus.c Driver core: create lock/unlock functions for struct device 2010-03-07 17:04:52 -08:00
dmar.c Merge git://git.infradead.org/iommu-2.6 2009-12-16 10:11:38 -08:00
hotplug-pci.c
hotplug.c
htirq.c Merge branch 'x86/apic' into irq/numa 2009-05-12 12:17:36 +02:00
intel-iommu.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-12-30 13:13:24 -08:00
intr_remapping.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-12-30 13:13:24 -08:00
intr_remapping.h intr-remap: generic support for remapping HPET MSIs 2009-08-27 23:33:20 +02:00
ioapic.c PCI hotplug: move IOAPIC support from acpiphp to ioapic driver 2009-11-04 13:06:39 -08:00
iov.c pci: Add SR-IOV convenience functions and macros 2010-02-12 16:56:07 -08:00
iova.c intel-iommu: Remove superfluous iova_alloc_lock from IOVA code 2009-07-15 08:17:02 +01:00
irq.c
Kconfig PCI: push deprecated pci_find_device() function to last user 2010-02-22 16:17:01 -08:00
Makefile microblaze: Enable PCI, missing files 2010-03-11 14:04:27 +01:00
msi.c PCI MSI: Style cleanups 2009-09-09 13:29:35 -07:00
msi.h PCI MSI: shorten PCI_MSIX_ENTRY_* symbol names 2009-06-29 12:15:19 -07:00
pci-acpi.c Merge branch 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2010-03-01 10:36:22 -08:00
pci-driver.c PCI PM: Run-time callbacks for PCI bus type 2010-02-22 16:21:19 -08:00
pci-stub.c PCI: pci-stub: add pci_stub.ids parameter 2009-09-09 13:44:34 -07:00
pci-sysfs.c sysfs: fix for thinko with sysfs_bin_attr_init() 2010-03-07 17:04:52 -08:00
pci.c PCI: fix access of PCI_X_CMD by pcix get and set mmrbc functions 2010-03-19 12:40:22 -07:00
pci.h PCI PM: Run-time callbacks for PCI bus type 2010-02-22 16:21:19 -08:00
probe.c PM: Allow PCI devices to suspend/resume asynchronously 2010-02-26 20:39:12 +01:00
proc.c
quirks.c ricoh_mmc: port from driver to pci quirk 2010-03-06 11:26:36 -08:00
remove.c PCI: eliminate redundant pci_stop_dev() call from pci_destroy_dev() 2009-06-11 12:04:19 -07:00
rom.c PCI: fix rom.c kernel-doc warning 2009-02-13 12:01:56 -08:00
search.c PCI: change PCI nomenclature in drivers/pci/ (comment changes) 2009-12-16 13:37:53 -08:00
setup-bus.c pci: don't reassign to ROM res if it is not going to be enabled 2010-03-01 07:41:55 -08:00
setup-irq.c
setup-res.c PCI: improve discovery/configuration messages 2009-11-04 13:06:44 -08:00
slot.c Driver core: Constify struct sysfs_ops in struct kobj_type 2010-03-07 17:04:49 -08:00
syscall.c headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
vpd.c pci: Add helper to search for VPD keywords 2010-02-28 00:43:33 -08:00