public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: torvalds@transmeta.com (Linus Torvalds)
To: linux-kernel@vger.kernel.org
Subject: Re: [Patch] ServerWorks peer bus fix for 2.4.x
Date: 8 Feb 2001 11:41:16 -0800	[thread overview]
Message-ID: <95usos$6qd$1@penguin.transmeta.com> (raw)
In-Reply-To: <8C91B010B3B7994C88A266E1A72184D3116FCD@cceexc19.americas.cpqcorp.net> <20010208094042.B119@albireo.ucw.cz>

In article <20010208094042.B119@albireo.ucw.cz>,
Martin Mares  <mj@suse.cz> wrote:
>
>What leads you to your belief it's correct? The lspci dump Adam has sent
>to the list shows that there's something utterly wrong with our understanding
>of the ServerWorks config registers -- they seem to say that the primary
>bus numbers are 00 and 01, but in reality they are 00 and 02.

Is there any reason to not just change the default pcibios_last_bus to
255, and just always default to scanning all PCI bus numbers?

Alternatively, how about just changing the fixups to be saner. Right now
they are obviously bogus, and don't even match with their comments.
Somehting like this..

		Linus

----
--- old-linux/arch/i386/kernel/pci-pc.c	Thu Jun 22 07:17:16 2000
+++ linux/arch/i386/kernel/pci-pc.c	Thu Feb  8 11:36:58 2001
@@ -843,30 +843,40 @@
 	pcibios_last_bus = -1;
 }
 
+/*
+ * ServerWorks host bridges -- Find and scan all secondary buses.
+ * Register 0x44 contains first, 0x45 last bus number routed there.
+ */
 static void __init pci_fixup_serverworks(struct pci_dev *d)
 {
-	/*
-	 * ServerWorks host bridges -- Find and scan all secondary buses.
-	 * Register 0x44 contains first, 0x45 last bus number routed there.
-	 */
-	u8 busno;
-	pci_read_config_byte(d, 0x44, &busno);
-	printk("PCI: ServerWorks host bridge: secondary bus %02x\n", busno);
-	pci_scan_bus(busno, pci_root_ops, NULL);
-	pcibios_last_bus = -1;
+	u8 busno1, busno2;
+
+	pci_read_config_byte(d, 0x44, &busno1);
+	pci_read_config_byte(d, 0x45, &busno2);
+	if (busno2 < busno1)
+		busno2 = busno1;
+	if (busno2 > pcibios_last_bus) {
+		pcibios_last_bus = busno2;
+		printk("PCI: ServerWorks host bridge: last bus %02x\n", pcibios_last_bus);
+	}
 }
 
+/*	
+ * Compaq host bridges -- Find and scan all secondary buses.
+ * This time registers 0xc8 and 0xc9.
+ */
 static void __init pci_fixup_compaq(struct pci_dev *d)
 {
-	/*	
-	 * Compaq host bridges -- Find and scan all secondary buses.
-	 * This time registers 0xc8 and 0xc9.
-	 */
-	u8 busno;
-	pci_read_config_byte(d, 0xc8, &busno);
-	printk("PCI: Compaq host bridge: secondary bus %02x\n", busno);
-	pci_scan_bus(busno, pci_root_ops, NULL);
-	pcibios_last_bus = -1;
+	u8 busno1, busno2;
+
+	pci_read_config_byte(d, 0xc8, &busno1);
+	pci_read_config_byte(d, 0xc9, &busno2);
+	if (busno2 < busno1)
+		busno2 = busno1;
+	if (busno2 > pcibios_last_bus) {
+		pcibios_last_bus = busno2;
+		printk("PCI: Compaq host bridge: last bus %02x\n", busno2);
+	}
 }
 
 static void __init pci_fixup_umc_ide(struct pci_dev *d)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2001-02-08 19:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-08  0:46 [Patch] ServerWorks peer bus fix for 2.4.x Zink, Dan
2001-02-08  8:40 ` Martin Mares
2001-02-08 19:41   ` Linus Torvalds [this message]
2001-02-08 11:06 ` Andre Hedrick
2001-02-08 11:54   ` Adam Lackorzynski
2001-02-08 16:08     ` Andre Hedrick
  -- strict thread matches above, loose matches on Subject: below --
2001-02-08 16:00 Zink, Dan

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='95usos$6qd$1@penguin.transmeta.com' \
    --to=torvalds@transmeta.com \
    --cc=linux-kernel@vger.kernel.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