aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/msi.c4
-rw-r--r--drivers/pci/quirks.c35
2 files changed, 36 insertions, 3 deletions
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 827550d25c9e..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
@@ -865,6 +867,35 @@ static void __init quirk_eisa_bridge(struct pci_dev *dev)
865DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82375, quirk_eisa_bridge ); 867DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82375, quirk_eisa_bridge );
866 868
867/* 869/*
870 * On the MSI-K8T-Neo2Fir Board, the internal Soundcard is disabled
871 * when a PCI-Soundcard is added. The BIOS only gives Options
872 * "Disabled" and "AUTO". This Quirk Sets the corresponding
873 * Register-Value to enable the Soundcard.
874 */
875static void __init k8t_sound_hostbridge(struct pci_dev *dev)
876{
877 unsigned char val;
878
879 printk(KERN_INFO "PCI: Quirk-MSI-K8T Soundcard On\n");
880 pci_read_config_byte(dev, 0x50, &val);
881 if (val == 0x88 || val == 0xc8) {
882 pci_write_config_byte(dev, 0x50, val & (~0x40));
883
884 /* Verify the Change for Status output */
885 pci_read_config_byte(dev, 0x50, &val);
886 if (val & 0x40)
887 printk(KERN_INFO "PCI: MSI-K8T soundcard still off\n");
888 else
889 printk(KERN_INFO "PCI: MSI-K8T soundcard on\n");
890 } else {
891 printk(KERN_INFO "PCI: Unexpected Value in PCI-Register: "
892 "no Change!\n");
893 }
894
895}
896DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, k8t_sound_hostbridge);
897
898/*
868 * On ASUS P4B boards, the SMBus PCI Device within the ICH2/4 southbridge 899 * On ASUS P4B boards, the SMBus PCI Device within the ICH2/4 southbridge
869 * is not activated. The myth is that Asus said that they do not want the 900 * is not activated. The myth is that Asus said that they do not want the
870 * users to be irritated by just another PCI Device in the Win98 device 901 * users to be irritated by just another PCI Device in the Win98 device