I made the following experiment on different machines and different kernels 
(2.4.18, 2.4.20, 2.4.21):

-plug usb-mouse in
- do "cat /dev/usbmouse" and move the mouse and you will see characters 
streaming in your console (that's fine)
- now disconnect the usb-mouse and reconnect it
- moving the mouse nothing happens in your console (that's not fine)
(and on 2.4.18 your system hangs and you have to reboot: that`s nasty)
- terminate your cat-process and try to reopen /dev/usbmouse via cat again and 
you get the message: no such device
- look at /proc/bus/usb/devices: mouse is there! (log messages also tell that 
mouse has been disconnected and is succesfully reconnected

Experiments with a reader for magnetic cards (for the usb-system its a serial 
device: pl2303) have similar results.

My question:

Is this behaviour as it should be?

If it is intended: Where are entry points to enforce another reaction on a  
disconnect-reconnect event?

I would prefer following scenario: open an usb-device for reading by process 
p, disconnect the device and reconnect it, and process p still can read from 
the reconnected device.

If there are reasons that this behaviour is not possible, the disconnect of an 
usb-device should at least enforce that the corresponding device file is 
closed, so that the reading process gets the information that something 
happened.

Best regards,

Ludwig Balke


-- 
Dr.Ludwig Balke
Johann-J�rgen-Str. 15
91052 Erlangen
Tel. 09131/407 368
Fax. 09131/129 297



-------------------------------------------------------
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_id=1356&alloc_id=3438&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to