mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] PCI early fixup missing bits
@ 2004-12-16  0:25 Maciej W. Rozycki
  2004-12-17 23:43 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Maciej W. Rozycki @ 2004-12-16  0:25 UTC (permalink / raw)
  To: Greg KH, Andrew Morton; +Cc: linux-kernel, Maciej W. Rozycki

Hello,

 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.

 The patch should be obvious.  Checked against 2.6.10-rc3-bk9.  Please 
apply.

  Maciej

Signed-off-by: Maciej W. Rozycki <macro@mips.com>

patch-mips-2.6.10-rc2-20041124-pci_fixup_early-1
diff -up --recursive --new-file linux-mips-2.6.10-rc2-20041124.macro/drivers/pci/probe.c linux-mips-2.6.10-rc2-20041124/drivers/pci/probe.c
--- linux-mips-2.6.10-rc2-20041124.macro/drivers/pci/probe.c	2004-11-22 14:27:03.000000000 +0000
+++ linux-mips-2.6.10-rc2-20041124/drivers/pci/probe.c	2004-12-15 18:45:32.000000000 +0000
@@ -490,6 +490,7 @@ static int pci_setup_device(struct pci_d
 
 	/* 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 */
diff -up --recursive --new-file linux-mips-2.6.10-rc2-20041124.macro/drivers/pci/quirks.c linux-mips-2.6.10-rc2-20041124/drivers/pci/quirks.c
--- linux-mips-2.6.10-rc2-20041124.macro/drivers/pci/quirks.c	2004-11-22 14:27:04.000000000 +0000
+++ linux-mips-2.6.10-rc2-20041124/drivers/pci/quirks.c	2004-12-15 18:36:15.000000000 +0000
@@ -1232,6 +1232,8 @@ static void pci_do_fixups(struct pci_dev
 	}
 }
 
+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[];
@@ -1245,6 +1247,11 @@ void pci_fixup_device(enum pci_fixup_pas
 	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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-12-17 23:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-16  0:25 [PATCH] PCI early fixup missing bits Maciej W. Rozycki
2004-12-17 23:43 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®