linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Richard Henderson <rth@twiddle.net>
Cc: Wakko Warner <wakko@animx.eu.org>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [patch] Re: test12-pre2
Date: Thu, 30 Nov 2000 20:24:39 +0300	[thread overview]
Message-ID: <20001130202439.A585@jurassic.park.msu.ru> (raw)
In-Reply-To: <Pine.LNX.4.10.10011271838080.15454-100000@penguin.transmeta.com> <20001128213003.A3720@animx.eu.org>
In-Reply-To: <20001128213003.A3720@animx.eu.org>; from wakko@animx.eu.org on Tue, Nov 28, 2000 at 09:30:03PM -0500

On Tue, Nov 28, 2000 at 09:30:03PM -0500, Wakko Warner wrote:
> Doesn't boot on noritake alpha.
> 
> It gets to POSIX conformance testing by UNIFIX
> and hard locks.  the halt switch doesn't even work.

The video card on that system turned out to have pci class
PCI_CLASS_NOT_DEFINED_VGA instead of PCI_CLASS_DISPLAY_VGA.
So it was disabled, and I guess that any access to it (printk())
caused machine checks without anything displayed on the screen.

A tad more care in disabling devices should fix that.

Ivan.

--- 2.4.0t12p3/drivers/pci/setup-bus.c	Thu Nov 30 12:14:31 2000
+++ linux/drivers/pci/setup-bus.c	Thu Nov 30 12:31:35 2000
@@ -45,24 +45,28 @@ pbus_assign_resources_sorted(struct pci_
 	head_io.next = head_mem.next = NULL;
 	for (ln=bus->devices.next; ln != &bus->devices; ln=ln->next) {
 		struct pci_dev *dev = pci_dev_b(ln);
+		u16 class = dev->class >> 8;
 		u16 cmd;
 
 		/* First, disable the device to avoid side
 		   effects of possibly overlapping I/O and
 		   memory ranges.
-		   Except the VGA - for obvious reason. :-)  */
-		if (dev->class >> 8 == PCI_CLASS_DISPLAY_VGA)
+		   Leave VGA enabled - for obvious reason. :-)
+		   Same with all sorts of bridges - they may
+		   have VGA behind them.  */
+		if (class == PCI_CLASS_DISPLAY_VGA
+				|| class == PCI_CLASS_NOT_DEFINED_VGA)
 			found_vga = 1;
-		else {
+		else if (class >> 8 != PCI_BASE_CLASS_BRIDGE) {
 			pci_read_config_word(dev, PCI_COMMAND, &cmd);
 			cmd &= ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY
 						| PCI_COMMAND_MASTER);
 			pci_write_config_word(dev, PCI_COMMAND, cmd);
 		}
- 
+
 		/* Reserve some resources for CardBus.
 		   Are these values reasonable? */
-		if (dev->class >> 8 == PCI_CLASS_BRIDGE_CARDBUS) {
+		if (class == PCI_CLASS_BRIDGE_CARDBUS) {
 			io_reserved += 8*1024;
 			mem_reserved += 32*1024*1024;
 			continue;
--- 2.4.0t12p3/arch/alpha/kernel/pci.c	Thu Nov 30 12:17:36 2000
+++ linux/arch/alpha/kernel/pci.c	Thu Nov 30 12:15:58 2000
@@ -56,13 +56,13 @@ struct pci_controler *pci_isa_hose;
 static void __init
 quirk_eisa_bridge(struct pci_dev *dev)
 {
-	dev->class = PCI_CLASS_BRIDGE_EISA;
+	dev->class = PCI_CLASS_BRIDGE_EISA << 8;
 }
 
 static void __init
 quirk_isa_bridge(struct pci_dev *dev)
 {
-	dev->class = PCI_CLASS_BRIDGE_ISA;
+	dev->class = PCI_CLASS_BRIDGE_ISA << 8;
 }
 
 static void __init
-
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/

  parent reply	other threads:[~2000-11-30 17:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-28  2:45 test12-pre2 Linus Torvalds
2000-11-28  2:55 ` Linus daughter John B. Jacobsen
2000-11-28 12:13   ` George R. Kasica
2000-11-28  3:46 ` test12-pre2 Neil Brown
2000-11-28  3:53   ` test12-pre2 Alan Cox
2000-11-28  4:38   ` test12-pre2 Linus Torvalds
2000-11-28  4:17 ` test12-pre2 Mohammad A. Haque
2000-11-29  2:30 ` test12-pre2 Wakko Warner
     [not found]   ` <20001129121504.A1794@jurassic.park.msu.ru>
     [not found]     ` <20001129072631.A4193@animx.eu.org>
     [not found]       ` <20001129165011.A2205@jurassic.park.msu.ru>
2000-11-29 17:15         ` test12-pre2 Wakko Warner
2000-11-30 17:24   ` Ivan Kokshaysky [this message]
     [not found]     ` <20001201171033.A10915@animx.eu.org>
     [not found]       ` <20001202162614.A2738@jurassic.park.msu.ru>
2000-12-03 19:46         ` [patch] test12-pre2 Wakko Warner
2000-11-29 14:35 ` test12-pre2 Ingo Oeser
2000-11-29 16:16   ` test12-pre2 Kai Germaschewski

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=20001130202439.A585@jurassic.park.msu.ru \
    --to=ink@jurassic.park.msu.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rth@twiddle.net \
    --cc=wakko@animx.eu.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;
as well as URLs for NNTP newsgroup(s).