All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Hockin <thockin@sun.com>
To: andre@linux-ide.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] IDE PCI probe
Date: Tue, 23 Oct 2001 17:22:52 -0700	[thread overview]
Message-ID: <3BD609DC.CC2AE22B@sun.com> (raw)

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

Andre,

Here is the patch as we discussed - it works, it is good.  Needed for
controllers that can do native mode but not native PCI IRQs.

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

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

--- virgin-2.4.12/drivers/ide/ide-pci.c	Wed Oct 10 14:37:29 2001
+++ CVS-checkout/drivers/ide/ide-pci.c	Thu Oct 18 10:22:53 2001
@@ -653,32 +653,44 @@
 		/* 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)) {
-		printk("%s: not 100%% native mode: will probe irqs later\n", d->name);
-		/*
-		 * This allows offboard ide-pci cards the enable a BIOS,
-		 * verify interrupt settings of split-mirror pci-config
-		 * space, place chipset into init-mode, and/or preserve
-		 * an interrupt if the card is not native ide support.
-		 */
-		pciirq = (d->init_chipset) ? d->init_chipset(dev, d->name) : ide_special_settings(dev, d->name);
+
+	if (!tried_config && 
+	   (dev->class >> 8 == PCI_CLASS_STORAGE_IDE ||
+	    dev->class >> 8 == PCI_CLASS_STORAGE_OTHER)) {
+		if ((dev->class & 0x5) == 0x5 && pciirq) {
+			if (d->init_chipset) {
+				(void) d->init_chipset(dev, d->name);
+			}
+#ifdef __sparc__
+			printk("%s: 100%% native mode on irq %s\n",
+				d->name, __irq_itoa(pciirq));
+#else
+			printk("%s: 100%% native mode on irq %d\n", 
+				d->name, pciirq);
+#endif
+		} else if ((dev->class & 0x5) == 0x5) {
+			if (d->init_chipset) {
+				pciirq = d->init_chipset(dev, d->name);
+			}
+			printk("%s: native mode: will probe irqs later\n", 
+				d->name);
+		} else {
+			if (d->init_chipset) {
+				pciirq = d->init_chipset(dev, d->name);
+			} else {
+				pciirq = ide_special_settings(dev, d->name);
+			}
+			printk("%s: non-native mode: will probe irqs later\n", 
+				d->name);
+		}
 	} else if (tried_config) {
 		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;
 	} else {
-		if (d->init_chipset)
-			(void) d->init_chipset(dev, d->name);
-#ifdef __sparc__
-		printk("%s: 100%% native mode on irq %s\n",
-		       d->name, __irq_itoa(pciirq));
-#else
-		printk("%s: 100%% native mode on irq %d\n", d->name, pciirq);
-#endif
+		printk("%s: what am I expected to do with this?\n", d->name);
+		pciirq = 0;
 	}
-
+		
 	/*
 	 * Set up the IDE ports
 	 */
@@ -784,6 +796,7 @@
 		    IDE_PCI_DEVID_EQ(d->devid, DEVID_CMD648) ||
 		    IDE_PCI_DEVID_EQ(d->devid, DEVID_CMD649) ||
 		    IDE_PCI_DEVID_EQ(d->devid, DEVID_OSB4) ||
+		    IDE_PCI_DEVID_EQ(d->devid, DEVID_CSB5) ||
 		    ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && (dev->class & 0x80))) {
 			unsigned long dma_base = ide_get_or_set_dma_base(hwif, (!mate && d->extra) ? d->extra : 0, d->name);
 			if (dma_base && !(pcicmd & PCI_COMMAND_MASTER)) {

                 reply	other threads:[~2001-10-24  0:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3BD609DC.CC2AE22B@sun.com \
    --to=thockin@sun.com \
    --cc=andre@linux-ide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.