View | Details | Raw Unified | Return to bug 214931
Collapse All | Expand All

(-)a/arch/i386/pci/fixup.c (-3 / +10 lines)
Lines 115-121 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I Link Here
115
#define VIA_8363_KL133_REVISION_ID 0x81
115
#define VIA_8363_KL133_REVISION_ID 0x81
116
#define VIA_8363_KM133_REVISION_ID 0x84
116
#define VIA_8363_KM133_REVISION_ID 0x84
117
117
118
static void __devinit pci_fixup_via_northbridge_bug(struct pci_dev *d)
118
static void pci_fixup_via_northbridge_bug(struct pci_dev *d)
119
{
119
{
120
	u8 v;
120
	u8 v;
121
	u8 revision;
121
	u8 revision;
Lines 151-156 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_V Link Here
151
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8622, pci_fixup_via_northbridge_bug);
151
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8622, pci_fixup_via_northbridge_bug);
152
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8361, pci_fixup_via_northbridge_bug);
152
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8361, pci_fixup_via_northbridge_bug);
153
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8367_0, pci_fixup_via_northbridge_bug);
153
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8367_0, pci_fixup_via_northbridge_bug);
154
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8363_0, pci_fixup_via_northbridge_bug);
155
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8622, pci_fixup_via_northbridge_bug);
156
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8361, pci_fixup_via_northbridge_bug);
157
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8367_0, pci_fixup_via_northbridge_bug);
154
158
155
/*
159
/*
156
 * For some reasons Intel decided that certain parts of their
160
 * For some reasons Intel decided that certain parts of their
Lines 181-187 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I Link Here
181
 * issue another HALT within 80 ns of the initial HALT, the failure condition
185
 * issue another HALT within 80 ns of the initial HALT, the failure condition
182
 * is avoided.
186
 * is avoided.
183
 */
187
 */
184
static void __init pci_fixup_nforce2(struct pci_dev *dev)
188
static void pci_fixup_nforce2(struct pci_dev *dev)
185
{
189
{
186
	u32 val;
190
	u32 val;
187
191
Lines 204-209 static void __init pci_fixup_nforce2(str Link Here
204
	}
208
	}
205
}
209
}
206
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2, pci_fixup_nforce2);
210
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2, pci_fixup_nforce2);
211
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2, pci_fixup_nforce2);
207
212
208
/* Max PCI Express root ports */
213
/* Max PCI Express root ports */
209
#define MAX_PCIEROOT	6
214
#define MAX_PCIEROOT	6
Lines 419-425 DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_T Link Here
419
 * Prevent the BIOS trapping accesses to the Cyrix CS5530A video device
424
 * Prevent the BIOS trapping accesses to the Cyrix CS5530A video device
420
 * configuration space.
425
 * configuration space.
421
 */
426
 */
422
static void __devinit pci_early_fixup_cyrix_5530(struct pci_dev *dev)
427
static void pci_early_fixup_cyrix_5530(struct pci_dev *dev)
423
{
428
{
424
	u8 r;
429
	u8 r;
425
	/* clear 'F4 Video Configuration Trap' bit */
430
	/* clear 'F4 Video Configuration Trap' bit */
Lines 429-431 static void __devinit pci_early_fixup_cy Link Here
429
}
434
}
430
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY,
435
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY,
431
			pci_early_fixup_cyrix_5530);
436
			pci_early_fixup_cyrix_5530);
437
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY,
438
			pci_early_fixup_cyrix_5530);
