public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* What's the status of kernel PNP?
@ 2001-07-07  5:48 linux
  0 siblings, 0 replies; 3+ messages in thread
From: linux @ 2001-07-07  5:48 UTC (permalink / raw)
  To: linux-kernel; +Cc: tom

I just noticed that 2.4.6-ac1 parport won't compile (well, link) without
the kernel PnP stuff configured.  So I tried turning it on.

It prints a line saying that it found my modem at boot time, but doesn't
actually configure it, so I have to run isapnp anyway if I want to use it.

Okay, RTFM time... Documentation/isapnp.txt doesn't say anything about
boot time (only /proc/isapnp usage after boot and some function call
interfaces for kernel programming that are hard to follow).

kernel-parameters.txt gives a hint, although it required reading the
source code to figure out what to pass as "isapnp=" to turn verbose up.

A lot of google searching comes up with a lot of stale data but the only
2.4-relevant kernel ISAPNP howto is written in Japanese.  Lots of stuff
describes it as a feature in the 2.4 kernels, but I can't find anything
on how to use it.

MAINTAINERS claims that it's maintained, but the web page is down (the
whole site has moved, and /~pnp doesn't exist on the new site) and the
only mailing list archives I can find for pnp-devel (at geocrawler)
doesn't have any updates since the year 2000 - and those are all spam.

I'm a little suspect about that maintained status, although I haven't
written the maintainer yet.


But the upshot of all of this is that I can't figure out WTF to do with
this "feature", since I haven't noticed it actually doing anything except
taking up kernel memory.


On another machine, with an ISA PCMCIA adapter, which works with isapnp
and David Hinds' PCMCIA package, but if I try to use the 2.4 cardbus
code, it fails to probe the PCMCIA adapter, apparently because the PnP
code again didn't set it up.  (And there's no obvious way to force a
re-probe after boot unless I build the whole thing as a module.)  Again,
the PnP code cheerfully points out that the PCMCIA adpater exists, but
doesn't appear to grasp the concept that I didn't put the adapter into
the machine because it looks pretty.


Can someome point me at TFM or some other source of information?  I'd be
much obliged.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: What's the status of kernel PNP?
       [not found] ` <20010709073410.1567.qmail@science.horizon.com>
@ 2001-07-09  8:51   ` pazke
       [not found]     ` <20010709112502.3364.qmail@science.horizon.com>
  0 siblings, 1 reply; 3+ messages in thread
From: pazke @ 2001-07-09  8:51 UTC (permalink / raw)
  To: linux; +Cc: linux-kernel

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

On Mon, Jul 09, 2001 at 07:34:10AM -0000, linux@horizon.com wrote:
> > Please provide more detailed hardware description and a output of
> > 'cat /proc/isapnp'.  IMHO this problem can be solved easily.
> 
> Thank you for being so soothing.  As you could probably notice, I was a bit
> frustrated.
> 
> On the first machine, with the modem (note that I ran isapnp manually, since
> this modem is my net connection!):
> 

> Card 1 'MOT15f0:Motorola VoiceSURFR 56K Modem' PnP version 1.0
>   Logical device 0 'MOT15f0:Unknown'
>     Supported registers 0x2
>     Compatible device MOT15f0
>     Device is active
>     Active port 0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff,0xffff
		  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		    
Use of isapnptools package mixed with kernel 2.4.x ISA PNP subsystem is asking 
for trouble. Move /etc/isapnp.conf file to some other place and try to reboot.

[SNIP]

> isapnp: Scanning for PnP cards...
> isapnp: Card 'Motorola VoiceSURFR 56K Modem'
> isapnp:   Device 'Unknown'
> isapnp: 1 Plug & Play card detected total
> PnP: PNP BIOS installation structure at 0xc00fdbd0
> PnP: PNP BIOS version 1.0, entry at f0000:d20e, dseg at f0000
> Linux NET4.0 for Linux 2.4
> Based upon Swansea University Computer Society NET3.039
> Initializing RT netlink socket
> apm: BIOS version 1.1 Flags 0x03 (Driver version 1.14)
> Starting kswapd v1.8
> parport0: PC-style at 0x378, irq 7 [PCSPP(,...)]
> matroxfb: Matrox Millennium (PCI) detected
> matroxfb: 640x480x8bpp (virtual: 640x13081)
> matroxfb: framebuffer at 0xFE000000, mapped to 0xc6807000, size 8388608
> Console: switching to colour frame buffer device 80x30
> fb0: MATROX VGA frame buffer device
> pty: 256 Unix98 ptys configured
> Serial driver version 5.05b (2001-05-03) with MANY_PORTS SHARE_IRQ SERIAL_PCI ISAPNP enabled
> ttyS00 at 0x03f8 (irq = 4) is a 16550A
> ttyS01 at 0x02f8 (irq = 3) is a 16550A
> ttyS02 at port 0x03e8 (irq = 5) is a 16550A
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Hmm, looks strange to me, it seems that serial driver found your modem and configured
it as /dev/ttyS2. Did you try to test it with minicom for example ?

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

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: What's the status of kernel PNP?
       [not found]     ` <20010709112502.3364.qmail@science.horizon.com>
@ 2001-07-11 14:12       ` pazke
  0 siblings, 0 replies; 3+ messages in thread
From: pazke @ 2001-07-11 14:12 UTC (permalink / raw)
  To: linux; +Cc: linux-kernel


[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-07-11 14:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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
2001-07-07  5:48 linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox