All of lore.kernel.org
 help / color / mirror / Atom feed
* fully udev-based hotplug system
@ 2005-06-23 21:54 Marco d'Itri
  2005-06-24  3:04 ` Bill Nottingham
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Marco d'Itri @ 2005-06-23 21:54 UTC (permalink / raw)
  To: linux-hotplug

Could something like this work?

The idea is to use udev as the hotplug multiplexer and totally kill
/sbin/hotplug and /etc/hotplug.d/default/default.hotplug (and hotplug.d/
too when other packages will stop using it).

ACTION="add", SUBSYSTEM="pci", MODALIAS="*", \
	RUN+="/sbin/modprobe $modalias"

ACTION="add", SUBSYSTEM="usb", MODALIAS="*", \
	RUN+="/sbin/modprobe $modalias"

# I have a working serio.agent, but how can other bus types be supported?
# Which other bus types exist?
# When the input subsystem will be modalias-enabled this will become
# a modprobe call like for the others.
ACTION="add", SUBSYSTEM="input", BUS="serio", \
	RUN+="/etc/hotplug/serio.agent"

# I have not written yet this one...
ACTION="add", SUBSYSTEM="ieee1394", RUN+="/etc/hotplug/ieee1394.agent"

# what else is worth special-casing before it will be converted to the
# driver model?

SUBSYSTEM="net", RUN+="/etc/hotplug/net.agent"

ACTION="add", SUBSYSTEM="firmware", RUN+="/etc/hotplug/firmware.agent"

-- 
ciao,
Marco


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: fully udev-based hotplug system
  2005-06-23 21:54 fully udev-based hotplug system Marco d'Itri
@ 2005-06-24  3:04 ` Bill Nottingham
  2005-06-24  5:00 ` Greg KH
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Bill Nottingham @ 2005-06-24  3:04 UTC (permalink / raw)
  To: linux-hotplug

Marco d'Itri (md@Linux.IT) said: 
> Could something like this work?
> 
> The idea is to use udev as the hotplug multiplexer and totally kill
> /sbin/hotplug and /etc/hotplug.d/default/default.hotplug (and hotplug.d/
> too when other packages will stop using it).
> 
> ACTION="add", SUBSYSTEM="pci", MODALIAS="*", \
> 	RUN+="/sbin/modprobe $modalias"
> 
> ACTION="add", SUBSYSTEM="usb", MODALIAS="*", \
> 	RUN+="/sbin/modprobe $modalias"

How does this handle when multiple modules claim the same alias?
(this happens for PCI devices...)

One method is to patch the module utilities to just insert all
matches, I suppose.

Bill


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: fully udev-based hotplug system
  2005-06-23 21:54 fully udev-based hotplug system Marco d'Itri
  2005-06-24  3:04 ` Bill Nottingham
@ 2005-06-24  5:00 ` Greg KH
  2005-06-24  5:02 ` Greg KH
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2005-06-24  5:00 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Jun 23, 2005 at 11:04:54PM -0400, Bill Nottingham wrote:
> Marco d'Itri (md@Linux.IT) said: 
> > Could something like this work?
> > 
> > The idea is to use udev as the hotplug multiplexer and totally kill
> > /sbin/hotplug and /etc/hotplug.d/default/default.hotplug (and hotplug.d/
> > too when other packages will stop using it).
> > 
> > ACTION="add", SUBSYSTEM="pci", MODALIAS="*", \
> > 	RUN+="/sbin/modprobe $modalias"
> > 
> > ACTION="add", SUBSYSTEM="usb", MODALIAS="*", \
> > 	RUN+="/sbin/modprobe $modalias"
> 
> How does this handle when multiple modules claim the same alias?
> (this happens for PCI devices...)
> 
> One method is to patch the module utilities to just insert all
> matches, I suppose.

That's exactly what modprobe now does in its latest version.

thanks,

greg k-h


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: fully udev-based hotplug system
  2005-06-23 21:54 fully udev-based hotplug system Marco d'Itri
  2005-06-24  3:04 ` Bill Nottingham
  2005-06-24  5:00 ` Greg KH
