* hotplugging with current modutils and usbd cvs
@ 2001-01-08 16:55 Norbert Preining
2001-01-08 21:46 ` David Brownell
0 siblings, 1 reply; 2+ messages in thread
From: Norbert Preining @ 2001-01-08 16:55 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 1153 bytes --]
Hi there!
Here my experiences with hotplugging with modutils-2.4.1, linux-2.4.0
with the hotplug patch applied.
My devices plug well AFTER I add the matchflag to the read statement
in the hotplug script. But for mousedev/joydev hotplugging I had
to patch in the input-hotplug patch.
usb-storage and joydev does NOT hotplug, but I still use my local-usbmap
approach to do this.
I attach the folowing files:
hotplug-local.patch
Patch for new modules.usbmap format and for local map support
usb-map.local
My local usbmap for usb-storage (sddr-31) and joydev for
Logitech Wingman Digital Extreme
input.patch
The patch for automagically hotpluging of mousedev (and joydev?)
From David Brownell
I hope that helps and we see improved usbd cvs scripts soon ;-)
Best wishes
Norbert
--
ciao
norb
+-------------------------------------------------------------------+
| Norbert Preining http://www.logic.at/people/preining |
| University of Technology Vienna, Austria preining@logic.at |
| DSA: 0x09C5B094 (RSA: 0xCF1FA165) mail subject: get [DSA|RSA]-key |
+-------------------------------------------------------------------+
[-- Attachment #2: hotplug-local.patch --]
[-- Type: text/plain, Size: 1071 bytes --]
--- hotplug.orig Mon Jan 8 08:58:20 2001
+++ hotplug Mon Jan 8 17:43:24 2001
@@ -132,6 +132,8 @@
PCI_MAP=$MODDIR/modules.pcimap
USB_MAP=$MODDIR/modules.usbmap
+USB_LOCAL_MAP=/etc/usb/usb-map.local
+
DRIVERS=
####################################################################
@@ -207,7 +209,7 @@
# NOTE: this match algorithm is just a filter; some drivers need
# to look at the device for reasons other than paranoia
- while read module idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol ignored
+ while read module matchflag idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol ignored
do
: checkmatch $module
@@ -362,6 +364,11 @@
if [ -f $2 ]; then
$1_convert_vars
$1_map_modules < $2
+ if [ "$1" = "usb" ] ; then
+ if [ -f "$USB_LOCAL_MAP" ] ; then
+ usb_map_modules < $USB_LOCAL_MAP
+ fi
+ fi
else
mesg "$2 missing"
exit 1
[-- Attachment #3: usb-map.local --]
[-- Type: text/plain, Size: 536 bytes --]
# usb module match_flag idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
joydev 0x0 0x046d 0xc207 0x0000 0x0000 0x00 0x00 0x00 0x03 0x00 0x00 0x00000000
usb-storage 0x0 0x0781 0x0002 0x0000 0x0000 0x00 0x00 0x00 0x08 0x06 0x50 0x00000000
[-- Attachment #4: input.patch --]
[-- Type: text/plain, Size: 2088 bytes --]
--- test12-pre3b/drivers/input-pre3/joydev.c Thu Nov 30 12:02:31 2000
+++ linux/drivers/input/joydev.c Mon Dec 11 10:07:42 2000
@@ -86,6 +86,21 @@
MODULE_DESCRIPTION("Joystick device driver");
MODULE_SUPPORTED_DEVICE("input/js");
+
+#ifdef CONFIG_HOTPLUG
+#if defined(CONFIG_USB_HID) || defined(CONFIG_USB_HID_MODULE)
+#include <linux/usb.h>
+
+static const struct usb_device_id usb_table [] = {
+ /* hid class, joystick protocol */
+ { bInterfaceClass: 3, bInterfaceSubClass: 1, bInterfaceProtocol: 4},
+ { } /* Terminating entry */
+};
+MODULE_DEVICE_TABLE (usb, usb_table);
+#endif /* USB HID */
+#endif /* HOTPLUG */
+
+
static int joydev_correct(int value, struct js_corr *corr)
{
switch (corr->type) {
--- test12-pre3b/drivers/input-pre3/keybdev.c Thu Nov 30 12:02:31 2000
+++ linux/drivers/input/keybdev.c Mon Dec 11 10:07:11 2000
@@ -36,6 +36,19 @@
#include <linux/module.h>
#include <linux/kbd_kern.h>
+#ifdef CONFIG_HOTPLUG
+#if defined(CONFIG_USB_HID) || defined(CONFIG_USB_HID_MODULE)
+#include <linux/usb.h>
+
+static const struct usb_device_id usb_table [] = {
+ /* hid class, keyboard protocol */
+ { bInterfaceClass: 3, bInterfaceSubClass: 1, bInterfaceProtocol: 1},
+ { } /* Terminating entry */
+};
+MODULE_DEVICE_TABLE (usb, usb_table);
+#endif /* USB HID */
+#endif /* HOTPLUG */
+
#if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(__alpha__) || defined(__mips__)
static int x86_sysrq_alt = 0;
--- test12-pre3b/drivers/input-pre3/mousedev.c Thu Nov 30 12:02:31 2000
+++ linux/drivers/input/mousedev.c Mon Dec 11 10:06:52 2000
@@ -48,6 +48,19 @@
#define CONFIG_INPUT_MOUSEDEV_SCREEN_Y 768
#endif
+#ifdef CONFIG_HOTPLUG
+#if defined(CONFIG_USB_HID) || defined(CONFIG_USB_HID_MODULE)
+#include <linux/usb.h>
+
+static const struct usb_device_id usb_table [] = {
+ /* hid class, mouse protocol */
+ { bInterfaceClass: 3, bInterfaceSubClass: 1, bInterfaceProtocol: 2},
+ { } /* Terminating entry */
+};
+MODULE_DEVICE_TABLE (usb, usb_table);
+#endif /* USB HID */
+#endif /* HOTPLUG */
+
struct mousedev {
int exist;
int open;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: hotplugging with current modutils and usbd cvs
2001-01-08 16:55 hotplugging with current modutils and usbd cvs Norbert Preining
@ 2001-01-08 21:46 ` David Brownell
0 siblings, 0 replies; 2+ messages in thread
From: David Brownell @ 2001-01-08 21:46 UTC (permalink / raw)
To: linux-hotplug
Hi Norbert,
Try the package I just posted ... it incorporates updated
versions of your patches (I've seen it hotplug mice and
keyboards without a kernel patch, and has your joystick
product/vendor codes), and has lots of other cleanup.
Notably, it switches entirely over to using /etc/hotplug;
I'm not going to be touching /etc/usb/* again.
The newer scripts have been in CVS (linux-usb at sourceforge)
for a while now, but they're in the "usbd/hotplug" directory
instead of hte "usbd/etc" directory. They don't actually
try to use the match_flags, or cope with "old" versions of
"modules.usbmap" (without match_flags) ... volunteers?
- Dave
_______________________________________________
Linux-hotplug-devel mailing list
Linux-hotplug-devel@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-01-08 21:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-08 16:55 hotplugging with current modutils and usbd cvs Norbert Preining
2001-01-08 21:46 ` David Brownell
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).