(-)a/drivers/pci/pci-driver.c (+2 lines)
Lines 353-358 static int pci_device_resume_early(struc Link Here
353
	struct pci_dev * pci_dev = to_pci_dev(dev);
353
	struct pci_dev * pci_dev = to_pci_dev(dev);
354
	struct pci_driver * drv = pci_dev->driver;
354
	struct pci_driver * drv = pci_dev->driver;
355
355
356
	pci_fixup_device(pci_fixup_resume, pci_dev);
357
356
	if (drv && drv->resume_early)
358
	if (drv && drv->resume_early)
357
		error = drv->resume_early(pci_dev);
359
		error = drv->resume_early(pci_dev);
358
	return error;
360
	return error;
(-)a/drivers/pci/quirks.c (-58 / +109 lines)
Lines 36-42 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ME Link Here
36
36
37
/* Deal with broken BIOS'es that neglect to enable passive release,
37
/* Deal with broken BIOS'es that neglect to enable passive release,
38
   which can cause problems in combination with the 82441FX/PPro MTRRs */
38
   which can cause problems in combination with the 82441FX/PPro MTRRs */
39
static void __devinit quirk_passive_release(struct pci_dev *dev)
39
static void quirk_passive_release(struct pci_dev *dev)
40
{
40
{
41
	struct pci_dev *d = NULL;
41
	struct pci_dev *d = NULL;
42
	unsigned char dlc;
42
	unsigned char dlc;
Lines 53-58 static void __devinit quirk_passive_rele Link Here
53
	}
53
	}
54
}
54
}
55
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82441,	quirk_passive_release );
55
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82441,	quirk_passive_release );
56
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82441,	quirk_passive_release );
56
57
57
/*  The VIA VP2/VP3/MVP3 seem to have some 'features'. There may be a workaround
58
/*  The VIA VP2/VP3/MVP3 seem to have some 'features'. There may be a workaround
58
    but VIA don't answer queries. If you happen to have good contacts at VIA
59
    but VIA don't answer queries. If you happen to have good contacts at VIA
Lines 134-140 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN Link Here
134
 *	Updated based on further information from the site and also on
135
 *	Updated based on further information from the site and also on
135
 *	information provided by VIA 
136
 *	information provided by VIA 
136
 */
137
 */
137
static void __devinit quirk_vialatency(struct pci_dev *dev)
138
static void quirk_vialatency(struct pci_dev *dev)
138
{
139
{
139
	struct pci_dev *p;
140
	struct pci_dev *p;
140
	u8 rev;
141
	u8 rev;
Lines 185-190 exit: Link Here
185
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8363_0,	quirk_vialatency );
186
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8363_0,	quirk_vialatency );
186
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8371_1,	quirk_vialatency );
187
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8371_1,	quirk_vialatency );
187
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8361,		quirk_vialatency );
188
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8361,		quirk_vialatency );
189
/* Must restore this on a resume from RAM */
190
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8363_0,	quirk_vialatency );
191
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8371_1,	quirk_vialatency );
192
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8361,		quirk_vialatency );
188
193
189
/*
194
/*
190
 *	VIA Apollo VP3 needs ETBF on BT848/878
195
 *	VIA Apollo VP3 needs ETBF on BT848/878
Lines 532-538 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_V Link Here
532
 * TODO: When we have device-specific interrupt routers,
537
 * TODO: When we have device-specific interrupt routers,
533
 * this code will go away from quirks.
538
 * this code will go away from quirks.
534
 */
539
 */
535
static void __devinit quirk_via_ioapic(struct pci_dev *dev)
540
static void quirk_via_ioapic(struct pci_dev *dev)
536
{
541
{
537
	u8 tmp;
542
	u8 tmp;
538
	
543
	
Lines 548-553 static void __devinit quirk_via_ioapic(s Link Here
548
	pci_write_config_byte (dev, 0x58, tmp);
553
	pci_write_config_byte (dev, 0x58, tmp);
549
}
554
}
550
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C686,	quirk_via_ioapic );
555
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C686,	quirk_via_ioapic );
556
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C686,	quirk_via_ioapic );
551
557
552
/*
558
/*
553
 * VIA 8237: Some BIOSs don't set the 'Bypass APIC De-Assert Message' Bit.
559
 * VIA 8237: Some BIOSs don't set the 'Bypass APIC De-Assert Message' Bit.
Lines 555-561 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VI Link Here
555
 * Set this bit to get rid of cycle wastage.
561
 * Set this bit to get rid of cycle wastage.
556
 * Otherwise uncritical.
562
 * Otherwise uncritical.
557
 */
563
 */
558
static void __devinit quirk_via_vt8237_bypass_apic_deassert(struct pci_dev *dev)
564
static void quirk_via_vt8237_bypass_apic_deassert(struct pci_dev *dev)
559
{
565
{
560
	u8 misc_control2;
566
	u8 misc_control2;
561
#define BYPASS_APIC_DEASSERT 8
567
#define BYPASS_APIC_DEASSERT 8
Lines 567-572 static void __devinit quirk_via_vt8237_b Link Here
567
	}
573
	}
