public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: pazke@orbita1.ru
To: linux@horizon.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: What's the status of kernel PNP?
Date: Wed, 11 Jul 2001 18:12:14 +0400	[thread overview]
Message-ID: <20010711181214.G4477@orbita1.ru> (raw)
In-Reply-To: <20010709125115.A19087@orbita1.ru> <20010709112502.3364.qmail@science.horizon.com>
In-Reply-To: <20010709112502.3364.qmail@science.horizon.com>; from linux@horizon.com on Mon, Jul 09, 2001 at 11:25:02AM -0000


[-- Attachment #1.1: Type: text/plain, Size: 300 bytes --]

Hi,

please test the attached patch (2.4.6-ac2), it should add support for ISAPNP
PCMCIA card. 

Best regards.

PS. Is your modem working now ?

-- 
Andrey Panin            | Embedded systems software engineer
pazke@orbita1.ru        | PGP key: http://www.orbita1.ru/~pazke/AndreyPanin.asc

[-- Attachment #1.2: patch-pcmcia-isapnp --]
[-- Type: text/plain, Size: 2327 bytes --]

diff -ur -X /usr/dontdiff /linux.vanilla/drivers/pcmcia/i82365.c /linux/drivers/pcmcia/i82365.c
--- /linux.vanilla/drivers/pcmcia/i82365.c	Mon Jun 25 23:29:02 2001
+++ /linux/drivers/pcmcia/i82365.c	Wed Jul 11 20:55:19 2001
@@ -57,6 +57,10 @@
 #include <pcmcia/ss.h>
 #include <pcmcia/cs.h>
 
+#ifdef CONFIG_ISAPNP
+#include <linux/isapnp.h>
+#endif
+
 /* ISA-bus controllers */
 #include "i82365.h"
 #include "cirrus.h"
@@ -816,10 +820,56 @@
 
 #ifdef CONFIG_ISA
 
+#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE))
+#define I82365_ISAPNP
+#endif
+
+#ifdef I82365_ISAPNP
+static struct isapnp_device_id id_table[] __initdata = {
+	{ 	ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('P', 'N', 'P'),
+		ISAPNP_FUNCTION(0x0e00), (unsigned long) "Intel 82365-Compatible\r" },
+	{ 	ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('P', 'N', 'P'),
+		ISAPNP_FUNCTION(0x0e01), (unsigned long) "Cirrus Logic CL-PD6720" },
+	{ 	ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('P', 'N', 'P'),
+		ISAPNP_FUNCTION(0x0e02), (unsigned long) "VLSI VL82C146" },
+	{	0 }
+};
+MODULE_DEVICE_TABLE(isapnp, id_table);
+
+static struct pci_dev *i82365_pnpdev;
+#endif
+
 static void __init isa_probe(void)
 {
     int i, j, sock, k, ns, id;
     ioaddr_t port;
+#ifdef I82365_ISAPNP
+    struct isapnp_device_id *devid;
+    struct pci_dev *dev;
+
+    for (devid = id_table; devid->vendor; devid++) {
+	if ((dev = isapnp_find_dev(NULL, devid->vendor, devid->function, NULL))) {
+	    printk("ISAPNP ");
+
+	    if (dev->prepare && dev->prepare(dev) < 0) {
+		printk("prepare failed\n");
+		break;
+	    }
+
+	    if (dev->activate && dev->activate(dev) < 0) {
+		printk("activate failed\n");
+		break;
+	    }
+
+	    if ((i365_base = pci_resource_start(dev, 0))) {
+		printk("no resources ?\n");
+		break;
+	    }
+	    i82365_pnpdev = dev;
+	    break;
+	}
+    }
+#endif
 
     if (check_region(i365_base, 2) != 0) {
 	if (sockets == 0)
@@ -1604,6 +1654,10 @@
 	i365_set(i, I365_CSCINT, 0);
 	release_region(socket[i].ioaddr, 2);
     }
+#if defined(CONFIG_ISA) && defined(I82365_ISAPNP)
+    if (i82365_pnpdev && i82365_pnpdev->deactivate)
+		i82365_pnpdev->deactivate(i82365_pnpdev);
+#endif
 } /* exit_i82365 */
 
 module_init(init_i82365);

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

  parent reply	other threads:[~2001-07-11 14:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20010709105756.A18230@orbita1.ru>
     [not found] ` <20010709073410.1567.qmail@science.horizon.com>
2001-07-09  8:51   ` What's the status of kernel PNP? pazke
     [not found]     ` <20010709112502.3364.qmail@science.horizon.com>
2001-07-11 14:12       ` pazke [this message]
2001-07-07  5:48 linux

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=20010711181214.G4477@orbita1.ru \
    --to=pazke@orbita1.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@horizon.com \
    /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