From 38580fc697078c8a59646d1673a7afbe5f2c7aea Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Sat, 7 Feb 2004 21:42:49 +0000 Subject: [PATCH] patch form Bernd Porr: added a "sleep 1" just before fxload to eliminate race condition betwwen hotplug and usbdevfs in the preemptive 2.6 kernel --- etc/hotplug/usb/usbdux/usbdux | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/etc/hotplug/usb/usbdux/usbdux b/etc/hotplug/usb/usbdux/usbdux index 194b1ea..1ce7210 100755 --- a/etc/hotplug/usb/usbdux/usbdux +++ b/etc/hotplug/usb/usbdux/usbdux @@ -29,15 +29,24 @@ if [ -e /usr/local/share/usb/usbdux_firmware.hex ]; then fi # # -# please modify if needed +# in 2.6 there might be a race condition between +# the usbdevfs and this hotplug script. +# Therefore we wait a bit to make sure that /proc/bus/usb/... is there. +sleep 1 +# # # firmware upload into the usb device fxload -v -2 -I $USBDUX_FIRMWARE +# +# +# If you have more than one device please add/uncomment # # just to make sure we remove the comedi device $COMEDI_CONFIG -r /dev/comedi0 +# $COMEDI_CONFIG -r /dev/comedi1 # # connecting the comedi device comedi0 with the module usbdux $COMEDI_CONFIG /dev/comedi0 usbdux +# $COMEDI_CONFIG /dev/comedi1 usbdux # #