@ 2005-06-24  5:02 ` Greg KH
  2005-06-24 12:27 ` Kay Sievers
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2005-06-24  5:02 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Jun 23, 2005 at 11:54:18PM +0200, Marco d'Itri wrote:
> Could something like this work?
> 
> The idea is to use udev as the hotplug multiplexer and totally kill
> /sbin/hotplug and /etc/hotplug.d/default/default.hotplug (and hotplug.d/
> too when other packages will stop using it).
> 
> ACTION="add", SUBSYSTEM="pci", MODALIAS="*", \
> 	RUN+="/sbin/modprobe $modalias"

Is the $modalias new?  Or did I miss another neat feature that Kay
slipped in? :)

But yes, I don't see why it wouldn't work.

> # I have a working serio.agent, but how can other bus types be supported?
> # Which other bus types exist?

Look at the current hotplug package for this answer.

> # When the input subsystem will be modalias-enabled this will become
> # a modprobe call like for the others.
> ACTION="add", SUBSYSTEM="input", BUS="serio", \
> 	RUN+="/etc/hotplug/serio.agent"
> 
> # I have not written yet this one...
> ACTION="add", SUBSYSTEM="ieee1394", RUN+="/etc/hotplug/ieee1394.agent"
> 
> # what else is worth special-casing before it will be converted to the
> # driver model?

scsi?

thanks,

greg k-h


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: fully udev-based hotplug system
  2005-06-23 21:54 fully udev-based hotplug system Marco d'Itri
                   ` (2 preceding siblings ...)
  2005-06-24  5:02 ` Greg KH
@ 2005-06-24 12:27 ` Kay Sievers
  2005-06-24 12:35 ` Marco d'Itri
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Kay Sievers @ 2005-06-24 12:27 UTC (permalink / raw)
  To: linux-hotplug

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

On Thu, Jun 23, 2005 at 11:54:18PM +0200, Marco d'Itri wrote:
> Could something like this work?
> 
> The idea is to use udev as the hotplug multiplexer and totally kill
> /sbin/hotplug and /etc/hotplug.d/default/default.hotplug (and hotplug.d/
> too when other packages will stop using it).

Yes, they should drop udev-rules instead of placing scripts to these
directories.

> ACTION=="add", SUBSYSTEM=="pci", MODALIAS=="*", \
> 	RUN+="/sbin/modprobe $modalias"
> 
> ACTION=="add", SUBSYSTEM=="usb", MODALIAS=="*", \
> 	RUN+="/sbin/modprobe $modalias"

Yes, this works nicely on my box.

> # I have a working serio.agent, but how can other bus types be supported?
> # Which other bus types exist?
> # When the input subsystem will be modalias-enabled this will become
> # a modprobe call like for the others.
> ACTION=="add", SUBSYSTEM=="input", BUS=="serio", \
> 	RUN+="/etc/hotplug/serio.agent"