568
}
574
}
569
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8237,		quirk_via_vt8237_bypass_apic_deassert);
575
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8237,		quirk_via_vt8237_bypass_apic_deassert);
576
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8237,		quirk_via_vt8237_bypass_apic_deassert);
570
577
571
/*
578
/*
572
 * The AMD io apic can hang the box when an apic irq is masked.
579
 * The AMD io apic can hang the box when an apic irq is masked.
Lines 600-606 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI Link Here
600
#define AMD8131_revB0        0x11
607
#define AMD8131_revB0        0x11
601
#define AMD8131_MISC         0x40
608
#define AMD8131_MISC         0x40
602
#define AMD8131_NIOAMODE_BIT 0
609
#define AMD8131_NIOAMODE_BIT 0
603
static void __init quirk_amd_8131_ioapic(struct pci_dev *dev) 
610
static void quirk_amd_8131_ioapic(struct pci_dev *dev)
604
{ 
611
{ 
605
        unsigned char revid, tmp;
612
        unsigned char revid, tmp;
606
        
613
        
Lines 616-621 static void __init quirk_amd_8131_ioapic Link Here
616
        }
623
        }
617
} 
624
} 
618
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_amd_8131_ioapic);
625
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_amd_8131_ioapic);
626
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_amd_8131_ioapic);
619
#endif /* CONFIG_X86_IO_APIC */
627
#endif /* CONFIG_X86_IO_APIC */
620
628
621
629
Lines 641-705 static void __devinit quirk_via_acpi(str Link Here
641
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C586_3,	quirk_via_acpi );
649
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C586_3,	quirk_via_acpi );
642
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C686_4,	quirk_via_acpi );
650
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C686_4,	quirk_via_acpi );
643
651
644
/*
645
 * Via 686A/B:  The PCI_INTERRUPT_LINE register for the on-chip
646
 * devices, USB0/1, AC97, MC97, and ACPI, has an unusual feature:
647
 * when written, it makes an internal connection to the PIC.
648
 * For these devices, this register is defined to be 4 bits wide.
649
 * Normally this is fine.  However for IO-APIC motherboards, or
650
 * non-x86 architectures (yes Via exists on PPC among other places),
651
 * we must mask the PCI_INTERRUPT_LINE value versus 0xf to get
652
 * interrupts delivered properly.
653
 *
654
 * Some of the on-chip devices are actually '586 devices' so they are
655
 * listed here.
656
 */
657
658
static int via_irq_fixup_needed = -1;
659
652
660
/*
653
/*
661
 * As some VIA hardware is available in PCI-card form, we need to restrict
654
 *	VIA bridges which have VLink
662
 * this quirk to VIA PCI hardware built onto VIA-based motherboards only.
663
 * We try to locate a VIA southbridge before deciding whether the quirk
664
 * should be applied.
665
 */
655
 */
666
static const struct pci_device_id via_irq_fixup_tbl[] = {
656
667
	{
657
static const struct pci_device_id via_vlink_fixup_tbl[] = {
668
		.vendor 	= PCI_VENDOR_ID_VIA,
658
	/* Internal devices need IRQ line routing, pre VLink */
669
		.device		= PCI_ANY_ID,
659
	{ PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C686), 0 },
670
		.subvendor	= PCI_ANY_ID,
660
	{ PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8231), 17 },
671
		.subdevice	= PCI_ANY_ID,
661
	/* Devices with VLink */
672
		.class		= PCI_CLASS_BRIDGE_ISA << 8,
662
	{ PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8233_0), 17},
673
		.class_mask	= 0xffff00,
663
	{ PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8233A), 17 },
674
	},
664
	{ PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8233C_0), 17 },
665
	{ PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8235), 16 },
666
	{ PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8237), 15 },
667
	{ PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8237A), 15 },
675
	{ 0, },
668
	{ 0, },
676
};
669
};
677
670
678
static void quirk_via_irq(struct pci_dev *dev)
671
/**
672
 *	quirk_via_vlink		-	VIA VLink IRQ number update
673
 *	@dev: PCI device
674
 *
675
 *	If the device we are dealing with is on a PIC IRQ we need to
676
 *	ensure that the IRQ line register which usually is not relevant
677
 *	for PCI cards, is actually written so that interrupts get sent
678
 *	to the right place
679
 */
