diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-08-14 08:58:01 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-14 08:58:01 -0400 |
commit | 51ca3c679194e7435c25b8e77b0a73c597e41ae9 (patch) | |
tree | a681dca369607ab0f371d5246b0f75140b860a8a /drivers/pci | |
parent | b55793f7528ce1b73c25b3ac8a86a6cda2a0f9a4 (diff) | |
parent | b635acec48bcaa9183fcbf4e3955616b0d4119b5 (diff) |
Merge branch 'linus' into x86/core
Conflicts:
arch/x86/kernel/genapic_64.c
include/asm-x86/kvm_host.h
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/msi.c | 5 | ||||
-rw-r--r-- | drivers/pci/pci.c | 3 | ||||
-rw-r--r-- | drivers/pci/probe.c | 54 | ||||
-rw-r--r-- | drivers/pci/quirks.c | 7 |
4 files changed, 48 insertions, 21 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 18354817173c..4a10b5624f72 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c | |||
@@ -308,9 +308,8 @@ static void __pci_restore_msi_state(struct pci_dev *dev) | |||
308 | entry->msi_attrib.masked); | 308 | entry->msi_attrib.masked); |
309 | 309 | ||
310 | pci_read_config_word(dev, pos + PCI_MSI_FLAGS, &control); | 310 | pci_read_config_word(dev, pos + PCI_MSI_FLAGS, &control); |
311 | control &= ~(PCI_MSI_FLAGS_QSIZE | PCI_MSI_FLAGS_ENABLE); | 311 | control &= ~PCI_MSI_FLAGS_QSIZE; |
312 | if (entry->msi_attrib.maskbit || !entry->msi_attrib.masked) | 312 | control |= PCI_MSI_FLAGS_ENABLE; |
313 | control |= PCI_MSI_FLAGS_ENABLE; | ||
314 | pci_write_config_word(dev, pos + PCI_MSI_FLAGS, control); | 313 | pci_write_config_word(dev, pos + PCI_MSI_FLAGS, control); |
315 | } | 314 | } |
316 | 315 | ||
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 0a3d856833fc..c9884bba22de 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -1060,7 +1060,7 @@ bool pci_pme_capable(struct pci_dev *dev, pci_power_t state) | |||
1060 | * The caller must verify that the device is capable of generating PME# before | 1060 | * The caller must verify that the device is capable of generating PME# before |
1061 | * calling this function with @enable equal to 'true'. | 1061 | * calling this function with @enable equal to 'true'. |
1062 | */ | 1062 | */ |
1063 | static void pci_pme_active(struct pci_dev *dev, bool enable) | 1063 | void pci_pme_active(struct pci_dev *dev, bool enable) |
1064 | { | 1064 | { |
1065 | u16 pmcsr; | 1065 | u16 pmcsr; |
1066 | 1066 | ||
@@ -1941,6 +1941,7 @@ EXPORT_SYMBOL(pci_set_power_state); | |||
1941 | EXPORT_SYMBOL(pci_save_state); | 1941 | EXPORT_SYMBOL(pci_save_state); |
1942 | EXPORT_SYMBOL(pci_restore_state); | 1942 | EXPORT_SYMBOL(pci_restore_state); |
1943 | EXPORT_SYMBOL(pci_pme_capable); | 1943 | EXPORT_SYMBOL(pci_pme_capable); |
1944 | EXPORT_SYMBOL(pci_pme_active); | ||
1944 | EXPORT_SYMBOL(pci_enable_wake); | 1945 | EXPORT_SYMBOL(pci_enable_wake); |
1945 | EXPORT_SYMBOL(pci_target_state); | 1946 | EXPORT_SYMBOL(pci_target_state); |
1946 | EXPORT_SYMBOL(pci_prepare_to_sleep); | 1947 | EXPORT_SYMBOL(pci_prepare_to_sleep); |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 7098dfb07449..a04498d390c8 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -52,27 +52,49 @@ EXPORT_SYMBOL(no_pci_devices); | |||
52 | * Some platforms allow access to legacy I/O port and ISA memory space on | 52 | * Some platforms allow access to legacy I/O port and ISA memory space on |
53 | * a per-bus basis. This routine creates the files and ties them into | 53 | * a per-bus basis. This routine creates the files and ties them into |
54 | * their associated read, write and mmap files from pci-sysfs.c | 54 | * their associated read, write and mmap files from pci-sysfs.c |
55 | * | ||
56 | * On error unwind, but don't propogate the error to the caller | ||
57 | * as it is ok to set up the PCI bus without these files. | ||
55 | */ | 58 | */ |
56 | static void pci_create_legacy_files(struct pci_bus *b) | 59 | static void pci_create_legacy_files(struct pci_bus *b) |
57 | { | 60 | { |
61 | int error; | ||
62 | |||
58 | b->legacy_io = kzalloc(sizeof(struct bin_attribute) * 2, | 63 | b->legacy_io = kzalloc(sizeof(struct bin_attribute) * 2, |
59 | GFP_ATOMIC); | 64 | GFP_ATOMIC); |
60 | if (b->legacy_io) { | 65 | if (!b->legacy_io) |
61 | b->legacy_io->attr.name = "legacy_io"; | 66 | goto kzalloc_err; |
62 | b->legacy_io->size = 0xffff; | 67 | |
63 | b->legacy_io->attr.mode = S_IRUSR | S_IWUSR; | 68 | b->legacy_io->attr.name = "legacy_io"; |
64 | b->legacy_io->read = pci_read_legacy_io; | 69 | b->legacy_io->size = 0xffff; |
65 | b->legacy_io->write = pci_write_legacy_io; | 70 | b->legacy_io->attr.mode = S_IRUSR | S_IWUSR; |
66 | device_create_bin_file(&b->dev, b->legacy_io); | 71 | b->legacy_io->read = pci_read_legacy_io; |
67 | 72 | b->legacy_io->write = pci_write_legacy_io; | |
68 | /* Allocated above after the legacy_io struct */ | 73 | error = device_create_bin_file(&b->dev, b->legacy_io); |
69 | b->legacy_mem = b->legacy_io + 1; | 74 | if (error) |
70 | b->legacy_mem->attr.name = "legacy_mem"; | 75 | goto legacy_io_err; |
71 | b->legacy_mem->size = 1024*1024; | 76 | |
72 | b->legacy_mem->attr.mode = S_IRUSR | S_IWUSR; | 77 | /* Allocated above after the legacy_io struct */ |
73 | b->legacy_mem->mmap = pci_mmap_legacy_mem; | 78 | b->legacy_mem = b->legacy_io + 1; |
74 | device_create_bin_file(&b->dev, b->legacy_mem); | 79 | b->legacy_mem->attr.name = "legacy_mem"; |
75 | } | 80 | b->legacy_mem->size = 1024*1024; |
81 | b->legacy_mem->attr.mode = S_IRUSR | S_IWUSR; | ||
82 | b->legacy_mem->mmap = pci_mmap_legacy_mem; | ||
83 | error = device_create_bin_file(&b->dev, b->legacy_mem); | ||
84 | if (error) | ||
85 | goto legacy_mem_err; | ||
86 | |||
87 | return; | ||
88 | |||
89 | legacy_mem_err: | ||
90 | device_remove_bin_file(&b->dev, b->legacy_io); | ||
91 | legacy_io_err: | ||
92 | kfree(b->legacy_io); | ||
93 | b->legacy_io = NULL; | ||
94 | kzalloc_err: | ||
95 | printk(KERN_WARNING "pci: warning: could not create legacy I/O port " | ||
96 | "and ISA memory resources to sysfs\n"); | ||
97 | return; | ||
76 | } | 98 | } |
77 | 99 | ||
78 | void pci_remove_legacy_files(struct pci_bus *b) | 100 | void pci_remove_legacy_files(struct pci_bus *b) |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 0fb365074288..9236e7f869c8 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -1756,9 +1756,14 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_VIA, 0x324e, quirk_via_cx700_pci_parking_c | |||
1756 | */ | 1756 | */ |
1757 | static void __devinit quirk_brcm_570x_limit_vpd(struct pci_dev *dev) | 1757 | static void __devinit quirk_brcm_570x_limit_vpd(struct pci_dev *dev) |
1758 | { | 1758 | { |
1759 | /* Only disable the VPD capability for 5706, 5708, and 5709 rev. A */ | 1759 | /* |
1760 | * Only disable the VPD capability for 5706, 5706S, 5708, | ||
1761 | * 5708S and 5709 rev. A | ||
1762 | */ | ||
1760 | if ((dev->device == PCI_DEVICE_ID_NX2_5706) || | 1763 | if ((dev->device == PCI_DEVICE_ID_NX2_5706) || |
1764 | (dev->device == PCI_DEVICE_ID_NX2_5706S) || | ||
1761 | (dev->device == PCI_DEVICE_ID_NX2_5708) || | 1765 | (dev->device == PCI_DEVICE_ID_NX2_5708) || |
1766 | (dev->device == PCI_DEVICE_ID_NX2_5708S) || | ||
1762 | ((dev->device == PCI_DEVICE_ID_NX2_5709) && | 1767 | ((dev->device == PCI_DEVICE_ID_NX2_5709) && |
1763 | (dev->revision & 0xf0) == 0x0)) { | 1768 | (dev->revision & 0xf0) == 0x0)) { |
1764 | if (dev->vpd) | 1769 | if (dev->vpd) |