aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-09 13:21:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-09 13:21:44 -0400
commite15e6119062d20cc96f95c8b345e361589a90244 (patch)
tree101a476be5527d88eacaa828956d7f3a9a7cb316
parenta637b0d45947df686979b85361ad5bfa9d19fdd3 (diff)
parente253aaf0af51c1e4dc7dd3b26ea8e666bf9a2d8d (diff)
Merge tag 'pci-v3.10-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI updates from Bjorn Helgaas: "MSI: PCI: Set ->mask_pos correctly Hotplug: PCI: Delay final fixups until resources are assigned Moorestown: x86/pci/mrst: Use configuration mechanism 1 for 00:00.0, 00:02.0, 00:03.0" * tag 'pci-v3.10-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: Delay final fixups until resources are assigned x86/pci/mrst: Use configuration mechanism 1 for 00:00.0, 00:02.0, 00:03.0 PCI: Set ->mask_pos correctly
-rw-r--r--arch/x86/pci/mrst.c10
-rw-r--r--drivers/pci/bus.c1
-rw-r--r--drivers/pci/msi.c6
-rw-r--r--drivers/pci/probe.c1
4 files changed, 11 insertions, 7 deletions
diff --git a/arch/x86/pci/mrst.c b/arch/x86/pci/mrst.c
index 6eb18c42a28a..0e0fabf17342 100644
--- a/arch/x86/pci/mrst.c
+++ b/arch/x86/pci/mrst.c
@@ -141,6 +141,11 @@ static int pci_device_update_fixed(struct pci_bus *bus, unsigned int devfn,
141 */ 141 */
142static bool type1_access_ok(unsigned int bus, unsigned int devfn, int reg) 142static bool type1_access_ok(unsigned int bus, unsigned int devfn, int reg)
143{ 143{
144 if (bus == 0 && (devfn == PCI_DEVFN(2, 0)
145 || devfn == PCI_DEVFN(0, 0)
146 || devfn == PCI_DEVFN(3, 0)))
147 return 1;
148
144 /* This is a workaround for A0 LNC bug where PCI status register does 149 /* This is a workaround for A0 LNC bug where PCI status register does
145 * not have new CAP bit set. can not be written by SW either. 150 * not have new CAP bit set. can not be written by SW either.
146 * 151 *
@@ -150,10 +155,7 @@ static bool type1_access_ok(unsigned int bus, unsigned int devfn, int reg)
150 */ 155 */
151 if (reg >= 0x100 || reg == PCI_STATUS || reg == PCI_HEADER_TYPE) 156 if (reg >= 0x100 || reg == PCI_STATUS || reg == PCI_HEADER_TYPE)
152 return 0; 157 return 0;
153 if (bus == 0 && (devfn == PCI_DEVFN(2, 0) 158
154 || devfn == PCI_DEVFN(0, 0)
155 || devfn == PCI_DEVFN(3, 0)))
156 return 1;
157 return 0; /* langwell on others */ 159 return 0; /* langwell on others */
158} 160}
159 161
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index 748f8f3e9ff5..32e66a6f12d9 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -174,6 +174,7 @@ int pci_bus_add_device(struct pci_dev *dev)
174 * Can not put in pci_device_add yet because resources 174 * Can not put in pci_device_add yet because resources
175 * are not assigned yet for some devices. 175 * are not assigned yet for some devices.
176 */ 176 */
177 pci_fixup_device(pci_fixup_final, dev);
177 pci_create_sysfs_dev_files(dev); 178 pci_create_sysfs_dev_files(dev);
178 179
179 dev->match_driver = true; 180 dev->match_driver = true;
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index d40bed726769..2c1075213bec 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -563,8 +563,10 @@ static int msi_capability_init(struct pci_dev *dev, int nvec)
563 entry->msi_attrib.default_irq = dev->irq; /* Save IOAPIC IRQ */ 563 entry->msi_attrib.default_irq = dev->irq; /* Save IOAPIC IRQ */
564 entry->msi_attrib.pos = dev->msi_cap; 564 entry->msi_attrib.pos = dev->msi_cap;
565 565
566 entry->mask_pos = dev->msi_cap + (control & PCI_MSI_FLAGS_64BIT) ? 566 if (control & PCI_MSI_FLAGS_64BIT)
567 PCI_MSI_MASK_64 : PCI_MSI_MASK_32; 567 entry->mask_pos = dev->msi_cap + PCI_MSI_MASK_64;
568 else
569 entry->mask_pos = dev->msi_cap + PCI_MSI_MASK_32;
568 /* All MSIs are unmasked by default, Mask them all */ 570 /* All MSIs are unmasked by default, Mask them all */
569 if (entry->msi_attrib.maskbit) 571 if (entry->msi_attrib.maskbit)
570 pci_read_config_dword(dev, entry->mask_pos, &entry->masked); 572 pci_read_config_dword(dev, entry->mask_pos, &entry->masked);
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 631aeb7d2d2d..70f10fa3c1b2 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1341,7 +1341,6 @@ void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)
1341 list_add_tail(&dev->bus_list, &bus->devices); 1341 list_add_tail(&dev->bus_list, &bus->devices);
1342 up_write(&pci_bus_sem); 1342 up_write(&pci_bus_sem);
1343 1343
1344 pci_fixup_device(pci_fixup_final, dev);
1345 ret = pcibios_add_device(dev); 1344 ret = pcibios_add_device(dev);
1346 WARN_ON(ret < 0); 1345 WARN_ON(ret < 0);
1347 1346