[Bug 14941] udev not loading joystick module/creating joystick device

bugzilla-daemon at bugzilla.ubuntu.com bugzilla-daemon at bugzilla.ubuntu.com
Fri Sep 23 23:46:29 UTC 2005


Please do not reply to this email.  You can add comments at
http://bugzilla.ubuntu.com/show_bug.cgi?id=14941
Ubuntu | hotplug





------- Additional Comments From debzilla at ubuntu.com  2005-09-24 00:46 UTC -------
Message-Id: <1127517187.28927.22.camel at localhost.localdomain>
Date: Sat, 24 Sep 2005 00:13:07 +0100
From: Scott James Remnant <scott at ubuntu.com>
To: 328685 at bugs.debian.org, Debian Kernel Team <debian-kernel at lists.debian.org>,
	Marco d'Itri <md at Linux.IT>
Subject: udev: main: action, subsystem or devpath missing

--=-zi1zEZaOeXx0Q2S2xJcF
Content-Type: multipart/mixed; boundary="=-HS/xhRS6lqwUixJxEXED"


--=-HS/xhRS6lqwUixJxEXED
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

This is simultaneously caused by the kernel input subsystem not using
the new driver core, and the changes to udev to obsolete the /etc/dev.d
and /etc/hotplug.d directories.


With the new driver core the driver has an opportunity to add
environment to the uevent[0] generated along with the sysfs information
before the event is sent to userspace via the netlink socket and, for
backwards compatibility, the /proc/sys/kernel/hotplug interface.

However the input subsystem isn't yet doing this, so the sysfs-generated
event doesn't carry any of the PRODUCT, EV, KEY, etc. environment
variables describing the input device.

Instead the input subsystem has its own function to generate the
environment for a call to the /proc/sys/kernel/hotplug helper.  This is
done in drivers/input.c input_call_hotplug().

Because this isn't related to the sysfs event, there's no way for it to
include the DEVPATH variable that points to the path in the sysfs
filesystem.

There are patches starting to float around now to update the kernel to
use the new driver core; at this point udev will be able to
drop /proc/sys/kernel/hotplug compatibility completely as all events
will come from the netlink socket and be well-formed.


udev *used* to handle this; when it received an event without the
required variables it would skip any udev.rules processing and just run
the old /etc/hotplug.d/ scripts.

udev-0.059 dropped direct support for these scripts, and instead
included a "udev_run_hotplugd" helper that distributions could chose to
ship alongside and add a udev.rules entry to run it.

This also meant that support for the "malformed" uevents was dropped at
the same time, as there's no way to perform udev.rules checking with
them.


The right solution, long-term, is for the kernel to use the new driver
core for the input subsystem.  This will mean all sorts of hacks will go
away, and bring us one step closer to world peace and stuff.

The short term solution we've adopted in Ubuntu is the attached patch
that handles input subsystem events that are missing a devpath by
directly execing udev_run_hotplugd and letting that deal with it.

Scott

[0] the new name for what used to be hotplug events.
--=20
Scott James Remnant
scott at ubuntu.com

--=-HS/xhRS6lqwUixJxEXED
Content-Description: 
Content-Disposition: inline; filename=hotplug_input_events
Content-Type: text/x-patch; charset=UTF-8
Content-Transfer-Encoding: base64

ZGlmZiAtcnVOcCB1ZGV2LTA2MC5vcmlnL3VkZXYuYyB1ZGV2LTA2MC91ZGV2LmMNCi0tLSB1ZGV2
LTA2MC5vcmlnL3VkZXYuYwkyMDA1LTA5LTIzIDIzOjA4OjI1LjM3NDg4MzAwMCArMDEwMA0KKysr
IHVkZXYtMDYwL3VkZXYuYwkyMDA1LTA5LTIzIDIzOjIyOjQ1LjAzNDE5NTg2NCArMDEwMA0KQEAg
LTExNCwxMSArMTE0LDI1IEBAIGludCBtYWluKGludCBhcmdjLCBjaGFyICphcmd2W10sIGNoYXIg
KmUNCiAJaWYgKCFzdWJzeXN0ZW0gJiYgYXJnYyA9PSAyKQ0KIAkJc3Vic3lzdGVtID0gYXJndlsx
XTsNCiANCi0JaWYgKCFhY3Rpb24gfHwgIXN1YnN5c3RlbSB8fCAhZGV2cGF0aCkgew0KLQkJZXJy
KCJhY3Rpb24sIHN1YnN5c3RlbSBvciBkZXZwYXRoIG1pc3NpbmciKTsNCisJaWYgKCFhY3Rpb24g
fHwgIXN1YnN5c3RlbSkgew0KKwkJZXJyKCJhY3Rpb24gb3Igc3Vic3lzdGVtIG1pc3NpbmciKTsN
CiAJCWdvdG8gZXhpdDsNCiAJfQ0KIA0KKwlpZiAoIWRldnBhdGgpIHsNCisJCWlmICghc3RyY21w
KHN1YnN5c3RlbSwgImlucHV0IikpIHsNCisJCQlkYmcoImlucHV0IGV2ZW50IHdpdGhvdXQgZGV2
cGF0aCIpOw0KKwkJCWxvZ2dpbmdfY2xvc2UoKTsNCisNCisJCQlleGVjdigiL3NiaW4vdWRldl9y
dW5faG90cGx1Z2QiLCBhcmd2KTsNCisJCQllcnIoImV4ZWMgb2YgY2hpbGQgZmFpbGVkIik7DQor
CQkJX2V4aXQoMSk7DQorCQl9IGVsc2Ugew0KKwkJCWVycigiZGV2cGF0aCBtaXNzaW5nIik7DQor
CQkJZ290byBleGl0Ow0KKwkJfQ0KKwl9DQorDQogCS8qIGV4cG9ydCBsb2dfcHJpb3JpdHkgLCBh
cyBjYWxsZWQgcHJvZ3JhbXMgbWF5IHdhbnQgdG8gZG8gdGhlIHNhbWUgYXMgdWRldiAqLw0KIAlp
ZiAodWRldl9sb2dfcHJpb3JpdHkpIHsNCiAJCWNoYXIgcHJpb3JpdHlbMzJdOw0K


--=-HS/xhRS6lqwUixJxEXED--

--=-zi1zEZaOeXx0Q2S2xJcF
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBDNIwDSnQiFMl4yK4RAhKOAJwPHCWelljZT0EE1qNl8uFoKFx10QCbBT2C
irWEYokp/LsjLX3BsGU4Sv0=
=qIgA
-----END PGP SIGNATURE-----

--=-zi1zEZaOeXx0Q2S2xJcF--

-- 
Configure bugmail: http://bugzilla.ubuntu.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.




More information about the kernel-bugs mailing list