Hi!
Yes, you've found a bug. Try the attached patch if it fixes your problem
and doesn't introduce any other side effect - it shouldn't, but I didn't
have enough time to test it.
Vojtech
On Mon, May 01, 2000 at 05:53:33PM -0400, Lars Kellogg-Stedman wrote:
> I've been playing with the "summing" mouse device, and it doesn't appear
> to work as advertised. Here's a simple test...
>
> mknod /dev/usb/mouse c 13 63
> modprobe mousedev (input, hid, and friends are already loaded)
>
> At this point, the kernel says:
>
> mouse0: PS/2 mouse device for input0
> mouse: PS/2 mouse device common for all mice
>
> If I run:
>
> cat < /dev/usb/mouse
>
> Everything works fine -- I get the output one would expect.
>
> However, if I unplug the mouse and then plug it back in, I see:
>
> mouse0: PS/2 mouse device for input0
>
> And my 'cat', which is still running, no longers receives any input.
> If I cancel the cat and restart it, I *still* get no input -- unless I
> unload and then reload mousedev.
>
> >From my reading of Vojtech's and Brad's messages, this is not the expected
> behavior. If it is, it doesn't solve anything -- that is, the situation
> with the cumulative mouse device is identical to the situation with it (in
> this case, with a single USB mouse and a built-in trackpad).
>
> -- Lars
>
> --
> Lars Kellogg-Stedman <[EMAIL PROTECTED]> --> http://www.larsshack.org/
--
Vojtech Pavlik
SuSE Labs
--- mousedev.c.old Tue May 2 00:03:04 2000
+++ mousedev.c Tue May 2 08:13:27 2000
@@ -418,10 +418,8 @@
mousedev->devfs = input_register_minor("mouse%d", minor, MOUSEDEV_MINOR_BASE);
- if (mousedev_mix.open) {
+ if (mousedev_mix.open)
input_open_device(&mousedev->handle);
- mousedev_mix.open++;
- }
printk("mouse%d: PS/2 mouse device for input%d\n", minor, dev->number);
@@ -432,10 +430,8 @@
{
struct mousedev *mousedev = handle->private;
- if (mousedev->open || mousedev_mix.open) {
+ if (mousedev->open || mousedev_mix.open)
input_close_device(handle);
- mousedev_mix.open--;
- }
if (!--mousedev->used) {
input_unregister_minor(mousedev->devfs);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]