From: Simone Gotti <simone.gotti@email.it>
To: linux-hotplug@vger.kernel.org
Subject: Re: Little script for ISAPNP hotplug
Date: Thu, 22 Apr 2004 18:14:54 +0000 [thread overview]
Message-ID: <200404222014.54987.simone.gotti@email.it> (raw)
In-Reply-To: <200404092044.54429.simone.gotti@email.it>
[-- Attachment #1: Type: text/plain, Size: 1502 bytes --]
I did these patches.
They were tested by some people on the gentoo Italian forums with my hotplug
agent and they worked well.
This is a copy of the mail that I sent to Vojtech Pavlik:
[start]
Hi,
Some days ago I've did an hotplug agent for isapnp devices. I've noticed that
there wasn't an hotplug agent for this kind of devices and for this reason
all the modules for isapnp devices weren't loaded by hotplug.
I've did this agent (that is attached) and now I can manage the coldplugging
of modules like 8250_pnp, parport_pc, ns558 etc...
I've noticed that there are some modules using ISA devices (or at least I
think) that aren't loaded by my hotplug scripts because they aren't "hotplug
compliant".
They don't export any isapnp id via the MODULE_DEVICE_TABLE macro and so the
file /lib/modules/`uname -r`/modules.isapnpmap hasn't any information on
which module to load.
I've found 3 of this modules:
psmouse (The PSmouse module)
pcspkr (PC Speaker)
rtc (real time clock)
I know that you are the mantainer of the input subsystem so I'm writing to you
for the first 2 modules.
For the psmouse modules, I don't know it this is the right way to do the
things because I'm not very expert and I don't know if there are other busses
(like PCI) for managing PS connectors.
The patches are against kernel 2.6.5.
Do you think that these are right and they can be usefull?
Thanks for your time.
[end]
I hope this can be useful.
Bye!
--
Simone Gotti
<simone.gotti@email.it>
[-- Attachment #2: isapnp.agent --]
[-- Type: application/x-shellscript, Size: 2277 bytes --]
[-- Attachment #3: isapnp.rc --]
[-- Type: application/x-shellscript, Size: 2848 bytes --]
[-- Attachment #4: psmouse-base-isapnpsupport.diff --]
[-- Type: text/x-diff, Size: 672 bytes --]
--- linux-2.6.5/drivers/input/mouse/psmouse-base.c 2004-04-04 18:08:37.000000000 +0200
+++ linux-2.6.5-prova01/drivers/input/mouse/psmouse-base.c 2004-04-19 10:37:56.000000000 +0200
@@ -18,6 +18,7 @@
#include <linux/input.h>
#include <linux/serio.h>
#include <linux/init.h>
+#include <linux/pnp.h>
#include "psmouse.h"
#include "synaptics.h"
#include "logips2pp.h"
@@ -739,5 +740,13 @@
serio_unregister_device(&psmouse_dev);
}
+static const struct pnp_device_id pnp_dev_table[] = {
+ /* PS/2 port for PS/2-style mice */
+ { "PNP0f13", 0 },
+ { "", 0 }
+};
+
+MODULE_DEVICE_TABLE(pnp, pnp_dev_table);
+
module_init(psmouse_init);
module_exit(psmouse_exit);
[-- Attachment #5: pcspkr-isapnpsupport.diff --]
[-- Type: text/x-diff, Size: 658 bytes --]
--- linux-2.6.5/drivers/input/misc/pcspkr.c 2004-04-19 11:26:59.000000000 +0200
+++ linux-2.6.5-prova01/drivers/input/misc/pcspkr.c 2004-04-21 14:27:59.503811584 +0200
@@ -16,6 +16,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/input.h>
+#include <linux/pnp.h>
#include <asm/io.h>
MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
@@ -90,5 +91,13 @@
input_unregister_device(&pcspkr_dev);
}
+static const struct pnp_device_id pnp_dev_table[] = {
+ /* AT-style speaker sound */
+ { "PNP0800", 0 },
+ { "", 0 }
+};
+
+MODULE_DEVICE_TABLE(pnp, pnp_dev_table);
+
module_init(pcspkr_init);
module_exit(pcspkr_exit);
[-- Attachment #6: rtc-isapnpsupport.diff --]
[-- Type: text/x-diff, Size: 617 bytes --]
--- linux-2.6.5/drivers/char/rtc.c 2004-04-04 18:08:34.000000000 +0200
+++ linux-2.6.5-prova01/drivers/char/rtc.c 2004-04-19 10:59:35.000000000 +0200
@@ -77,6 +77,7 @@
#include <linux/sysctl.h>
#include <linux/wait.h>
#include <linux/bcd.h>
+#include <linux/pnp.h>
#include <asm/current.h>
#include <asm/uaccess.h>
@@ -1346,6 +1347,14 @@
}
#endif
+static const struct pnp_device_id pnp_dev_table[] = {
+ /* AT real-time clock */
+ { "PNP0b00", 0 },
+ { "", 0 }
+};
+
+MODULE_DEVICE_TABLE(pnp, pnp_dev_table);
+
MODULE_AUTHOR("Paul Gortmaker");
MODULE_LICENSE("GPL");
MODULE_ALIAS_MISCDEV(RTC_MINOR);
next prev parent reply other threads:[~2004-04-22 18:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-09 18:44 Little script for ISAPNP hotplug Simone Gotti
2004-04-10 17:16 ` Simone Gotti
2004-04-11 17:09 ` Simone Gotti
2004-04-12 2:25 ` Alexander E. Patrakov
2004-04-12 9:57 ` Simone Gotti
2004-04-13 15:47 ` Alexander E. Patrakov
2004-04-13 17:06 ` Simone Gotti
2004-04-18 19:10 ` Simone Gotti
2004-04-22 18:14 ` Simone Gotti [this message]
2004-04-22 19:28 ` Marco d'Itri
2004-04-23 9:42 ` Simone Gotti
2004-04-23 16:19 ` Bill Nottingham
2004-04-23 16:23 ` Marco d'Itri
2004-04-23 16:30 ` Bill Nottingham
2004-04-24 9:15 ` Simone Gotti
2004-04-24 9:15 ` Simone Gotti
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=200404222014.54987.simone.gotti@email.it \
--to=simone.gotti@email.it \
--cc=linux-hotplug@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;
as well as URLs for NNTP newsgroup(s).