680
681
static void quirk_via_vlink(struct pci_dev *dev)
679
{
682
{
683
	const struct pci_device_id *via_vlink_fixup;
684
	static int dev_lo = -1, dev_hi = 18;
680
	u8 irq, new_irq;
685
	u8 irq, new_irq;
681
686
682
	if (via_irq_fixup_needed == -1)
687
	/* Check if we have VLink and cache the result */
683
		via_irq_fixup_needed = pci_dev_present(via_irq_fixup_tbl);
684
688
685
	if (!via_irq_fixup_needed)
689
	/* Checked already - no */
690
	if (dev_lo == -2)
686
		return;
691
		return;
687
692
693
	/* Not checked - see what bridge we have and find the device
694
	   ranges */
695
696
	if (dev_lo == -1) {
697
		via_vlink_fixup = pci_find_present(via_vlink_fixup_tbl);
698
		if (via_vlink_fixup == NULL) {
699
			dev_lo = -2;
700
			return;
701
		}
702
		dev_lo = via_vlink_fixup->driver_data;
703
		/* 82C686 is special - 0/0 */
704
		if (dev_lo == 0)
705
			dev_hi = 0;
706
	}
688
	new_irq = dev->irq;
707
	new_irq = dev->irq;
689
708
690
	/* Don't quirk interrupts outside the legacy IRQ range */
709
	/* Don't quirk interrupts outside the legacy IRQ range */
691
	if (!new_irq || new_irq > 15)
710
	if (!new_irq || new_irq > 15)
692
		return;
711
		return;
693
712
713
	/* Internal device ? */
714
	if (dev->bus->number != 0 || PCI_SLOT(dev->devfn) > dev_hi ||
715
		PCI_SLOT(dev->devfn) < dev_lo)
716
		return;
717
718
	/* This is an internal VLink device on a PIC interrupt. The BIOS
719
	   ought to have set this but may not have, so we redo it */
720
694
	pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
721
	pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
695
	if (new_irq != irq) {
722
	if (new_irq != irq) {
696
		printk(KERN_INFO "PCI: VIA IRQ fixup for %s, from %d to %d\n",
723
		printk(KERN_INFO "PCI: VIA VLink IRQ fixup for %s, from %d to %d\n",
697
			pci_name(dev), irq, new_irq);
724
			pci_name(dev), irq, new_irq);
698
		udelay(15);	/* unknown if delay really needed */
725
		udelay(15);	/* unknown if delay really needed */
699
		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
726
		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, new_irq);
700
	}
727
	}
701
}
728
}
702
DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_irq);
729
DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_vlink);
703
730
704
/*
731
/*
705
 * VIA VT82C598 has its device ID settable and many BIOSes
732
 * VIA VT82C598 has its device ID settable and many BIOSes
Lines 720-732 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_V Link Here
720
 * do this even if the Linux CardBus driver is not loaded, because
747
 * do this even if the Linux CardBus driver is not loaded, because
721
 * the Linux i82365 driver does not (and should not) handle CardBus.
748
 * the Linux i82365 driver does not (and should not) handle CardBus.
722
 */
749
 */
723
static void __devinit quirk_cardbus_legacy(struct pci_dev *dev)
750
static void quirk_cardbus_legacy(struct pci_dev *dev)
724
{
751
{
725
	if ((PCI_CLASS_BRIDGE_CARDBUS << 8) ^ dev->class)
752
	if ((PCI_CLASS_BRIDGE_CARDBUS << 8) ^ dev->class)
726
		return;
753
		return;
727
	pci_write_config_dword(dev, PCI_CB_LEGACY_MODE_BASE, 0);
754
	pci_write_config_dword(dev, PCI_CB_LEGACY_MODE_BASE, 0);
728
}
755
}
729
DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_cardbus_legacy);
756
DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_cardbus_legacy);
757
DECLARE_PCI_FIXUP_RESUME(PCI_ANY_ID, PCI_ANY_ID, quirk_cardbus_legacy);
730
758
731
/*
759
/*
732
 * Following the PCI ordering rules is optional on the AMD762. I'm not
760
 * Following the PCI ordering rules is optional on the AMD762. I'm not
Lines 735-741 DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ Link Here
735
 * To be fair to AMD, it follows the spec by default, its BIOS people
763
 * To be fair to AMD, it follows the spec by default, its BIOS people
736
 * who turn it off!
764
 * who turn it off!
737
 */
765
 */
738
static void __devinit quirk_amd_ordering(struct pci_dev *dev)
766
static void quirk_amd_ordering(struct pci_dev *dev)
739
{
767
{
740
	u32 pcic;
768
	u32 pcic;
741
	pci_read_config_dword(dev, 0x4C, &pcic);
769
	pci_read_config_dword(dev, 0x4C, &pcic);
Lines 749-754 static void __devinit quirk_amd_ordering Link Here
749
	}
777
	}
