public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tim Hockin <thockin@sun.com>
To: Andre Hedrick <andre@linuxdiskcert.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] IDE initialization fix
Date: Tue, 16 Oct 2001 17:38:54 -0700	[thread overview]
Message-ID: <3BCCD31E.B94CA05A@sun.com> (raw)
In-Reply-To: <Pine.LNX.4.10.10110161109450.807-100000@master.linux-ide.org>

[-- Attachment #1: Type: text/plain, Size: 1196 bytes --]

Andre Hedrick wrote:
Andre, The summary of the change is this: without this change, the PCI init
for chipsets does not get called.  I'll speak specifically about the CSB5. 
The CSB5 in non-native mode has a PCI irqline register forced to 0.  The
PCI probe then skips it's PCI init and it never gets called.

We then see that there is no file in /proc/ide for the serverworks
chipset.  With this fix, there is.

Is there something else we aren't doing, instead?  This seems obvious -
there is NOWHERE else that calls the init_chipset() method.

I put a printk in the pci_init_svwks routine, and it doesn't get called.

> The real issue is that the initialization of the card/host has a problem,
> so that belongs in the pci_fix_up region in the arch/<>/kernel/pc-irq.c
> stuff, imho.  In general one should not be changing the interrupt lines at
> this stage of the INIT process.

Please show me what you mean - my desktop has an IRQ of zero, also.  I do
have some control over BIOS, too.

Please, I'd like to resolve this issue once and for all :)
 

Patch attached again for completeness..

Tim

-- 
Tim Hockin
Systems Software Engineer
Sun Microsystems, Cobalt Server Appliances
thockin@sun.com

[-- Attachment #2: ide-init.diff --]
[-- Type: text/plain, Size: 1533 bytes --]

diff -ruN dist-2.4.12+patches/drivers/ide/ide-pci.c cvs-2.4.12+patches/drivers/ide/ide-pci.c
--- dist-2.4.12+patches/drivers/ide/ide-pci.c	Mon Oct 15 10:21:50 2001
+++ cvs-2.4.12+patches/drivers/ide/ide-pci.c	Mon Oct 15 10:21:49 2001
@@ -584,7 +584,8 @@
 	ide_hwif_t *hwif, *mate = NULL;
 	unsigned int class_rev;
 	static int secondpdc = 0;
-
+	int pci_class_ide;
+	
 #ifdef CONFIG_IDEDMA_AUTO
 	if (!noautodma)
 		autodma = 1;
@@ -653,7 +654,8 @@
 		/* Its attached to something else, just a random bridge. 
 		   Suspect a fastrak and fall through */
 	}
-	if ((dev->class & ~(0xfa)) != ((PCI_CLASS_STORAGE_IDE << 8) | 5)) {
+	pci_class_ide = ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE);
+        if (!pci_class_ide && ((dev->class >> 8) != PCI_CLASS_STORAGE_OTHER)) {
 		printk("%s: not 100%% native mode: will probe irqs later\n", d->name);
 		/*
 		 * This allows offboard ide-pci cards the enable a BIOS,
@@ -666,8 +668,19 @@
 		printk("%s: will probe irqs later\n", d->name);
 		pciirq = 0;
 	} else if (!pciirq) {
-		printk("%s: bad irq (%d): will probe later\n", d->name, pciirq);
-		pciirq = 0;
+		if (pci_class_ide) {
+			/* this is the normal path for most IDE devices */
+			if (d->init_chipset) {
+				pciirq = d->init_chipset(dev, d->name);
+			} else {
+				printk(KERN_INFO 
+					"%s standard IDE device detected\n", 
+					d->name);
+			}
+		} else {
+			printk(KERN_WARNING 
+				"%s: bad irq (0): will probe later\n", d->name);
+		}
 	} else {
 		if (d->init_chipset)
 			(void) d->init_chipset(dev, d->name);

  reply	other threads:[~2001-10-17  0:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-16 17:38 [PATCH] IDE initialization fix Tim Hockin
2001-10-16 18:17 ` Andre Hedrick
2001-10-17  0:38   ` Tim Hockin [this message]
2001-10-17  5:35     ` Andre Hedrick
2001-10-18  3:21       ` Tim Hockin

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=3BCCD31E.B94CA05A@sun.com \
    --to=thockin@sun.com \
    --cc=andre@linuxdiskcert.org \
    --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