The input subsystem is still broken and calls /sbin/hotplug directly.
The SUSE kernels introduced a "input_device"-class to solve that, but during
the last months the input-maintainers just _talk_ about ideas instead of
fixing that mess. :( The patch we use is attached.

Kay

[-- Attachment #2: input-kill-sbin-hotplug.patch --]
[-- Type: text/plain, Size: 9186 bytes --]

From: Hannes Reinecke <hare@suse.de>
(shipped with SUSE 9.3 kernels)

Get rid of /sbin/hotplug calls in the input subsys by
exporting input devices as /sys/class/input_device/*

diff --git a/drivers/input/input.c b/drivers/input/input.c
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -47,6 +47,7 @@ static LIST_HEAD(input_dev_list);
 static LIST_HEAD(input_handler_list);
 
 static struct input_handler *input_table[8];
+static atomic_t input_device_num = ATOMIC_INIT(0);
 
 #ifdef CONFIG_PROC_FS
 static struct proc_dir_entry *proc_bus_input_dir;
@@ -325,52 +326,27 @@ static struct input_device_id *input_mat
 			SPRINTF_BIT_A(bit, name, max); \
 	} while (0)
 
-static void input_call_hotplug(char *verb, struct input_dev *dev)
+static int __input_hotplug(struct input_dev *dev, char **envp, int num_envp,
+			   char *buffer, int buffer_size)
 {
-	char *argv[3], **envp, *buf, *scratch;
-	int i = 0, j, value;
+	char *scratch;
+	int i = 0, j;
+	scratch = buffer;
 
-	if (!hotplug_path[0]) {
-		printk(KERN_ERR "input.c: calling hotplug without a hotplug agent defined\n");
-		return;
-	}
-	if (in_interrupt()) {
-		printk(KERN_ERR "input.c: calling hotplug from interrupt\n");
-		return;
-	}
-	if (!current->fs->root) {
-		printk(KERN_WARNING "input.c: calling hotplug without valid filesystem\n");
-		return;
-	}
-	if (!(envp = (char **) kmalloc(20 * sizeof(char *), GFP_KERNEL))) {
-		printk(KERN_ERR "input.c: not enough memory allocating hotplug environment\n");
-		return;
-	}
-	if (!(buf = kmalloc(1024, GFP_KERNEL))) {
-		kfree (envp);
-		printk(KERN_ERR "input.c: not enough memory allocating hotplug environment\n");
-		return;
-	}
-
-	argv[0] = hotplug_path;
-	argv[1] = "input";
-	argv[2] = NULL;
-
-	envp[i++] = "HOME=/";
-	envp[i++] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
-
-	scratch = buf;
-
-	envp[i++] = scratch;
-	scratch += sprintf(scratch, "ACTION=%s", verb) + 1;
+	if (!dev)
+		return -ENODEV;
 
 	envp[i++] = scratch;
 	scratch += sprintf(scratch, "PRODUCT=%x/%x/%x/%x",
 		dev->id.bustype, dev->id.vendor, dev->id.product, dev->id.version) + 1;
 
+#ifdef INPUT_DEBUG
+	printk(KERN_DEBUG "%s: PRODUCT %x/%x/%x/%x\n", __FUNCTION__,
+	       dev->id.bustype, dev->id.vendor, dev->id.product, dev->id.version);
+#endif
 	if (dev->name) {
 		envp[i++] = scratch;
-		scratch += sprintf(scratch, "NAME=%s", dev->name) + 1;
+		scratch += sprintf(scratch, "NAME=\"%s\"", dev->name) + 1;
 	}
 
 	if (dev->phys) {
@@ -389,23 +365,126 @@ static void input_call_hotplug(char *ver
 
 	envp[i++] = NULL;
 
+	return 0;
+}
+
+int input_hotplug(struct class_device *cdev, char **envp, int num_envp,
+		  char *buffer, int buffer_size)
+{
+	struct input_dev *dev;
+
+	if (!cdev)
+		return -ENODEV;
 #ifdef INPUT_DEBUG
-	printk(KERN_DEBUG "input.c: calling %s %s [%s %s %s %s %s]\n",
-		argv[0], argv[1], envp[0], envp[1], envp[2], envp[3], envp[4]);
+	printk(KERN_DEBUG "%s: entered for dev %p\n", __FUNCTION__, 
+	       &cdev->dev);
 #endif
 
-	value = call_usermodehelper(argv [0], argv, envp, 0);
+	dev = container_of(cdev,struct input_dev,cdev);
 
-	kfree(buf);
-	kfree(envp);
+	return __input_hotplug(dev, envp, num_envp, buffer, buffer_size);
+}
 
-#ifdef INPUT_DEBUG
-	if (value != 0)
-		printk(KERN_DEBUG "input.c: hotplug returned %d\n", value);
-#endif
+#else
+int input_hotplug(struct class_device *cdev, char **envp, int num_envp,
+		  char *buffer, int buffer_size)
+{
+    return 0;
 }
+#endif /* CONFIG_HOTPLUG */
 
-#endif
+#define INPUT_ATTR_BIT_B(bit, max) \
+	do { \
+		for (i = NBITS(max) - 1; i >= 0; i--) \
+			if (dev->bit[i]) break; \
+		for (; i >= 0; i--) \
+			len += sprintf(buf + len, "%lx ", dev->bit[i]); \
+		if (len) len += sprintf(buf + len, "\n"); \
+	} while (0)
+
+#define INPUT_ATTR_BIT_B2(bit, max, ev) \
+	do { \
+		if (test_bit(ev, dev->evbit)) \
+			INPUT_ATTR_BIT_B(bit, max); \
+	} while (0)
+
+
+static ssize_t input_class_show_ev(struct class_device *class_dev, char *buf)
+{
+	struct input_dev *dev = container_of(class_dev, struct input_dev,cdev);
+	int i, len = 0;
+
+	INPUT_ATTR_BIT_B(evbit, EV_MAX);
+	return len;
+}
+
+#define INPUT_CLASS_ATTR_BIT(_name,_bit) \
+static ssize_t input_class_show_##_bit(struct class_device *class_dev, \
+				       char *buf) \
+{ \
+	struct input_dev *dev = container_of(class_dev,struct input_dev,cdev); \
+        int i, len = 0; \
+\
+	INPUT_ATTR_BIT_B2(_bit##bit, _name##_MAX, EV_##_name); \
+	return len; \
+}
+
+INPUT_CLASS_ATTR_BIT(KEY,key)
+INPUT_CLASS_ATTR_BIT(REL,rel)
+INPUT_CLASS_ATTR_BIT(ABS,abs)
+INPUT_CLASS_ATTR_BIT(MSC,msc)
+INPUT_CLASS_ATTR_BIT(LED,led)
+INPUT_CLASS_ATTR_BIT(SND,snd)
+INPUT_CLASS_ATTR_BIT(FF,ff)
+
+static ssize_t input_class_show_phys(struct class_device *class_dev, char *buf)
+{
+	struct input_dev *dev = container_of(class_dev,struct input_dev,cdev);
+
+	return sprintf(buf, "%s\n", dev->phys ? dev->phys : "(none)" );
+}
+
+static ssize_t input_class_show_name(struct class_device *class_dev, char *buf)
+{
+	struct input_dev *dev = container_of(class_dev,struct input_dev,cdev);
+
+	return sprintf(buf, "%s\n", dev->name ? dev->name : "(none)" );
+}
+
+static ssize_t input_class_show_product(struct class_device *class_dev, char *buf)
+{
+	struct input_dev *dev = container_of(class_dev,struct input_dev,cdev);
+
+	return sprintf(buf, "%x/%x/%x/%x\n", dev->id.bustype, dev->id.vendor, 
+		       dev->id.product, dev->id.version);
+}
+
+static struct class_device_attribute input_device_class_attrs[] = {
+	__ATTR( product, S_IRUGO, input_class_show_product, NULL) ,
+	__ATTR( phys, S_IRUGO, input_class_show_phys, NULL ),
+	__ATTR( name, S_IRUGO, input_class_show_name, NULL) ,
+	__ATTR( ev, S_IRUGO, input_class_show_ev, NULL) ,
+	__ATTR( key, S_IRUGO, input_class_show_key, NULL) ,
+	__ATTR( rel, S_IRUGO, input_class_show_rel, NULL) ,
+	__ATTR( abs, S_IRUGO, input_class_show_abs, NULL) ,
+	__ATTR( msc, S_IRUGO, input_class_show_msc, NULL) ,
+	__ATTR( led, S_IRUGO, input_class_show_led, NULL) ,
+	__ATTR( snd, S_IRUGO, input_class_show_snd, NULL) ,
+	__ATTR( ff, S_IRUGO, input_class_show_ff, NULL) ,
+	__ATTR_NULL,
+};
+
+static void input_device_class_release( struct class_device *class_dev )
+{
+	put_device(class_dev->dev);
+}
+
+static struct class input_device_class = {
+	.name =		"input_device",
+	.hotplug = 	input_hotplug,
+	.release = 	input_device_class_release,
+	.class_dev_attrs = input_device_class_attrs,
+};
 
 void input_register_device(struct input_dev *dev)
 {
@@ -413,6 +492,18 @@ void input_register_device(struct input_
 	struct input_handler *handler;
 	struct input_device_id *id;
 
+	dev->cdev.class = &input_device_class;
+	
+	dev->cdev.dev = get_device(dev->dev);
+	sprintf(dev->cdev.class_id, "input%d", 
+		atomic_inc_return(&input_device_num));
+
+	if (class_device_register(&dev->cdev)) {
+		if (dev->dev)
+			put_device(dev->dev);
+		return;
+	}
+
 	set_bit(EV_SYN, dev->evbit);
 
 	/*
@@ -437,10 +528,6 @@ void input_register_device(struct input_
 				if ((handle = handler->connect(handler, dev, id)))
 					input_link_handle(handle);
 
-#ifdef CONFIG_HOTPLUG
-	input_call_hotplug("add", dev);
-#endif
-
 #ifdef CONFIG_PROC_FS
 	input_devices_state++;
 	wake_up(&input_devices_poll_wait);
@@ -462,12 +549,10 @@ void input_unregister_device(struct inpu
 		handle->handler->disconnect(handle);
 	}
 
-#ifdef CONFIG_HOTPLUG
-	input_call_hotplug("remove", dev);
-#endif
-
 	list_del_init(&dev->node);
 
+	class_device_unregister(&dev->cdev);
+
 #ifdef CONFIG_PROC_FS
 	input_devices_state++;
 	wake_up(&input_devices_poll_wait);
@@ -711,6 +796,13 @@ static int __init input_init(void)
 	input_class = class_simple_create(THIS_MODULE, "input");
 	if (IS_ERR(input_class))
 		return PTR_ERR(input_class);
+
+	retval = class_register(&input_device_class);
+	if (retval) {
+		class_simple_destroy(input_class);
+		return retval;
+	}
+
 	input_proc_init();
 	retval = register_chrdev(INPUT_MAJOR, "input", &input_fops);
 	if (retval) {
@@ -718,6 +810,7 @@ static int __init input_init(void)
 		remove_proc_entry("devices", proc_bus_input_dir);
 		remove_proc_entry("handlers", proc_bus_input_dir);
 		remove_proc_entry("input", proc_bus);
+		class_unregister(&input_device_class);
 		class_simple_destroy(input_class);
 		return retval;
 	}
@@ -728,6 +821,7 @@ static int __init input_init(void)
 		remove_proc_entry("handlers", proc_bus_input_dir);
 		remove_proc_entry("input", proc_bus);
 		unregister_chrdev(INPUT_MAJOR, "input");
+		class_unregister(&input_device_class);
 		class_simple_destroy(input_class);
 	}
 	return retval;
@@ -741,6 +835,7 @@ static void __exit input_exit(void)
 
 	devfs_remove("input");
 	unregister_chrdev(INPUT_MAJOR, "input");
+	class_unregister(&input_device_class);
 	class_simple_destroy(input_class);
 }
 
diff --git a/include/linux/input.h b/include/linux/input.h
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -12,6 +12,7 @@
 #ifdef __KERNEL__
 #include <linux/time.h>
 #include <linux/list.h>
+#include <linux/device.h>
 #else
 #include <sys/time.h>
 #include <sys/ioctl.h>
@@ -860,6 +861,7 @@ struct input_dev {
 
 	struct input_handle *grab;
 	struct device *dev;
+	struct class_device cdev;
 
 	struct list_head	h_list;
 	struct list_head	node;

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

* Re: fully udev-based hotplug system
  2005-06-23 21:54 fully udev-based hotplug system Marco d'Itri
                   ` (3 preceding siblings ...)
  2005-06-24 12:27 ` Kay Sievers
@ 2005-06-24 12:35 ` Marco d'Itri
  2005-06-24 12:43 ` Kay Sievers
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Marco d'Itri @ 2005-06-24 12:35 UTC (permalink / raw)
  To: linux-hotplug

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

On Jun 24, Kay Sievers <kay.sievers@vrfy.org> wrote:

> > ACTION=="add", SUBSYSTEM=="input", BUS=="serio", \
> > 	RUN+="/etc/hotplug/serio.agent"
>
> The input subsystem is still broken and calls /sbin/hotplug directly.
> The SUSE kernels introduced a "input_device"-class to solve that, but during
> the last months the input-maintainers just _talk_ about ideas instead of
> fixing that mess. :( The patch we use is attached.
I understand that even if /proc/sys/kernel/hotplug is udevsend its
events will be ignored anyway as soon as a netlink message is received,
is this correct?
If it is, then I will have to disable netlink events processing in udev,
I cannot require Debian/unstable users to patch their kernels.

-- 
ciao,
Marco

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

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

* Re: fully udev-based hotplug system
  2005-06-23 21:54 fully udev-based hotplug system Marco d'Itri
                   ` (4 preceding siblings ...)
  2005-06-24 12:35 ` Marco d'Itri
@ 2005-06-24 12:43 ` Kay Sievers
  2005-06-24 18:33 ` Bill Nottingham
  2005-06-24 18:50 ` Greg KH
  7 siblings, 0 replies; 9+ messages in thread
From: Kay Sievers @ 2005-06-24 12:43 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Jun 24, 2005 at 02:35:38PM +0200, Marco d'Itri wrote:
> On Jun 24, Kay Sievers <kay.sievers@vrfy.org> wrote:
> 
> > > ACTION="add", SUBSYSTEM="input", BUS="serio", \
> > > 	RUN+="/etc/hotplug/serio.agent"
> >
> > The input subsystem is still broken and calls /sbin/hotplug directly.
> > The SUSE kernels introduced a "input_device"-class to solve that, but during
> > the last months the input-maintainers just _talk_ about ideas instead of
> > fixing that mess. :( The patch we use is attached.
> I understand that even if /proc/sys/kernel/hotplug is udevsend its
> events will be ignored anyway as soon as a netlink message is received,
> is this correct?

No, with bypassing the driver core, the input events will not have
a SEQNUM and will not be ignored by udevd. You just don't get the
benefit of saving the kernel forked events for all the correct events.

I have not tried it, but it should work. If not, tell me and I will fix
it. :)

Kay


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: fully udev-based hotplug system
  2005-06-23 21:54 fully udev-based hotplug system Marco d'Itri
                   ` (5 preceding siblings ...)
  2005-06-24 12:43 ` Kay Sievers
@ 2005-06-24 18:33 ` Bill Nottingham
  2005-06-24 18:50 ` Greg KH
  7 siblings, 0 replies; 9+ messages in thread
From: Bill Nottingham @ 2005-06-24 18:33 UTC (permalink / raw)
  To: linux-hotplug

Greg KH (greg@kroah.com) said: 
> > > The idea is to use udev as the hotplug multiplexer and totally kill
> > > /sbin/hotplug and /etc/hotplug.d/default/default.hotplug (and hotplug.d/
> > > too when other packages will stop using it).
> > > 
> > > ACTION="add", SUBSYSTEM="pci", MODALIAS="*", \
> > > 	RUN+="/sbin/modprobe $modalias"
> > > 
> > > ACTION="add", SUBSYSTEM="usb", MODALIAS="*", \
> > > 	RUN+="/sbin/modprobe $modalias"
> > 
> > How does this handle when multiple modules claim the same alias?
> > (this happens for PCI devices...)
> > 
> > One method is to patch the module utilities to just insert all
> > matches, I suppose.
> 
> That's exactly what modprobe now does in its latest version.

So, if udev has come down to just this, why isn't the kernel running
modprobe itself? :)

Bill


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

* Re: fully udev-based hotplug system
  2005-06-23 21:54 fully udev-based hotplug system Marco d'Itri
                   ` (6 preceding siblings ...)
  2005-06-24 18:33 ` Bill Nottingham
@ 2005-06-24 18:50 ` Greg KH
  7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2005-06-24 18:50 UTC (permalink / raw)
  To: linux-hotplug

On Fri, Jun 24, 2005 at 02:33:41PM -0400, Bill Nottingham wrote:
> Greg KH (greg@kroah.com) said: 
> > > > The idea is to use udev as the hotplug multiplexer and totally kill
> > > > /sbin/hotplug and /etc/hotplug.d/default/default.hotplug (and hotplug.d/
> > > > too when other packages will stop using it).
> > > > 
> > > > ACTION="add", SUBSYSTEM="pci", MODALIAS="*", \
> > > > 	RUN+="/sbin/modprobe $modalias"
> > > > 
> > > > ACTION="add", SUBSYSTEM="usb", MODALIAS="*", \
> > > > 	RUN+="/sbin/modprobe $modalias"
> > > 
> > > How does this handle when multiple modules claim the same alias?
> > > (this happens for PCI devices...)
> > > 
> > > One method is to patch the module utilities to just insert all
> > > matches, I suppose.
> > 
> > That's exactly what modprobe now does in its latest version.
> 
> So, if udev has come down to just this, why isn't the kernel running
> modprobe itself? :)

Someone has suggested just this, see the horrible patch in the archives
:)

thanks,

greg k-h


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

end of thread, other threads:[~2005-06-24 18:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-23 21:54 fully udev-based hotplug system Marco d'Itri
2005-06-24  3:04 ` Bill Nottingham
2005-06-24  5:00 ` Greg KH
2005-06-24  5:02 ` Greg KH
2005-06-24 12:27 ` Kay Sievers
2005-06-24 12:35 ` Marco d'Itri
2005-06-24 12:43 ` Kay Sievers
2005-06-24 18:33 ` Bill Nottingham
2005-06-24 18:50 ` Greg KH

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.