From 8b4929e6a01620b55700e102e40e37ef02844849 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 20 Apr 2006 15:50:55 +0900 Subject: [PATCH] PCI: fix via irq SATA patch This device id improperly got added to the VIA chipset list with a previous patch. Remove it as it is not correct. Cc: Grzegorz Janoszka Cc: Jeff Garzik Signed-off-by: Greg Kroah-Hartman --- arch/i386/pci/irq.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c index 73235443fda..06dab00aaad 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, case PCI_DEVICE_ID_VIA_8233A: case PCI_DEVICE_ID_VIA_8235: case PCI_DEVICE_ID_VIA_8237: - case PCI_DEVICE_ID_VIA_8237_SATA: /* FIXME: add new ones for 8233/5 */ r->name = "VIA"; r->get = pirq_via_get; -- cgit v1.2.3 From 9b860b8c4bde5949b272968597d1426d53080532 Mon Sep 17 00:00:00 2001 From: Ingo Oeser Date: Tue, 18 Apr 2006 11:20:55 +0200 Subject: [PATCH] PCI: Documentation: no more device ids Document that we don't like to add more PCI device ids but are happy to accept PCI vendor ids for linux/include/pci_ids.h Original text from Jeff Garzik. Signed-off-by: Ingo Oeser Signed-off-by: Greg Kroah-Hartman --- Documentation/pci.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Documentation/pci.txt b/Documentation/pci.txt index 711210b38f5..66bbbf1d1ef 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 to be handled by platform and generic code, not individual drivers. -8. Obsolete functions +8. Vendor and device identifications +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +For the future, let's avoid adding device ids to include/linux/pci_ids.h. + +PCI_VENDOR_ID_xxx for vendors, and a hex constant for device ids. + +Rationale: PCI_VENDOR_ID_xxx constants are re-used, but device ids are not. + Further, device ids are arbitrary hex numbers, normally used only in a + single location, the pci_device_id table. + +9. Obsolete functions ~~~~~~~~~~~~~~~~~~~~~ There are several functions which you might come across when trying to port an old driver to the new PCI interface. They are no longer present -- cgit v1.2.3 From f01f4182597a3bb4b6fbf92e041faf7a1016f4b6 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Mon, 17 Apr 2006 04:02:54 +0200 Subject: [PATCH] PCI: fix potential resource leak in drivers/pci/msi.c The coverity checker spotted (as entry #599) that we might leak `entry' in drivers/pci/msi.c::msix_capability_init() This patch should take care of that. Signed-off-by: Jesper Juhl Signed-off-by: Greg Kroah-Hartman --- drivers/pci/msi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 2087a397ef1..9855c4c920b 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -793,8 +793,10 @@ static int msix_capability_init(struct pci_dev *dev, if (!entry) break; vector = get_msi_vector(dev); - if (vector < 0) + if (vector < 0) { + kmem_cache_free(msi_cachep, entry); break; + } j = entries[i].entry; entries[i].vector = vector; -- cgit v1.2.3 From 75cf7456dd87335f574dcd53c4ae616a2ad71a11 Mon Sep 17 00:00:00 2001 From: Chris Wedgwood Date: Tue, 18 Apr 2006 23:57:09 -0700 Subject: [PATCH] PCI quirk: VIA IRQ fixup should only run for VIA southbridges Alan Cox pointed out that the VIA 'IRQ fixup' was erroneously running on my system which has no VIA southbridge (but I do have a VIA IEEE 1394 device). This should address that. I also changed "Via IRQ" to "VIA IRQ" (initially I read Via as a capitalized via (by way/means of). Signed-off-by: Chris Wedgwood Acked-by: Jeff Garzik Signed-off-by: Greg Kroah-Hartman --- drivers/pci/quirks.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index c42ae2cf8d6..19e2b174d33 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -642,13 +642,15 @@ static void quirk_via_irq(struct pci_dev *dev) new_irq = dev->irq & 0xf; pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq); if (new_irq != irq) { - printk(KERN_INFO "PCI: Via IRQ fixup for %s, from %d to %d\n", + printk(KERN_INFO "PCI: VIA IRQ fixup for %s, from %d to %d\n", pci_name(dev), irq, new_irq); udelay(15); /* unknown if delay really needed */ pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq); } } -DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irq); +DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_irq); +DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_via_irq); +DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_5, quirk_via_irq); /* * VIA VT82C598 has its device ID settable and many BIOSes -- cgit v1.2.3