750
}
778
}
751
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD,	PCI_DEVICE_ID_AMD_FE_GATE_700C, quirk_amd_ordering );
779
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD,	PCI_DEVICE_ID_AMD_FE_GATE_700C, quirk_amd_ordering );
780
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AMD,	PCI_DEVICE_ID_AMD_FE_GATE_700C, quirk_amd_ordering );
752
781
753
/*
782
/*
754
 *	DreamWorks provided workaround for Dunord I-3000 problem
783
 *	DreamWorks provided workaround for Dunord I-3000 problem
Lines 784-790 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_T Link Here
784
 * datasheets found at http://www.national.com/ds/GX for info on what
813
 * datasheets found at http://www.national.com/ds/GX for info on what
785
 * these bits do.  <christer@weinigel.se>
814
 * these bits do.  <christer@weinigel.se>
786
 */
815
 */
787
static void __init quirk_mediagx_master(struct pci_dev *dev)
816
static void quirk_mediagx_master(struct pci_dev *dev)
788
{
817
{
789
	u8 reg;
818
	u8 reg;
790
	pci_read_config_byte(dev, 0x41, &reg);
819
	pci_read_config_byte(dev, 0x41, &reg);
Lines 795-807 static void __init quirk_mediagx_master( Link Here
795
	}
824
	}
796
}
825
}
797
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CYRIX,	PCI_DEVICE_ID_CYRIX_PCI_MASTER, quirk_mediagx_master );
826
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CYRIX,	PCI_DEVICE_ID_CYRIX_PCI_MASTER, quirk_mediagx_master );
827
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_CYRIX,	PCI_DEVICE_ID_CYRIX_PCI_MASTER, quirk_mediagx_master );
798
828
799
/*
829
/*
800
 *	Ensure C0 rev restreaming is off. This is normally done by
830
 *	Ensure C0 rev restreaming is off. This is normally done by
801
 *	the BIOS but in the odd case it is not the results are corruption
831
 *	the BIOS but in the odd case it is not the results are corruption
802
 *	hence the presence of a Linux check
832
 *	hence the presence of a Linux check
803
 */
833
 */
804
static void __init quirk_disable_pxb(struct pci_dev *pdev)
834
static void quirk_disable_pxb(struct pci_dev *pdev)
805
{
835
{
806
	u16 config;
836
	u16 config;
807
	u8 rev;
837
	u8 rev;
Lines 817-822 static void __init quirk_disable_pxb(str Link Here
817
	}
847
	}
818
}
848
}
819
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82454NX,	quirk_disable_pxb );
849
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82454NX,	quirk_disable_pxb );
850
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82454NX,	quirk_disable_pxb );
820
851
821
852
822
/*
853
/*
Lines 874-880 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I Link Here
874
 * runs everywhere at present we suppress the printk output in most
905
 * runs everywhere at present we suppress the printk output in most
875
 * irrelevant cases.
906
 * irrelevant cases.
876
 */
907
 */
877
static void __init k8t_sound_hostbridge(struct pci_dev *dev)
908
static void k8t_sound_hostbridge(struct pci_dev *dev)
878
{
909
{
879
	unsigned char val;
910
	unsigned char val;
880
911
Lines 893-900 static void __init k8t_sound_hostbridge( Link Here
893
	}
924
	}
894
}
925
}
895
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, k8t_sound_hostbridge);
926
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, k8t_sound_hostbridge);
927
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, k8t_sound_hostbridge);
896
928
897
#ifndef CONFIG_ACPI_SLEEP
898
/*
929
/*
899
 * On ASUS P4B boards, the SMBus PCI Device within the ICH2/4 southbridge
930
 * On ASUS P4B boards, the SMBus PCI Device within the ICH2/4 southbridge
900
 * is not activated. The myth is that Asus said that they do not want the
931
 * is not activated. The myth is that Asus said that they do not want the
Lines 906-915 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_V Link Here
906
 * bridge. Unfortunately, this device has no subvendor/subdevice ID. So it 
937
 * bridge. Unfortunately, this device has no subvendor/subdevice ID. So it 
907
 * becomes necessary to do this tweak in two steps -- I've chosen the Host
938
 * becomes necessary to do this tweak in two steps -- I've chosen the Host
908
 * bridge as trigger.
939
 * bridge as trigger.
909
 *
910
 * Actually, leaving it unhidden and not redoing the quirk over suspend2ram
911
 * will cause thermal management to break down, and causing machine to
912
 * overheat.
913
 */
940
 */
