USB coldplug problem
Hi,
I'm running a debian on a 2.6.2 custom kernel.
got a coldplug problem with USB.
My usb dsl modem would cold plug and configure juste fine, but cold-plug refuses to work.
I saw there still are a lot of FIXME lines in the scripts, and then I wondered
-1) how is it possible that coldplug does not work if hotplug does ?? (I guess that setting the $PRODUCT stuff to 0/0/0 does not help cold-pluging) -2) if it is a problem/bug from the scripts how can I help fixing things around ?
many thanx in advance for you help/tips/whatever may help me understand the problem.
BTW. I'm not desperate as the etc/rc.d scripts handle the modem for now, but still I fell kind of frustrated by this failure. ;o)
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
usb coldplug problem
Hi!
I'm the maintainter of the USBDUX board which connects via the USB to linux.
In order to work properly the USBDUX needs firmware uploaded. So, I wrote a udev rule which uploads the firmware as soon as there's a udev event from the USB BUS (this is done via comedi_config). This works fine for hotplug but not for coldplug. So I need to pull the USB plug and back again to get the firmware loaded. I've checked with udevadm monitor and there are indeed no udev events during boot relating to the usbdux. Even a udevadm trigger produces no hotplug events for the USBDUX during boot time -- however later it does. It seems so that the usb subsystem is loading the usbdux module earlier on in the boot process so that no udev events are triggered later in the boot process. Any other ideas? It is really annoying that one has to pull out the plug and plug it back in again to trigger the firmware upload.
I've been trying to solve the problem for a couple of weeks but without success. With the old hotplug mechanism I had never problems.
Here's one variant. I've tried other simpler versions but the result is always the same.
ACTION!="add", GOTO="usbdux_end"
SUBSYSTEM="usb_device", GOTO="usbdux_rules_real" SUBSYSTEM="usb", GOTO="usbdux_rules_real"
BUS!="usb", GOTO="usbdux_end"
LABEL="usbdux_rules_real"
SYSFS{idVendor}="13d8", SYSFS{idProduct}="0001", RUN+="/lib/udev/usbdux" SYSFS{idVendor}="13d8", SYSFS{idProduct}="0002", RUN+="/lib/udev/usbdux" SYSFS{idVendor}="13d8", SYSFS{idProduct}="0010", RUN+="/lib/udev/usbduxfast"
LABEL="usbdux_end"
/Bernd
Below the mails from the comedi mailing list (with a kernel log and all udev events logged over boot time).
-----------------------------------------------------------------------
Hi Ian,
I've done some more investigations. The usbdux kernel module is loaded but it triggers absolutely no udev event at boot time. I've added a udevadm monitor line to my init script right before "udevadm trigger" is called (see below). With no events at boot time I can place the udeve rule whereever I like. It won't be called anyway. Interesting that other drivers cause events but comedi stays absolutely silent. Any ideas?
/Bernd
Nov 30 20:21:13 bp1-desktop kernel: [ 62.448290] sky2 eth0: addr 00:19:21:05:bf:b8 Nov 30 20:21:13 bp1-desktop kernel: [ 62.708707] comedi: version 0.7.76 - http://www.comedi.org Nov 30 20:21:13 bp1-desktop kernel: [ 62.745873] /home/bp1/ubuntu/comedi-0.7.76-hardy/comedi/drivers/usbdux.c: v2.1:Stirling/ITL USB-DUX -- [email protected] Nov 30 20:21:13 bp1-desktop kernel: [ 62.745941] comedi_: usbdux: setting all possible devs to invalid Nov 30 20:21:13 bp1-desktop kernel: [ 62.746019] comedi_: usbdux_: finding a free structure for the usb-device Nov 30 20:21:13 bp1-desktop kernel: [ 62.746062] comedi_: usbdux: usbduxsub[0] is ready to connect to comedi. Nov 30 20:21:13 bp1-desktop kernel: [ 62.746106] comedi_: usbdux: ifnum=0 Nov 30 20:21:13 bp1-desktop kernel: [ 62.746485] comedi_: usbdux0 has been successfully initialised. Nov 30 20:21:13 bp1-desktop kernel: [ 62.746544] usbcore: registered new interface driver usbdux Nov 30 20:21:13 bp1-desktop kernel: [ 63.009740] ACPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 16 (level, low) -> IRQ 16 Nov 30 20:21:13 bp1-desktop kernel: [ 63.009841] PCI: Setting latency timer of device 0000:00:1b.0 to 64 Nov 30 20:21:13 bp1-desktop kernel: [ 63.043500] hda_codec: Unknown model for ALC883, trying auto-probe from BIOS... Nov 30 20:21:13 bp1-desktop kernel: [ 63.736165] lp0: using parport0 (interrupt-driven). Nov 30 20:21:13 bp1-desktop kernel: [ 63.814368] Adding 10233364k swap on /dev/sda1. Priority:-1 extents:1 across:10233364k Nov 30 20:21:13 bp1-desktop kernel: [ 63.833369] Adding 2048248k swap on /dev/sdc1. Priority:-2 extents:1 across:2048248k Nov 30 20:21:13 bp1-desktop kernel: [ 75.242196] ReiserFS: sdc2: found reiserfs format "3.6" with standard journal Nov 30 20:21:13 bp1-desktop kernel: [ 75.242213] ReiserFS: sdc2: using ordered data mode Nov 30 20:21:13 bp1-desktop kernel: [ 75.246057] ReiserFS: sdc2: journal params: device sdc2, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30 Nov 30 20:21:13 bp1-desktop kernel: [ 75.246450] ReiserFS: sdc2: checking transaction log (sdc2) Nov 30 20:21:13 bp1-desktop kernel: [ 75.310446] ReiserFS: sdc2: Using r5 hash to sort names Nov 30 20:21:13 bp1-desktop kernel: [ 75.612978] kjournald starting. Commit interval 5 seconds Nov 30 20:21:13 bp1-desktop kernel: [ 75.612994] EXT3-fs warning: maximal mount count reached, running e2fsck is recommended Nov 30 20:21:13 bp1-desktop kernel: [ 75.617174] EXT3 FS on sdd1, internal journal Nov 30 20:21:13 bp1-desktop kernel: [ 75.617181] EXT3-fs: mounted filesystem with ordered data mode. Nov 30 20:21:13 bp1-desktop kernel: [ 75.990166] ip_tables: (C) 2000-2006 Netfilter Core Team Nov 30 20:21:13 bp1-desktop kernel: [ 77.580960] No dock devices found. Nov 30 20:21:13 bp1-desktop NetworkManager: <info> starting... Nov 30 20:21:14 bp1-desktop logger: SUBSYSTEM=module Nov 30 20:21:14 bp1-desktop logger: SEQNUM)13 Nov 30 20:21:14 bp1-desktop logger: Nov 30 20:21:14 bp1-desktop logger: UEVENT[1228076473.083811] add /bus/acpi/drivers/sbs (drivers) Nov 30 20:21:14 bp1-desktop logger: ACTIONd Nov 30 20:21:14 bp1-desktop logger: DEVPATH=/bus/acpi/drivers/sbs Nov 30 20:21:14 bp1-desktop logger: SUBSYSTEM=drivers Nov 30 20:21:14 bp1-desktop logger: SEQNUM)14 Nov 30 20:21:14 bp1-desktop logger: Nov 30 20:21:14 bp1-desktop logger: UEVENT[1228076473.102882] add /module/container (module) Nov 30 20:21:14 bp1-desktop logger: ACTIONd Nov 30 20:21:14 bp1-desktop logger: DEVPATH=/module/container Nov 30 20:21:14 bp1-desktop logger: SUBSYSTEM=module Nov 30 20:21:14 bp1-desktop logger: SEQNUM)15 Nov 30 20:21:14 bp1-desktop logger: Nov 30 20:21:14 bp1-desktop logger: UEVENT[1228076473.103050] add /bus/acpi/drivers/container (drivers) Nov 30 20:21:14 bp1-desktop logger: ACTIONd Nov 30 20:21:14 bp1-desktop logger: DEVPATH=/bus/acpi/drivers/container Nov 30 20:21:14 bp1-desktop logger: SUBSYSTEM=drivers Nov 30 20:21:14 bp1-desktop logger: SEQNUM)16 Nov 30 20:21:14 bp1-desktop logger: Nov 30 20:21:14 bp1-desktop logger: UEVENT[1228076473.137875] add /module/output (module) Nov 30 20:21:14 bp1-desktop logger: ACTIONd Nov 30 20:21:14 bp1-desktop kernel: [ 78.652091] NET: Registered protocol family 10 Nov 30 20:21:14 bp1-desktop kernel: [ 78.652375] lo: Disabled Privacy Extensions Nov 30 20:21:14 bp1-desktop logger: DEVPATH=/module/output Nov 30 20:21:14 bp1-desktop logger: SUBSYSTEM=module Nov 30 20:21:14 bp1-desktop logger: SEQNUM)17 Nov 30 20:21:14 bp1-desktop logger: Nov 30 20:21:14 bp1-desktop logger: UEVENT[1228076473.138036] add /class/video_output (class) Nov 30 20:21:14 bp1-desktop logger: ACTIONd Nov 30 20:21:14 bp1-desktop logger: DEVPATH=/class/video_output Nov 30 20:21:14 bp1-desktop logger: SUBSYSTEM=class Nov 30 20:21:14 bp1-desktop logger: SEQNUM)18 Nov 30 20:21:14 bp1-desktop logger: Nov 30 20:21:14 bp1-desktop logger: UEVENT[1228076473.139463] add /module/video (module) Nov 30 20:21:14 bp1-desktop logger: ACTIONd Nov 30 20:21:14 bp1-desktop logger: DEVPATH=/module/video Nov 30 20:21:14 bp1-desktop logger: SUBSYSTEM=module Nov 30 20:21:14 bp1-desktop logger: SEQNUM)19 Nov 30 20:21:14 bp1-desktop logger: Nov 30 20:21:14 bp1-desktop logger: UEVENT[1228076473.139595] add /bus/acpi/drivers/video (drivers) Nov 30 20:21:14 bp1-desktop logger: ACTIONd Nov 30 20:21:14 bp1-desktop logger: DEVPATH=/bus/acpi/drivers/video Nov 30 20:21:14 bp1-desktop logger: SUBSYSTEM=drivers Nov 30 20:21:14 bp1-desktop logger: SEQNUM)20 Nov 30 20:21:14 bp1-desktop logger: Nov 30 20:21:14 bp1-desktop logger: UEVENT[1228076474.036343] add /module/ipv6 (module) Nov 30 20:21:14 bp1-desktop avahi-daemon[5943]: Found user 'avahi' (UID 109) and group 'avahi' (GID 120). Nov 30 20:21:14 bp1-desktop avahi-daemon[5943]: Successfully dropped root privileges. Nov 30 20:21:14 bp1-desktop avahi-daemon[5943]: avahi-daemon 0.6.22 starting up. Nov 30 20:21:14 bp1-desktop avahi-daemon[5943]: Successfully called chroot(). Nov 30 20:21:14 bp1-desktop avahi-daemon[5943]: Successfully dropped remaining capabilities. Nov 30 20:21:14 bp1-desktop avahi-daemon[5943]: No service file found in /etc/avahi/services. Nov 30 20:21:14 bp1-desktop avahi-daemon[5943]: Network interface enumeration completed. Nov 30 20:21:14 bp1-desktop avahi-daemon[5943]: Registering HINFO record with values 'I686'/'LINUX'. Nov 30 20:21:14 bp1-desktop avahi-daemon[5943]: Server startup complete. Host name is bp1-desktop.local. Local service cookie is 2608945779. Nov 30 20:21:14 bp1-desktop kernel: [ 78.902366] apm: BIOS version 1.2 Flags 0x07 (Driver version 1.16ac) Nov 30 20:21:14 bp1-desktop kernel: [ 78.902373] apm: disabled - APM is not SMP safe. Nov 30 20:21:14 bp1-desktop atieventsd[5975]: ATI External Events Daemon started... Nov 30 20:21:14 bp1-desktop atieventsd[5975]: Event daemon control socket created Nov 30 20:21:14 bp1-desktop atieventsd[5975]: acpid connection established Nov 30 20:21:14 bp1-desktop kernel: [ 79.160190] ppdev: user-space parallel port driver Nov 30 20:21:14 bp1-desktop cupsd[6003]: *** WARNING *** The program 'cupsd' uses the Apple Bonjour compatibility layer of Avahi. Nov 30 20:21:14 bp1-desktop cupsd[6003]: *** WARNING *** Please fix your application to use the native API of Avahi! Nov 30 20:21:14 bp1-desktop cupsd[6003]: *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=cupsd> Nov 30 20:21:14 bp1-desktop kernel: [ 79.392432] audit(1228076474.774:2): type03 operation="inode_permission" requested_mask="a::" denied_mask="a::" name="/dev/tty" pid`03 profile="/usr/sbin/cupsd" namespace="default" Nov 30 20:21:14 bp1-desktop cvslockd: CVS Lock service initialised successfully Nov 30 20:21:17 bp1-desktop dhcdbd: Started up. Nov 30 20:21:18 bp1-desktop kernel: [ 83.543814] sky2 eth0: enabling interface Nov 30 20:21:18 bp1-desktop kernel: [ 83.549237] ADDRCONF(NETDEV_UP): eth0: link is not ready Nov 30 20:21:18 bp1-desktop NetworkManager: <info> eth0: Device is fully-supported using driver 'sky2'. Nov 30 20:21:18 bp1-desktop NetworkManager: <info> nm_device_init(): waiting for device's worker thread to start Nov 30 20:21:18 bp1-desktop NetworkManager: <info> nm_device_init(): device's worker thread started, continuing. Nov 30 20:21:18 bp1-desktop NetworkManager: <info> Now managing wired Ethernet (802.3) device 'eth0'. Nov 30 20:21:18 bp1-desktop NetworkManager: <info> Deactivating device eth0. Nov 30 20:21:18 bp1-desktop NetworkManager: <info> Will activate wired connection 'eth0' because it now has a link. Nov 30 20:21:18 bp1-desktop NetworkManager: <debug> [1228076478.962450] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/storage_model_DVD_RW__DVR_111'). Nov 30 20:21:18 bp1-desktop hcid[6655]: Bluetooth HCI daemon Nov 30 20:21:18 bp1-desktop kernel: [ 83.604979] Bluetooth: Core ver 2.11 Nov 30 20:21:18 bp1-desktop logger: ACTIONd Nov 30 20:21:18 bp1-desktop logger: DEVPATH=/module/ipv6 Nov 30 20:21:18 bp1-desktop logger: SUBSYSTEM=module Nov 30 20:21:18 bp1-desktop logger: SEQNUM)21 Nov 30 20:21:18 bp1-desktop logger: Nov 30 20:21:18 bp1-desktop logger: UEVENT[1228076474.038223] add /slab/:0001408 (slab) Nov 30 20:21:18 bp1-desktop logger: ACTIONd Nov 30 20:21:18 bp1-desktop logger: DEVPATH=/slab/:0001408 Nov 30 20:21:18 bp1-desktop logger: SUBSYSTEM=slab Nov 30 20:21:18 bp1-desktop logger: SEQNUM)22 Nov 30 20:21:18 bp1-desktop logger: Nov 30 20:21:18 bp1-desktop kernel: [ 83.605512] NET: Registered protocol family 31 Nov 30 20:21:18 bp1-desktop kernel: [ 83.605516] Bluetooth: HCI device and connection manager initialized Nov 30 20:21:18 bp1-desktop kernel: [ 83.605520] Bluetooth: HCI socket layer initialized Nov 30 20:21:18 bp1-desktop logger: UEVENT[1228076474.287405] add /module/apm (module) Nov 30 20:21:18 bp1-desktop logger: ACTIONd Nov 30 20:21:18 bp1-desktop logger: DEVPATH=/module/apm Nov 30 20:21:18 bp1-desktop logger: SUBSYSTEM=module Nov 30 20:21:18 bp1-desktop logger: SEQNUM)23 Nov 30 20:21:18 bp1-desktop logger: Nov 30 20:21:18 bp1-desktop logger: UEVENT[1228076474.307237] remove /module/apm (module) Nov 30 20:21:18 bp1-desktop logger: ACTION=remove Nov 30 20:21:18 bp1-desktop logger: DEVPATH=/module/apm Nov 30 20:21:18 bp1-desktop logger: SUBSYSTEM=module Nov 30 20:21:18 bp1-desktop logger: SEQNUM)24 Nov 30 20:21:18 bp1-desktop logger: Nov 30 20:21:18 bp1-desktop logger: UEVENT[1228076474.545405] add /module/ppdev (module) Nov 30 20:21:18 bp1-desktop logger: ACTIONd Nov 30 20:21:18 bp1-desktop logger: DEVPATH=/module/ppdev Nov 30 20:21:18 bp1-desktop logger: SUBSYSTEM=module Nov 30 20:21:18 bp1-desktop logger: SEQNUM)25 Nov 30 20:21:18 bp1-desktop logger: Nov 30 20:21:18 bp1-desktop logger: UEVENT[1228076474.545602] add /class/ppdev (class) Nov 30 20:21:18 bp1-desktop logger: ACTIONd Nov 30 20:21:18 bp1-desktop logger: DEVPATH=/class/ppdev Nov 30 20:21:18 bp1-desktop logger: SUBSYSTEM=class Nov 30 20:21:18 bp1-desktop logger: SEQNUM)26 Nov 30 20:21:18 bp1-desktop logger: Nov 30 20:21:18 bp1-desktop logger: UEVENT[1228076474.545646] add /devices/pnp0/00:06/ppdev/parport0 (ppdev) Nov 30 20:21:18 bp1-desktop logger: ACTIONd Nov 30 20:21:18 bp1-desktop logger: DEVPATH=/devices/pnp0/00:06/ppdev/parport0 Nov 30 20:21:18 bp1-desktop logger: SUBSYSTEM=ppdev Nov 30 20:21:19 bp1-desktop logger: MAJOR™ Nov 30 20:21:19 bp1-desktop logger: MINOR=0 Nov 30 20:21:19 bp1-desktop logger: SEQNUM)27 Nov 30 20:21:19 bp1-desktop logger: Nov 30 20:21:19 bp1-desktop logger: UEVENT[1228076478.993727] add /module/bluetooth (module) Nov 30 20:21:19 bp1-desktop logger: ACTIONd Nov 30 20:21:19 bp1-desktop logger: DEVPATH=/module/bluetooth Nov 30 20:21:19 bp1-desktop logger: SUBSYSTEM=module Nov 30 20:21:19 bp1-desktop logger: SEQNUM)28 Nov 30 20:21:19 bp1-desktop logger: Nov 30 20:21:19 bp1-desktop hcid[6655]: Starting SDP server Nov 30 20:21:19 bp1-desktop kernel: [ 83.626363] Bluetooth: L2CAP ver 2.9 Nov 30 20:21:19 bp1-desktop kernel: [ 83.626369] Bluetooth: L2CAP socket layer initialized Nov 30 20:21:19 bp1-desktop hcid[6655]: Created local server at unix:abstract=/var/run/dbus-XpZJpt8Slx,guidþ2e5f18cd9c64358df59dcc4932f5bf Nov 30 20:21:19 bp1-desktop input[6688]: Bluetooth Input daemon Nov 30 20:21:19 bp1-desktop input[6688]: Registered input manager path:/org/bluez/input Nov 30 20:21:19 bp1-desktop NetworkManager: <debug> [1228076479.033246] nm_hal_device_added(): New device added (hal udi is '/org/freedesktop/Hal/devices/platform_bluetooth'). Nov 30 20:21:19 bp1-desktop audio[6693]: Bluetooth Audio daemon Nov 30 20:21:19 bp1-desktop audio[6693]: Unix socket created: 5 Nov 30 20:21:19 bp1-desktop audio[6693]: audio.conf: Key file does not have key 'Enable' Nov 30 20:21:19 bp1-desktop audio[6693]: audio.conf: Key file does not have key 'Disable' Nov 30 20:21:19 bp1-desktop kernel: [ 83.673818] Bluetooth: RFCOMM socket layer initialized Nov 30 20:21:19 bp1-desktop kernel: [ 83.673830] Bluetooth: RFCOMM TTY layer initialized Nov 30 20:21:19 bp1-desktop kernel: [ 83.673832] Bluetooth: RFCOMM ver 1.8 Nov 30 20:21:19 bp1-desktop audio[6693]: add_service_record: got record id 0x10000 Nov 30 20:21:19 bp1-desktop audio[6693]: audio.conf: Key file does not have key 'Disable' Nov 30 20:21:19 bp1-desktop audio[6693]: audio.conf: Key file does not have group 'A2DP' Nov 30 20:21:19 bp1-desktop last message repeated 3 times Nov 30 20:21:19 bp1-desktop audio[6693]: SEP 0x806d348 registered: type:0 codec:0 seid:1 Nov 30 20:21:19 bp1-desktop audio[6693]: add_service_record: got record id 0x10001 Nov 30 20:21:19 bp1-desktop audio[6693]: add_service_record: got record id 0x10002 Nov 30 20:21:19 bp1-desktop audio[6693]: add_service_record: got record id 0x10003 Nov 30 20:21:19 bp1-desktop audio[6693]: Registered manager path:/org/bluez/audio Nov 30 20:21:19 bp1-desktop logger: UEVENT[1228076478.995381] add /devices/platform/bluetooth (platform) Nov 30 20:21:19 bp1-desktop logger: ACTIONd Nov 30 20:21:19 bp1-desktop logger: DEVPATH=/devices/platform/bluetooth Nov 30 20:21:19 bp1-desktop logger: SUBSYSTEM=platform Nov 30 20:21:19 bp1-desktop logger: MODALIAS=platform:bluetooth Nov 30 20:21:19 bp1-desktop logger: SEQNUM)29 Nov 30 20:21:19 bp1-desktop logger: Nov 30 20:21:19 bp1-desktop logger: UEVENT[1228076478.995400] add /bus/bluetooth (bus) Nov 30 20:21:19 bp1-desktop logger: ACTIONd Nov 30 20:21:19 bp1-desktop logger: DEVPATH=/bus/bluetooth Nov 30 20:21:19 bp1-desktop logger: SUBSYSTEM=bus Nov 30 20:21:19 bp1-desktop logger: SEQNUM)30 Nov 30 20:21:19 bp1-desktop logger: Nov 30 20:21:19 bp1-desktop logger: UEVENT[1228076478.996880] add /class/bluetooth (class) Nov 30 20:21:19 bp1-desktop logger: ACTIONd Nov 30 20:21:19 bp1-desktop logger: DEVPATH=/class/bluetooth Nov 30 20:21:19 bp1-desktop logger: SUBSYSTEM=class Nov 30 20:21:19 bp1-desktop logger: SEQNUM)31 Nov 30 20:21:19 bp1-desktop logger: Nov 30 20:21:19 bp1-desktop logger: UEVENT[1228076479.016146] add /module/l2cap (module) Nov 30 20:21:19 bp1-desktop logger: ACTIONd Nov 30 20:21:19 bp1-desktop logger: DEVPATH=/module/l2cap Nov 30 20:21:19 bp1-desktop logger: SUBSYSTEM=module Nov 30 20:21:19 bp1-desktop logger: SEQNUM)32 Nov 30 20:21:19 bp1-desktop logger: Nov 30 20:21:19 bp1-desktop logger: UEVENT[1228076479.063430] add /module/rfcomm (module) Nov 30 20:21:19 bp1-desktop logger: ACTIONd Nov 30 20:21:19 bp1-desktop logger: DEVPATH=/module/rfcomm Nov 30 20:21:19 bp1-desktop logger: SUBSYSTEM=module Nov 30 20:21:19 bp1-desktop logger: SEQNUM)33 Nov 30 20:21:19 bp1-desktop logger: Nov 30 20:21:19 bp1-desktop logger: UEVENT[1228076479.304441] add /devices/virtual/vc/vcs7 (vc) Nov 30 20:21:19 bp1-desktop logger: ACTIONd Nov 30 20:21:19 bp1-desktop logger: DEVPATH=/devices/virtual/vc/vcs7 Nov 30 20:21:19 bp1-desktop logger: SUBSYSTEM=vc Nov 30 20:21:19 bp1-desktop logger: MAJOR=7 Nov 30 20:21:19 bp1-desktop logger: MINOR=7 Nov 30 20:21:19 bp1-desktop logger: SEQNUM)34 Nov 30 20:21:19 bp1-desktop logger: Nov 30 20:21:19 bp1-desktop logger: UEVENT[1228076479.305786] add /devices/virtual/vc/vcsa7 (vc) Nov 30 20:21:19 bp1-desktop logger: ACTIONd Nov 30 20:21:19 bp1-desktop logger: DEVPATH=/devices/virtual/vc/vcsa7 Nov 30 20:21:19 bp1-desktop logger: SUBSYSTEM=vc Nov 30 20:21:19 bp1-desktop logger: MAJOR=7 Nov 30 20:21:19 bp1-desktop logger: MINOR5 Nov 30 20:21:19 bp1-desktop logger: SEQNUM)35 Nov 30 20:21:19 bp1-desktop logger: Nov 30 20:21:19 bp1-desktop logger: UEVENT[1228076479.385023] remove /devices/virtual/vc/vcs7 (vc) Nov 30 20:21:19 bp1-desktop logger: ACTION=remove Nov 30 20:21:19 bp1-desktop logger: DEVPATH=/devices/virtual/vc/vcs7 Nov 30 20:21:19 bp1-desktop anacron[6759]: Anacron 2.3 started on 2008-11-30 Nov 30 20:21:19 bp1-desktop anacron[6759]: Normal exit (0 jobs run) Nov 30 20:21:19 bp1-desktop /usr/sbin/cron[6803]: (CRON) INFO (pidfile fd = 3) Nov 30 20:21:19 bp1-desktop /usr/sbin/cron[6805]: (CRON) STARTUP (fork ok) Nov 30 20:21:19 bp1-desktop /usr/sbin/cron[6805]: (CRON) INFO (Running @reboot jobs) Nov 30 20:21:19 bp1-desktop kernel: [ 84.573531] [drm] Initialized drm 1.1.0 20060810 Nov 30 20:21:22 bp1-desktop kernel: [ 86.658636] sky2 eth0: Link is up at 100 Mbps, full duplex, flow control both Nov 30 20:21:22 bp1-desktop kernel: [ 86.661232] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready Nov 30 20:21:22 bp1-desktop NetworkManager: <info> Will activate wired connection 'eth0' because it now has a link. Nov 30 20:21:22 bp1-desktop NetworkManager: <info> SWITCH: no current connection, found better connection 'eth0'. Nov 30 20:21:22 bp1-desktop dhcdbd: message_handler: message handler not found under /com/redhat/dhcp/eth0 for sub-path eth0.dbus.get.reason Nov 30 20:21:22 bp1-desktop NetworkManager: <info> Will activate connection 'eth0'. Nov 30 20:21:22 bp1-desktop NetworkManager: <info> Device eth0 activation scheduled... Nov 30 20:21:22 bp1-desktop NetworkManager: <info> Activation (eth0) started... Nov 30 20:21:22 bp1-desktop NetworkManager: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) scheduled... Nov 30 20:21:22 bp1-desktop NetworkManager: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) started... Nov 30 20:21:22 bp1-desktop NetworkManager: <info> Activation (eth0) Stage 2 of 5 (Device Configure) scheduled... Nov 30 20:21:22 bp1-desktop NetworkManager: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) complete. Nov 30 20:21:22 bp1-desktop NetworkManager: <info> Activation (eth0) Stage 2 of 5 (Device Configure) starting... Nov 30 20:21:22 bp1-desktop NetworkManager: <info> Activation (eth0) Stage 2 of 5 (Device Configure) successful. Nov 30 20:21:22 bp1-desktop NetworkManager: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) scheduled. Nov 30 20:21:22 bp1-desktop NetworkManager: <info> Activation (eth0) Stage 2 of 5 (Device Configure) complete. Nov 30 20:21:22 bp1-desktop NetworkManager: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) started... Nov 30 20:21:23 bp1-desktop NetworkManager: <info> Activation (eth0) Beginning DHCP transaction. Nov 30 20:21:23 bp1-desktop NetworkManager: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) complete. Nov 30 20:21:23 bp1-desktop NetworkManager: <info> DHCP daemon state is now 12 (successfully started) for interface eth0 Nov 30 20:21:23 bp1-desktop avahi-daemon[5943]: Registering new address record for fe80::219:21ff:fe05:bfb8 on eth0.*. Nov 30 20:21:24 bp1-desktop NetworkManager: <info> DHCP daemon state is now 1 (starting) for interface eth0 Nov 30 20:21:24 bp1-desktop logger: SUBSYSTEM=vc Nov 30 20:21:24 bp1-desktop logger: MAJOR=7 Nov 30 20:21:24 bp1-desktop logger: MINOR=7 Nov 30 20:21:24 bp1-desktop logger: SEQNUM)36 Nov 30 20:21:24 bp1-desktop logger: Nov 30 20:21:24 bp1-desktop logger: UEVENT[1228076479.385050] remove /devices/virtual/vc/vcsa7 (vc) Nov 30 20:21:24 bp1-desktop logger: ACTION=remove Nov 30 20:21:24 bp1-desktop logger: DEVPATH=/devices/virtual/vc/vcsa7 Nov 30 20:21:24 bp1-desktop logger: SUBSYSTEM=vc Nov 30 20:21:24 bp1-desktop logger: MAJOR=7 Nov 30 20:21:24 bp1-desktop logger: MINOR5 Nov 30 20:21:24 bp1-desktop logger: SEQNUM)37 Nov 30 20:21:24 bp1-desktop logger: Nov 30 20:21:24 bp1-desktop logger: UEVENT[1228076479.474204] add /devices/virtual/vc/vcs7 (vc) Nov 30 20:21:24 bp1-desktop logger: ACTIONd Nov 30 20:21:24 bp1-desktop logger: DEVPATH=/devices/virtual/vc/vcs7 Nov 30 20:21:24 bp1-desktop logger: SUBSYSTEM=vc Nov 30 20:21:24 bp1-desktop logger: MAJOR=7 Nov 30 20:21:24 bp1-desktop logger: MINOR=7 Nov 30 20:21:24 bp1-desktop logger: SEQNUM)38 Nov 30 20:21:24 bp1-desktop logger: Nov 30 20:21:24 bp1-desktop logger: UEVENT[1228076479.474227] add /devices/virtual/vc/vcsa7 (vc) Nov 30 20:21:24 bp1-desktop logger: ACTIONd Nov 30 20:21:24 bp1-desktop logger: DEVPATH=/devices/virtual/vc/vcsa7 Nov 30 20:21:24 bp1-desktop logger: SUBSYSTEM=vc Nov 30 20:21:24 bp1-desktop logger: MAJOR=7 Nov 30 20:21:24 bp1-desktop logger: MINOR5 Nov 30 20:21:24 bp1-desktop logger: SEQNUM)39 Nov 30 20:21:24 bp1-desktop logger: Nov 30 20:21:24 bp1-desktop logger: UEVENT[1228076479.964211] add /module/drm (module) Nov 30 20:21:24 bp1-desktop logger: ACTIONd Nov 30 20:21:24 bp1-desktop logger: DEVPATH=/module/drm Nov 30 20:21:24 bp1-desktop logger: SUBSYSTEM=module Nov 30 20:21:24 bp1-desktop logger: SEQNUM)40 Nov 30 20:21:24 bp1-desktop logger: Nov 30 20:21:24 bp1-desktop logger: UEVENT[1228076479.964930] add /class/drm (class) Nov 30 20:21:24 bp1-desktop logger: ACTIONd Nov 30 20:21:24 bp1-desktop logger: DEVPATH=/class/drm Nov 30 20:21:24 bp1-desktop logger: SUBSYSTEM=class Nov 30 20:21:24 bp1-desktop logger: SEQNUM)41 Nov 30 20:21:24 bp1-desktop logger: Nov 30 20:21:24 bp1-desktop logger: UEVENT[1228076479.974412] add /module/radeon (module) Nov 30 20:21:24 bp1-desktop logger: ACTIONd Nov 30 20:21:24 bp1-desktop logger: DEVPATH=/module/radeon Nov 30 20:21:24 bp1-desktop logger: SUBSYSTEM=module Nov 30 20:21:24 bp1-desktop logger: SEQNUM)42 Nov 30 20:21:24 bp1-desktop logger: Nov 30 20:21:24 bp1-desktop logger: UEVENT[1228076480.084008] add /module/binfmt_misc (module) Nov 30 20:21:24 bp1-desktop logger: ACTIONd Nov 30 20:21:24 bp1-desktop logger: DEVPATH=/module/binfmt_misc Nov 30 20:21:24 bp1-desktop logger: SUBSYSTEM=module Nov 30 20:21:24 bp1-desktop logger: SEQNUM)43 Nov 30 20:21:24 bp1-desktop logger: Nov 30 20:21:24 bp1-desktop kernel: [ 88.924991] NET: Registered protocol family 17 Nov 30 20:21:24 bp1-desktop dhclient: DHCPREQUEST of 192.168.1.65 on eth0 to 255.255.255.255 port 67 Nov 30 20:21:24 bp1-desktop dhclient: DHCPACK of 192.168.1.65 from 192.168.1.254 Nov 30 20:21:24 bp1-desktop avahi-daemon[5943]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.1.65. Nov 30 20:21:24 bp1-desktop avahi-daemon[5943]: New relevant interface eth0.IPv4 for mDNS. Nov 30 20:21:24 bp1-desktop avahi-daemon[5943]: Registering new address record for 192.168.1.65 on eth0.IPv4. Nov 30 20:21:24 bp1-desktop NetworkManager: <info> DHCP daemon state is now 4 (reboot) for interface eth0 Nov 30 20:21:24 bp1-desktop NetworkManager: <info> Activation (eth0) Stage 4 of 5 (IP Configure Get) scheduled... Nov 30 20:21:24 bp1-desktop NetworkManager: <info> Activation (eth0) Stage 4 of 5 (IP Configure Get) started... Nov 30 20:21:24 bp1-desktop dhcdbd: message_handler: message handler not found under /com/redhat/dhcp/eth0 for sub-path eth0.dbus.get.host_name Nov 30 20:21:24 bp1-desktop dhcdbd: message_handler: message handler not found under /com/redhat/dhcp/eth0 for sub-path eth0.dbus.get.nis_domain Nov 30 20:21:24 bp1-desktop dhcdbd: message_handler: message handler not found under /com/redhat/dhcp/eth0 for sub-path eth0.dbus.get.nis_servers Nov 30 20:21:24 bp1-desktop dhclient: bound to 192.168.1.65 -- renewal in 36404 seconds. Nov 30 20:21:24 bp1-desktop NetworkManager: <info> Retrieved the following IP4 configuration from the DHCP daemon: Nov 30 20:21:24 bp1-desktop NetworkManager: <info> address 192.168.1.65 Nov 30 20:21:24 bp1-desktop NetworkManager: <info> netmask 255.255.255.0 Nov 30 20:21:24 bp1-desktop NetworkManager: <info> broadcast 192.168.1.255 Nov 30 20:21:24 bp1-desktop NetworkManager: <info> gateway 192.168.1.254 Nov 30 20:21:24 bp1-desktop NetworkManager: <info> nameserver 192.168.1.254 Nov 30 20:21:24 bp1-desktop NetworkManager: <info> domain name 'lan' Nov 30 20:21:24 bp1-desktop dhcdbd: message_handler: message handler not found under /com/redhat/dhcp/eth0 for sub-path eth0.dbus.get.interface_mtu Nov 30 20:21:24 bp1-desktop NetworkManager: <info> Activation (eth0) Stage 5 of 5 (IP Configure Commit) scheduled... Nov 30 20:21:24 bp1-desktop NetworkManager: <info> Activation (eth0) Stage 4 of 5 (IP Configure Get) complete. Nov 30 20:21:24 bp1-desktop NetworkManager: <info> Activation (eth0) Stage 5 of 5 (IP Configure Commit) started... Nov 30 20:21:24 bp1-desktop avahi-daemon[5943]: Withdrawing address record for 192.168.1.65 on eth0. Nov 30 20:21:24 bp1-desktop avahi-daemon[5943]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.1.65. Nov 30 20:21:24 bp1-desktop avahi-daemon[5943]: Interface eth0.IPv4 no longer relevant for mDNS. Nov 30 20:21:24 bp1-desktop avahi-daemon[5943]: Withdrawing address record for fe80::219:21ff:fe05:bfb8 on eth0. Nov 30 20:21:24 bp1-desktop avahi-daemon[5943]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.1.65. Nov 30 20:21:24 bp1-desktop avahi-daemon[5943]: New relevant interface eth0.IPv4 for mDNS. Nov 30 20:21:24 bp1-desktop avahi-daemon[5943]: Registering new address record for 192.168.1.65 on eth0.IPv4. Nov 30 20:21:25 bp1-desktop NetworkManager: <info> Clearing nscd hosts cache. Nov 30 20:21:25 bp1-desktop NetworkManager: <WARN> nm_spawn_process(): nm_spawn_process('/usr/sbin/nscd -i hosts'): could not spawn process. (Failed to execute child process "/usr/sbin/nscd" (No such file or directory)) Nov 30 20:21:25 bp1-desktop NetworkManager: <info> Activation (eth0) successful, device activated. Nov 30 20:21:25 bp1-desktop NetworkManager: <info> Activation (eth0) Finish handler scheduled. Nov 30 20:21:25 bp1-desktop NetworkManager: <info> Activation (eth0) Stage 5 of 5 (IP Configure Commit) complete. Nov 30 20:21:26 bp1-desktop ntpdate[7066]: adjust time server 91.189.94.4 offset 0.400076 sec Nov 30 20:21:26 bp1-desktop avahi-daemon[5943]: Registering new address record for fe80::219:21ff:fe05:bfb8 on eth0.*. Nov 30 20:21:35 bp1-desktop kernel: [ 100.508271] eth0: no IPv6 routers present Nov 30 20:23:08 bp1-desktop gdm[6726]: WARNING: Couldn't authenticate user Nov 30 20:23:18 bp1-desktop hcid[6655]: Default passkey agent (:1.26, /org/bluez/passkey) registered Nov 30 20:23:18 bp1-desktop hcid[6655]: Default authorization agent (:1.26, /org/bluez/auth) registered Nov 30 20:23:22 bp1-desktop NetworkManager: <info> Updating allowed wireless network lists. Nov 30 20:23:22 bp1-desktop NetworkManager: <WARN>
nm_dbus_get_networks_cb(): error received:
org.freedesktop.NetworkManagerInfo.NoNetworks - There are no wireless networks stored..
www: http://www.berndporr.me.uk/
http://www.linux-usb-daq.co.uk/ Mobile: +44 (0)7840 340069 Work: +44 (0)141 330 5237
University of Glasgow
Department of Electronics & Electrical Engineering Room 519, Rankine Building, Oakfield Avenue, Glasgow, G12 8LT
Quoted 4 lines · Ian Abbott
Quoted 4 lines · Bernd Porr
Quoted 3 lines
Quoted 3 lines
Hi,
the module (usbdux) is loaded after boot via udev but not the
firmware.
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
It might be just a timing issue that it's not clear which script is executed first.
To solve the problem one has to unplug it and plug it back in to
get the
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
firmware loaded.
I've just checked: ubuntu hardy does have "
/sbin/udevadmtrigger"
in its
Quoted 9 lines
Quoted 9 lines
Quoted 3 lines
Quoted 3 lines
script.
/Bernd
Hi Bernd,
Sounds like timing. But could it be that the firmware is on an unmounted filesystem during coldplug, so it can't be accessed?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Comedi: Linux Control and Measurement Device Interface" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected]
For more options, visit this group at
http://groups.google.com/group/comedi_list?hl=en
-~----------~----~----~----~------~----~------~--~---
Signature · 9 lines
www: http://www.berndporr.me.uk/
http://www.linux-usb-daq.co.uk/
http://www.myfriendhelen.org.uk/
Mobile: +44 (0)7840 340069
Work: +44 (0)141 330 5237
University of Glasgow
Department of Electronics & Electrical Engineering
72 Oakfield Avenue (Rankine Building for deliveries)
Glasgow, G12 8LTRe: usb coldplug problem
In reply to Lionel VICTORQuoted 8 lines · Bernd Porr
Hi!
I'm the maintainter of the USBDUX board which connects via the USB to linux.
In order to work properly the USBDUX needs firmware uploaded. So, I wrote a udev rule which uploads the firmware as soon as there's a udev event from the USB BUS (this is done via
comedi_config).
Why not just use the firmware functions in the kernel core for this? That way, when the device is seen by udev, the correct firmware request function will be called, your firmware will be loaded, and everything should be just fine.
No need to reinvent the wheel here :)
thanks,
greg k-h
Re: usb coldplug problem
In reply to Lionel VICTORHi!
It's not that easy. The actual udev event triggers comedi_config which does _also_ the firmware upload on the side. Even if I upload the firmware via sysfs I still need to run comedi_config to set up the comedi device. Therefore it's simpler to do it via comedi_config as this supports firmware upload anyway and people can also do it manually if udev is not supported, for example on embedded systems. You see I've put in some thought into that earlier. But I'm open for suggestions. ;-)
/Bernd
www: http://www.berndporr.me.uk/
http://www.linux-usb-daq.co.uk/ Mobile: +44 (0)7840 340069 Work: +44 (0)141 330 5237
University of Glasgow
Department of Electronics & Electrical Engineering 72 Oakfield Avenue (for deliveries: Rankine Building) Glasgow, G12 8LT
Quoted 12 lines · Greg KH
Quoted 5 lines · Bernd Porr
Hi!
I'm the maintainter of the USBDUX board which connects via the USB to linux.
In order to work properly the USBDUX needs firmware uploaded. So, I wrote a udev rule which uploads the firmware as soon as there's a udev event from the USB BUS (this is done via
comedi_config).Why not just use the firmware functions in the kernel core for this? That way, when the device is seen by udev, the correct firmware request function will be called, your firmware will be loaded, and everything should be just fine.
Quoted 5 lines
No need to reinvent the wheel here :)
thanks,
greg k-h
begin:vcard
fn:Bernd Porr
n:Porr;Bernd
org:University of Glasgow;Department of Electronics & Electrical Engineering adr:Oakfield Avenue;;Room 519, Rankine Building;Glasgow;Scotland;G12 8LT;Scotland email;internet:[email protected]
title:Dr
tel;work:0141 330 5237
tel;fax:0141 330 6004
tel;cell:07840 340069
x-mozilla-html:FALSE
url:http://www.berndporr.me.uk
version:2.1
end:vcard
Re: usb coldplug problem
In reply to Lionel VICTORQuoted 5 lines · Bernd Porr
Hi!
It's not that easy. The actual udev event triggers
comedi_configwhich does _also_ the firmware upload on the side. Even if I upload the firmware via sysfs I still need to runcomedi_configto set up the comedi device.
Then do it like other USB devices do it:
- usb probe function calls request firmware
- after request firmware succeeds, then initialize the comedi interface
That way the driver will work like all other Linux USB devices do :)
Quoted 3 lines
Therefore it's simpler to do it via
comedi_configas this supports firmware upload anyway and people can also do it manually if udev is not supported, for example on embedded systems.
udev is supported everywhere. It's in my daughter's cell phone (the number 1 selling phone in the USA this year) and if udev isn't there, than the "generic" way of having hotplug handle firmware events is still going to work properly for you.
thanks,
greg k-h
Re: usb coldplug problem
In reply to Lionel VICTOROk. I'll look into that. So, you mean that I create with the "request firmware" a new udev event which then could also call "comedi_config"? The problem just now is that I don't get any udev events during coldplug. Do you think this will also solve that issue?
One practical thing: it's probably a good idea to work on the driver version which goes into the kernel and not the one in the comedi CVS. Where can I check out my module just now?
Thanks!
/Bernd
Quoted 27 lines · Greg KH
Quoted 5 lines · Bernd Porr
Hi!
It's not that easy. The actual udev event triggers
comedi_configwhich does _also_ the firmware upload on the side. Even if I upload the firmware via sysfs I still need to runcomedi_configto set up the comedi device.Then do it like other USB devices do it:
- usb probe function calls request firmware
- after request firmware succeeds, then initialize the comedi interfaceThat way the driver will work like all other Linux USB devices do :)
Quoted 3 lines
Therefore it's simpler to do it via
comedi_configas this supports firmware upload anyway and people can also do it manually if udev is not supported, for example on embedded systems.udev is supported everywhere. It's in my daughter's cell phone (the number 1 selling phone in the USA this year) and if udev isn't there, than the "generic" way of having hotplug handle firmware events is still going to work properly for you.
thanks,
greg k-h
Signature · 9 lines
www: http://www.berndporr.me.uk/
http://www.linux-usb-daq.co.uk/
http://www.myfriendhelen.org.uk/
Mobile: +44 (0)7840 340069
Work: +44 (0)141 330 5237
University of Glasgow
Department of Electronics & Electrical Engineering
72 Oakfield Avenue (Rankine Building for deliveries)
Glasgow, G12 8LTRe: usb coldplug problem
In reply to Lionel VICTORQuoted 2 lines · Bernd Porr
Ok. I'll look into that. So, you mean that I create with the "request firmware" a new udev event which then could also call "
comedi_config"?
No.
After the firmware is loaded into the device properly, you will then call comedi_config from the driver itself to initialize everything.
Quoted 2 lines
The problem just now is that I don't get any udev events during coldplug. Do you think this will also solve that issue?
Yes it will as the startup scripts already know how to handle coldplug firmware events.
Quoted 3 lines
One practical thing: it's probably a good idea to work on the driver version which goes into the kernel and not the one in the comedi CVS. Where can I check out my module just now?
Grab the linux-next tree, your driver and cleanups, are in there.
thanks,
greg k-h
Re: usb coldplug problem
In reply to Lionel VICTORQuoted 4 lines
No.
After the firmware is loaded into the device properly, you will then call
comedi_configfrom the driver itself to initialize everything.
No. This needs to be done from userspace or in other words from a udev script. ;) This has loads of practical reasons to have the final association between the driver and the comedi device in userspace. For example, in cases of multiple devices communicating with different drivers. That's something for a udev rule. Sorry. But what you are suggesting just now seems to me like a workaround for the coldplug
problem: the firmware is loaded via a firmware event (created by the driver) and I should move comedi_config into my driver because there are no udev events during coldplug.
Quoted 2 lines
Yes it will as the startup scripts already know how to handle coldplug firmware events.
To give the "magic" a name: you mean udev adm trigger? Or a nice script which writes "add" to all "uvents"? This is exactly what doesn't work. There are absolutely no udev events generated for comedi during boot. I've checked that now thoroughly and I think there's something wrong. What could that be?
/Bernd
Quoted 22 lines · Greg KH
Quoted 2 lines · Bernd Porr
Ok. I'll look into that. So, you mean that I create with the "request firmware" a new udev event which then could also call "
comedi_config"?No.
After the firmware is loaded into the device properly, you will then call
comedi_configfrom the driver itself to initialize everything.Quoted 6 lines
The problem just now is that I don't get any udev events during coldplug. Do you think this will also solve that issue?
One practical thing: it's probably a good idea to work on the driver version which goes into the kernel and not the one in the comedi CVS. Where can I check out my module just now?
Grab the linux-next tree, your driver and cleanups, are in there.
thanks,
greg k-h
Signature · 9 lines
www: http://www.berndporr.me.uk/
http://www.linux-usb-daq.co.uk/
http://www.myfriendhelen.org.uk/
Mobile: +44 (0)7840 340069
Work: +44 (0)141 330 5237
University of Glasgow
Department of Electronics & Electrical Engineering
72 Oakfield Avenue (Rankine Building for deliveries)
Glasgow, G12 8LTRe: usb coldplug problem
In reply to Lionel VICTORQuoted 6 lines · Bernd Porr
Quoted 2 lines
Yes it will as the startup scripts already know how to handle coldplug firmware events.
To give the "magic" a name: you mean udev adm trigger? Or a nice script which writes "add" to all "uvents"? This is exactly what doesn't work. There are absolutely no udev events generated for comedi during boot. I've checked that now thoroughly and I think there's something wrong. What could that be?
How does the "device" look like in sysfs, where you want to hook into with the userspace setup?
Kay
Re: usb coldplug problem
In reply to Lionel VICTORWhy cannot be the /proc interface be used.
We need to call the rule in the kernel context as 'greg' was saying.
Seems to be the correct way to be the firmware upload via USB.
Quoted 18 lines · Kay Sievers
Quoted 6 lines · Bernd Porr
Quoted 2 lines
Yes it will as the startup scripts already know how to handle coldplug firmware events.
To give the "magic" a name: you mean udev adm trigger? Or a nice script which writes "add" to all "uvents"? This is exactly what doesn't work. There are absolutely no udev events generated for comedi during boot. I've checked that now thoroughly and I think there's something wrong. What could that be?
How does the "device" look like in sysfs, where you want to hook into with the userspace setup?
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 1 line
--linux(2.4/2.6),bsd(4.5.x+),solaris(2.5+)
Re: usb coldplug problem
In reply to Lionel VICTORI totally take Greg's point that the firmware load should be via a firmware request from the driver which then in turn triggers the firmware helper in userspace. When I checked that last time (about a year ago) this was too buggy and I stuck with the comedi firmware upload which has been running for about 4 years without probs. Might be a good time to use the firmware helper.
But in comedi it is so that the command "comedi_config" associates a driver with a device. This works fine with hotplug. I plug in my usbdux, this triggers a udev event and then a udev rule can decide which /dev/comedi? is actaully taking care of the box. If you want to question that mechanism then comedi itself has to be rewritten. And I'm sure that nobody here in comedi-land would like to do that. It just works too good.
Quoted 1 line
Why cannot be the /proc interface be used.
Can you explain that a bit more.
Thanks!
/Bernd
Quoted 24 lines · Sujit Karataparambil
We need to call the rule in the kernel context as 'greg' was saying.
Seems to be the correct way to be the firmware upload via USB.
Quoted 17 lines · Kay Sievers
Quoted 6 lines · Bernd Porr
Quoted 2 lines
Yes it will as the startup scripts already know how to handle coldplug firmware events.
To give the "magic" a name: you mean udev adm trigger? Or a nice script which writes "add" to all "uvents"? This is exactly what doesn't work. There are absolutely no udev events generated for comedi during boot. I've checked that now thoroughly and I think there's something wrong. What could that be?
How does the "device" look like in sysfs, where you want to hook into with the userspace setup?
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 9 lines
www: http://www.berndporr.me.uk/
http://www.linux-usb-daq.co.uk/
http://www.myfriendhelen.org.uk/
Mobile: +44 (0)7840 340069
Work: +44 (0)141 330 5237
University of Glasgow
Department of Electronics & Electrical Engineering
72 Oakfield Avenue (Rankine Building for deliveries)
Glasgow, G12 8LTRe: usb coldplug problem
In reply to Lionel VICTORSorry for my ignonrance in Comedi.
What i mean is why cannot you use the uevent in the kernel itself. This does not mean to rewriting comedi. Might be comedi_config can associate the driver which is based on the uevent.
Something like this,
Comedi_Config.c
__init int register_comedi_XXX(){
register_firmware_proc();
......
}
void handle_device(){
switch(device){
case 'devname': load_firmware_device_xxx();
break;
case 'end':
break;
}}
__cleanup void unregister_comedi_XXX(){
unregister_firmware_proc();
.....}
Quoted 2 lines
Quoted 1 line
Why cannot be the /proc interface be used.
Can you explain that a bit more.
Yes, What I mean to say is that one could /proc filesystem to interface with the firmware. I presume that the firmware is something you are trying out as enhancement to comedi. This would be an /proc/comedi/dev[0-9 a-z A-Z]+ situation where in the firmware gets fired. This does not need any sort of change
to the Comedi Code itself.
Again i am taking an very big guess that comedi is being modified only to add an firmware routine and not being done in the driver itself.
Re: usb coldplug problem
In reply to Lionel VICTORQuoted 6 lines · Bernd Porr
I totally take Greg's point that the firmware load should be via a firmware request from the driver which then in turn triggers the firmware helper in userspace. When I checked that last time (about a year ago) this was too buggy and I stuck with the comedi firmware upload which has been running for about 4 years without probs. Might be a good time to use the firmware helper.
Yes, the comedi firmware upload will be changing sometime in the future to use the proper interfaces.
Quoted 6 lines
But in comedi it is so that the command "
comedi_config" associates a driver with a device. This works fine with hotplug. I plug in my usbdux, this triggers a udev event and then a udev rule can decide which/dev/comedi? is actaully taking care of the box. If you want to question that mechanism then comedi itself has to be rewritten. And I'm sure that nobody here in comedi-land would like to do that. It just works too good.
I'm going to be questioning that when we get to looking closer at the comedi/userspace interface to make sure it is sane and matches the rest of the kernel. But that's not going to happen until I get all of the comedi drivers merged into the staging tree so that we can clean everything up properly.
thanks,
greg k-h