aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/pci.txt12
-rw-r--r--arch/i386/pci/irq.c1
-rw-r--r--drivers/pci/msi.c4
-rw-r--r--drivers/pci/quirks.c6
4 files changed, 18 insertions, 5 deletions
diff --git a/Documentation/pci.txt b/Documentation/pci.txt
index 711210b38f5f..66bbbf1d1ef6 100644
--- a/Documentation/pci.txt
+++ b/Documentation/pci.txt
@@ -259,7 +259,17 @@ on the bus need to be capable of doing it, so this is something which needs
259to be handled by platform and generic code, not individual drivers. 259to be handled by platform and generic code, not individual drivers.
260 260
261 261
2628. Obsolete functions 2628. Vendor and device identifications
263~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
264For the future, let's avoid adding device ids to include/linux/pci_ids.h.
265
266PCI_VENDOR_ID_xxx for vendors, and a hex constant for device ids.
267
268Rationale: PCI_VENDOR_ID_xxx constants are re-used, but device ids are not.
269 Further, device ids are arbitrary hex numbers, normally used only in a
270 single location, the pci_device_id table.
271
2729. Obsolete functions
263~~~~~~~~~~~~~~~~~~~~~ 273~~~~~~~~~~~~~~~~~~~~~
264There are several functions which you might come across when trying to 274There are several functions which you might come across when trying to
265port an old driver to the new PCI interface. They are no longer present 275port an old driver to the new PCI interface. They are no longer present
diff --git a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c
index 73235443fda7..06dab00aaadc 100644
--- a/arch/i386/pci/irq.c
+++ b/arch/i386/pci/irq.c
@@ -591,7 +591,6 @@ static __init int via_router_probe(struct irq_router *r,
591 case PCI_DEVICE_ID_VIA_8233A: 591 case PCI_DEVICE_ID_VIA_8233A:
592 case PCI_DEVICE_ID_VIA_8235: 592 case PCI_DEVICE_ID_VIA_8235:
593 case PCI_DEVICE_ID_VIA_8237: 593 case PCI_DEVICE_ID_VIA_8237:
594 case PCI_DEVICE_ID_VIA_8237_SATA:
595 /* FIXME: add new ones for 8233/5 */ 594 /* FIXME: add new ones for 8233/5 */
596 r->name = "VIA"; 595 r->name = "VIA";
597 r->get = pirq_via_get; 596 r->get = pirq_via_get;
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 2087a397ef16..9855c4c920b8 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -793,8 +793,10 @@ static int msix_capability_init(struct pci_dev *dev,
793 if (!entry) 793 if (!entry)
794 break; 794 break;
795 vector = get_msi_vector(dev); 795 vector = get_msi_vector(dev);
796 if (vector < 0) 796 if (vector < 0) {
797 kmem_cache_free(msi_cachep, entry);
797 break; 798 break;
799 }
798 800
799 j = entries[i].entry; 801 j = entries[i].entry;
800 entries[i].vector = vector; 802 entries[i].vector = vector;
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index c42ae2cf8d64..19e2b174d33c 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -642,13 +642,15 @@ static void quirk_via_irq(struct pci_dev *dev)
642 new_irq = dev->irq & 0xf; 642 new_irq = dev->irq & 0xf;
643 pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq); 643 pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
644 if (new_irq != irq) { 644 if (new_irq != irq) {
645 printk(KERN_INFO "PCI: Via IRQ fixup for %s, from %d to %d\n", 645 printk(KERN_INFO "PCI: VIA IRQ fixup for %s, from %d to %d\n",
646 pci_name(dev), irq, new_irq); 646 pci_name(dev), irq, new_irq);
647 udelay(15); /* unknown if delay really needed */ 647 udelay(15); /* unknown if delay really needed */
648 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq); 648 pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
649 } 649 }
650} 650}
651DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irq); 651DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_irq);
652DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_irq);
653DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irq);
652 654
653/* 655/*
654 * VIA VT82C598 has its device ID settable and many BIOSes 656 * VIA VT82C598 has its device ID settable and many BIOSes