914
static int __initdata asus_hides_smbus;
941
static int __initdata asus_hides_smbus;
915
942
Lines 1019-1025 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I Link Here
1019
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82855GM_HB,	asus_hides_smbus_hostbridge );
1046
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82855GM_HB,	asus_hides_smbus_hostbridge );
1020
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82915GM_HB, asus_hides_smbus_hostbridge );
1047
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82915GM_HB, asus_hides_smbus_hostbridge );
1021
1048
1022
static void __init asus_hides_smbus_lpc(struct pci_dev *dev)
1049
static void asus_hides_smbus_lpc(struct pci_dev *dev)
1023
{
1050
{
1024
	u16 val;
1051
	u16 val;
1025
	
1052
	
Lines 1042-1049 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I Link Here
1042
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801CA_12,	asus_hides_smbus_lpc );
1069
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801CA_12,	asus_hides_smbus_lpc );
1043
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801DB_12,	asus_hides_smbus_lpc );
1070
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801DB_12,	asus_hides_smbus_lpc );
1044
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801EB_0,	asus_hides_smbus_lpc );
1071
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801EB_0,	asus_hides_smbus_lpc );
1072
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801DB_0,	asus_hides_smbus_lpc );
1073
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801BA_0,	asus_hides_smbus_lpc );
1074
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801CA_0,	asus_hides_smbus_lpc );
1075
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801CA_12,	asus_hides_smbus_lpc );
1076
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801DB_12,	asus_hides_smbus_lpc );
1077
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82801EB_0,	asus_hides_smbus_lpc );
1045
1078
1046
static void __init asus_hides_smbus_lpc_ich6(struct pci_dev *dev)
1079
static void asus_hides_smbus_lpc_ich6(struct pci_dev *dev)
1047
{
1080
{
1048
	u32 val, rcba;
1081
	u32 val, rcba;
1049
	void __iomem *base;
1082
	void __iomem *base;
Lines 1059-1071 static void __init asus_hides_smbus_lpc_ Link Here
1059
	printk(KERN_INFO "PCI: Enabled ICH6/i801 SMBus device\n");
1092
	printk(KERN_INFO "PCI: Enabled ICH6/i801 SMBus device\n");
1060
}
1093
}
1061
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_ICH6_1,	asus_hides_smbus_lpc_ich6 );
1094
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_ICH6_1,	asus_hides_smbus_lpc_ich6 );
1062
1095
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_ICH6_1,	asus_hides_smbus_lpc_ich6 );
1063
#endif
1064
1096
1065
/*
1097
/*
1066
 * SiS 96x south bridge: BIOS typically hides SMBus device...
1098
 * SiS 96x south bridge: BIOS typically hides SMBus device...
1067
 */
1099
 */
1068
static void __init quirk_sis_96x_smbus(struct pci_dev *dev)
1100
static void quirk_sis_96x_smbus(struct pci_dev *dev)
1069
{
1101
{
1070
	u8 val = 0;
1102
	u8 val = 0;
1071
	printk(KERN_INFO "Enabling SiS 96x SMBus.\n");
1103
	printk(KERN_INFO "Enabling SiS 96x SMBus.\n");
Lines 1086-1092 static int __devinitdata sis_96x_compati Link Here
1086
1118
1087
#define SIS_DETECT_REGISTER 0x40
1119
#define SIS_DETECT_REGISTER 0x40
1088
1120
1089
static void __init quirk_sis_503(struct pci_dev *dev)
1121
static void quirk_sis_503(struct pci_dev *dev)
1090
{
1122
{
1091
	u8 reg;
1123
	u8 reg;
1092
	u16 devid;
1124
	u16 devid;
Lines 1122-1134 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_S Link Here
1122
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_735,		quirk_sis_96x_compatible );
1154
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_735,		quirk_sis_96x_compatible );
1123
1155
1124
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_503,		quirk_sis_503 );
1156
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_503,		quirk_sis_503 );
1157
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_503,		quirk_sis_503 );
1125
/*
1158
/*
1126
 * On ASUS A8V and A8V Deluxe boards, the onboard AC97 audio controller
1159
 * On ASUS A8V and A8V Deluxe boards, the onboard AC97 audio controller
1127
 * and MC97 modem controller are disabled when a second PCI soundcard is
1160
 * and MC97 modem controller are disabled when a second PCI soundcard is
1128
 * present. This patch, tweaking the VT8237 ISA bridge, enables them.
1161
 * present. This patch, tweaking the VT8237 ISA bridge, enables them.
1129
 * -- bjd
1162
 * -- bjd
1130
 */
1163
 */
