Commit 58516e87 authored by Maciej W. Rozycki's avatar Maciej W. Rozycki Committed by Greg Kroah-Hartman

[PATCH] PCI: PCI early fixup missing bits

 A few bits seem to be missing for PCI early fixup to work -- the
pci_fixup_device() helper ignores fixups of the pci_fixup_early type.
Also the local class variable needs to be refreshed after performing the
fixups for they can change dev->class.
Signed-off-by: default avatarMaciej W. Rozycki <macro@mips.com>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>

patch-mips-2.6.10-rc2-20041124-pci_fixup_early-1
parent e9ded0c4
......@@ -501,6 +501,7 @@ static int pci_setup_device(struct pci_dev * dev)
/* Early fixups, before probing the BARs */
pci_fixup_device(pci_fixup_early, dev);
class = dev->class >> 8;
switch (dev->hdr_type) { /* header type */
case PCI_HEADER_TYPE_NORMAL: /* standard header */
......
......@@ -1237,6 +1237,8 @@ static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, struct pci_f
}
}
extern struct pci_fixup __start_pci_fixups_early[];
extern struct pci_fixup __end_pci_fixups_early[];
extern struct pci_fixup __start_pci_fixups_header[];
extern struct pci_fixup __end_pci_fixups_header[];
extern struct pci_fixup __start_pci_fixups_final[];
......@@ -1250,6 +1252,11 @@ void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev)
struct pci_fixup *start, *end;
switch(pass) {
case pci_fixup_early:
start = __start_pci_fixups_early;
end = __end_pci_fixups_early;
break;
case pci_fixup_header:
start = __start_pci_fixups_header;
end = __end_pci_fixups_header;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment