mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@mips.com>
To: Greg KH <greg@kroah.com>, Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, "Maciej W. Rozycki" <macro@linux-mips.org>
Subject: [PATCH] PCI early fixup missing bits
Date: Thu, 16 Dec 2004 00:25:42 +0000 (GMT)	[thread overview]
Message-ID: <Pine.LNX.4.61.0412152359360.14855@perivale.mips.com> (raw)

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;

             reply	other threads:[~2004-12-16  1:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-16  0:25 Maciej W. Rozycki [this message]
2004-12-17 23:43 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.61.0412152359360.14855@perivale.mips.com \
    --to=macro@mips.com \
    --cc=akpm@osdl.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macro@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®