1131
static void __init asus_hides_ac97_lpc(struct pci_dev *dev)
1164
static void asus_hides_ac97_lpc(struct pci_dev *dev)
1132
{
1165
{
1133
	u8 val;
1166
	u8 val;
1134
	int asus_hides_ac97 = 0;
1167
	int asus_hides_ac97 = 0;
Lines 1159-1164 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_S Link Here
1159
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_963,		quirk_sis_96x_smbus );
1192
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_963,		quirk_sis_96x_smbus );
1160
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_LPC,		quirk_sis_96x_smbus );
1193
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_LPC,		quirk_sis_96x_smbus );
1161
1194
1195
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8237, asus_hides_ac97_lpc );
1196
1197
1198
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_961,		quirk_sis_96x_smbus );
1199
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_962,		quirk_sis_96x_smbus );
1200
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_963,		quirk_sis_96x_smbus );
1201
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_SI,	PCI_DEVICE_ID_SI_LPC,		quirk_sis_96x_smbus );
1202
1162
#if defined(CONFIG_ATA) || defined(CONFIG_ATA_MODULE)
1203
#if defined(CONFIG_ATA) || defined(CONFIG_ATA_MODULE)
1163
1204
1164
/*
1205
/*
Lines 1167-1173 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_S Link Here
1167
 *	the PCI scanning.
1208
 *	the PCI scanning.
1168
 */
1209
 */
1169
1210
1170
static void __devinit quirk_jmicron_dualfn(struct pci_dev *pdev)
1211
static void quirk_jmicron_dualfn(struct pci_dev *pdev)
1171
{
1212
{
1172
	u32 conf;
1213
	u32 conf;
1173
	u8 hdr;
1214
	u8 hdr;
Lines 1205-1210 static void __devinit quirk_jmicron_dual Link Here
1205
}
1246
}
1206
1247
1207
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, quirk_jmicron_dualfn);
1248
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, quirk_jmicron_dualfn);
1249
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, quirk_jmicron_dualfn);
1208
1250
1209
#endif
1251
#endif
1210
1252
Lines 1532-1537 extern struct pci_fixup __start_pci_fixu Link Here
1532
extern struct pci_fixup __end_pci_fixups_final[];
1574
extern struct pci_fixup __end_pci_fixups_final[];
1533
extern struct pci_fixup __start_pci_fixups_enable[];
1575
extern struct pci_fixup __start_pci_fixups_enable[];
1534
extern struct pci_fixup __end_pci_fixups_enable[];
1576
extern struct pci_fixup __end_pci_fixups_enable[];
1577
extern struct pci_fixup __start_pci_fixups_resume[];
1578
extern struct pci_fixup __end_pci_fixups_resume[];
1535
1579
1536
1580
1537
void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev)
1581
void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev)
Lines 1559-1564 void pci_fixup_device(enum pci_fixup_pas Link Here
1559
		end = __end_pci_fixups_enable;
1603
		end = __end_pci_fixups_enable;
1560
		break;
1604
		break;
1561
1605
1606
	case pci_fixup_resume:
1607
		start = __start_pci_fixups_resume;
1608
		end = __end_pci_fixups_resume;
1609
		break;
1610
1562
	default:
1611
	default:
1563
		/* stupid compiler warning, you would think with an enum... */
1612
		/* stupid compiler warning, you would think with an enum... */
1564
		return;
1613
		return;
Lines 1596-1602 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I Link Here
1596
 * Force it to be linked by setting the corresponding control bit in the
1645
 * Force it to be linked by setting the corresponding control bit in the
1597
 * config space.
1646
 * config space.
1598
 */
1647
 */
1599
static void __devinit quirk_nvidia_ck804_pcie_aer_ext_cap(struct pci_dev *dev)
1648
static void quirk_nvidia_ck804_pcie_aer_ext_cap(struct pci_dev *dev)
1600
{
1649
{
1601
	uint8_t b;
1650
	uint8_t b;
1602
	if (pci_read_config_byte(dev, 0xf41, &b) == 0) {
1651
	if (pci_read_config_byte(dev, 0xf41, &b) == 0) {
Lines 1610-1615 static void __devinit quirk_nvidia_ck804 Link Here
1610
}
1659
}
1611
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA,  PCI_DEVICE_ID_NVIDIA_CK804_PCIE,
1660
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA,  PCI_DEVICE_ID_NVIDIA_CK804_PCIE,
1612
			quirk_nvidia_ck804_pcie_aer_ext_cap);
1661
			quirk_nvidia_ck804_pcie_aer_ext_cap);
1662
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_NVIDIA,  PCI_DEVICE_ID_NVIDIA_CK804_PCIE,
1663
			quirk_nvidia_ck804_pcie_aer_ext_cap);
1613
1664
1614
#ifdef CONFIG_PCI_MSI
1665
#ifdef CONFIG_PCI_MSI
1615
/* To disable MSI globally */
1666
/* To disable MSI globally */
(-)a/drivers/pci/search.c (-2 / +1 lines)
Lines 416-422 exit: Link Here
416
const struct pci_device_id *pci_find_present(const struct pci_device_id *ids)
416
const struct pci_device_id *pci_find_present(const struct pci_device_id *ids)
417
{
417
{
418
	struct pci_dev *dev;
418
	struct pci_dev *dev;
419
	struct pci_device_id * found = NULL;
419
	const struct pci_device_id *found = NULL;
420
420
421
	WARN_ON(in_interrupt());
421
	WARN_ON(in_interrupt());
422
	down_read(&pci_bus_sem);
422
	down_read(&pci_bus_sem);
Lines 442-448 const struct pci_device_id *pci_find_pre Link Here
442
 * find devices that are usually built into a system, or for a general hint as
442
 * find devices that are usually built into a system, or for a general hint as
443
 * to if another device happens to be present at this specific moment in time.
443
 * to if another device happens to be present at this specific moment in time.
444
 */
444
 */
445
446
int pci_dev_present(const struct pci_device_id *ids)
445
int pci_dev_present(const struct pci_device_id *ids)
447
{
446
{
448
	return pci_find_present(ids) == NULL ? 0 : 1;
447
	return pci_find_present(ids) == NULL ? 0 : 1;
(-)a/include/asm-generic/vmlinux.lds.h (+3 lines)
Lines 35-40 Link Here
35
		VMLINUX_SYMBOL(__start_pci_fixups_enable) = .;		\
35
		VMLINUX_SYMBOL(__start_pci_fixups_enable) = .;		\
36
		*(.pci_fixup_enable)					\
36
		*(.pci_fixup_enable)					\
37
		VMLINUX_SYMBOL(__end_pci_fixups_enable) = .;		\
37
		VMLINUX_SYMBOL(__end_pci_fixups_enable) = .;		\
38
		VMLINUX_SYMBOL(__start_pci_fixups_resume) = .;		\
39
		*(.pci_fixup_resume)					\
40
		VMLINUX_SYMBOL(__end_pci_fixups_resume) = .;		\
38
	}								\
41
	}								\
39
									\
42
									\
40
	/* RapidIO route ops */						\
43
	/* RapidIO route ops */						\
(-)a/include/linux/pci.h (+19 lines)
Lines 396-401 struct pci_driver { Link Here
396
 */
396
 */
397
#define pci_module_init	pci_register_driver
397
#define pci_module_init	pci_register_driver
398
398
399
/**
400
 * PCI_VDEVICE - macro used to describe a specific pci device in short form
401
 * @vend: the vendor name
402
 * @dev: the 16 bit PCI Device ID
403
 *
404
 * This macro is used to create a struct pci_device_id that matches a
405
 * specific PCI device.  The subvendor, and subdevice fields will be set
406
 * to PCI_ANY_ID. The macro allows the next field to follow as the device
407
 * private data.
408
 */
409
410
#define PCI_VDEVICE(vendor, device)		\
411
	PCI_VENDOR_ID_##vendor, (device),	\
412
	PCI_ANY_ID, PCI_ANY_ID, 0, 0
413
399
/* these external functions are only available when PCI support is enabled */
414
/* these external functions are only available when PCI support is enabled */
400
#ifdef CONFIG_PCI
415
#ifdef CONFIG_PCI
401
416
Lines 787-792 enum pci_fixup_pass { Link Here
787
	pci_fixup_header,	/* After reading configuration header */
802
	pci_fixup_header,	/* After reading configuration header */
788
	pci_fixup_final,	/* Final phase of device fixups */
803
	pci_fixup_final,	/* Final phase of device fixups */
789
	pci_fixup_enable,	/* pci_enable_device() time */
804
	pci_fixup_enable,	/* pci_enable_device() time */
805
	pci_fixup_resume,	/* pci_enable_device() time */
790
};
806
};
791
807
792
/* Anonymous variables would be nice... */
808
/* Anonymous variables would be nice... */
Lines 805-810 enum pci_fixup_pass { Link Here
805
#define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook)			\
821
#define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook)			\
806
	DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable,			\
822
	DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable,			\
807
			vendor##device##hook, vendor, device, hook)
823
			vendor##device##hook, vendor, device, hook)
824
#define DECLARE_PCI_FIXUP_RESUME(vendor, device, hook)			\
825
	DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume,			\
826
			resume##vendor##device##hook, vendor, device, hook)
808
827
809
828
810
void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);
829
void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);

Return to bug 214931