mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sau Dan Lee <danlee@informatik.uni-freiburg.de>
To: Tuukka Toivonen <tuukkat@ee.oulu.fi>
Cc: Vojtech Pavlik <vojtech@suse.cz>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Re: SERIO_USERDEV patch for 2.6
Date: 03 Jun 2004 14:21:14 +0200	[thread overview]
Message-ID: <xb74qps4yth.fsf@savona.informatik.uni-freiburg.de> (raw)
In-Reply-To: <Pine.GSO.4.58.0406031241330.8752@stekt37>

>>>>> "Tuukka" == Tuukka Toivonen <tuukkat@ee.oulu.fi> writes:


    >> On Sun, 30 May 2004, Vojtech Pavlik wrote:
    >>> Coexisting would mean that when someone wants to open the raw
    >>> device, the serio layer would disconnect the psmouse driver,
    >>> and give control to the raw device instead. I believe that
    >>> could work.

    Tuukka> Done, with slight modification: if the device is opened in
    Tuukka> read-only mode, the kernel drivers are not
    Tuukka> disconnected. This way the serio port could be controlled
    Tuukka> via IOCTL even when assigned to kernel drivers, if it ever
    Tuukka> becomes useful. Useful also for debugging etc.

Thanks for the great work, Tuukka!  :)

I've  just   tried  it.   I   loaded  'psmouse'  and   'mousedev'  and
/proc/bus/input/devices does show the PS/2 AUX port being treated as a
mouse  device,   handled  by  'mousedev'.    Then,  I  start   gpm  on
/dev/misc/isa0060_serio1, and it works successfully.  The mouse device
disappears from /proc/bus/input/devices.  When  I kill gpm, the kernel
gets  control   again  and  the   mouse  device  shows  up   again  in
/proc/.../devices.



    Tuukka> The last change I made converts slashes '/' into
    Tuukka> underscores '_' (so eg. isa0060/serio0 is changed to
    Tuukka> isa0060_serio0 in /proc/misc, /dev with devfs, and /sys)
    Tuukka> because Sau Dan Lee reported that slashes don't work well
    Tuukka> with sysfs.

It now works in sysfs.

        $ cat /sys/class/misc/psaux/dev 
        10:1
        $ cat /sys/class/misc/isa0060_serio1/dev 
        10:63


    Tuukka> I tested the patch in a couple of machines, especially the
    Tuukka> new features.  Seems to work finely.

Works fine on mine, too.



    Tuukka> Compared to Dmitry's rawdev patch, this has a number of
    Tuukka> advantages:

    Tuukka> - Supports all serio ports without any additional kernel
    Tuukka> parameters. Binding between kernel/user driver is done
    Tuukka> automatically.

This is wonderful!  Or consider  my serio_switch patch.  We don't need
to want for  2.6.10 when they would eventually  add that together with
the sysfs interface.


    Tuukka> - Supports multiple drivers on the same port, unlike
    Tuukka> Dmitry's rawdev, which works just similarly as 2.4.x psaux
    Tuukka> which didn't work with e.g.  X11 and gpm together without
    Tuukka> a repeater feed, because multiple drivers are fighting for
    Tuukka> the byte streams.

On my system X and gpm do live with each other without conflicts, both
accessing  /dev/psaux  (either  on  2.4 or  2.6+SERIO_USERDEV).   Both
programs  can detect  VT  switching  and close  the  port when  losing
"focus".


    Tuukka> (Doesn't still allow multiple kernel drivers nor a kernel
    Tuukka> driver with a complete user drivers with write access
    Tuukka> since the required infrastructure is missing in serio.c
    Tuukka> aka serio-core.c: kernel internal drivers can't lock a
    Tuukka> port).

That's a part of the design  of the whole serio subsystem.  Unless the
design is reworked, you can't  do much about it.  The basic assumption
is: each port can be connected  to only one device, whether the device
is in kernel  or userland.  That our SERIO_USERDEV  allows userland to
overhear (O_RDONLY) the traffic is a special bonus feature.



-- 
Sau Dan LEE                     李守敦(Big5)                    ~{@nJX6X~}(HZ) 

E-mail: danlee@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee


  reply	other threads:[~2004-06-03 12:21 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-30 10:39 keyboard problem with 2.6.6 Sau Dan Lee
2004-05-30 11:18 ` Vojtech Pavlik
2004-05-30 11:40   ` Sau Dan Lee
2004-05-30 11:53     ` Russell King
2004-05-30 12:43     ` Vojtech Pavlik
2004-05-30 13:25       ` Sau Dan Lee
2004-05-30 13:42         ` SERIO_USERDEV patch for 2.6 Vojtech Pavlik
2004-05-30 15:09           ` Dmitry Torokhov
2004-05-30 15:58             ` Vojtech Pavlik
2004-05-30 16:10               ` Giuseppe Bilotta
2004-05-30 21:00                 ` Vojtech Pavlik
2004-05-31 12:43                   ` Giuseppe Bilotta
2004-05-30 16:16               ` Dmitry Torokhov
2004-05-30 20:51                 ` Vojtech Pavlik
2004-05-30 23:50                   ` Dmitry Torokhov
2004-05-31  6:30                     ` Vojtech Pavlik
2004-06-01  8:18           ` Tuukka Toivonen
2004-06-03 10:21             ` [PATCH] " Tuukka Toivonen
2004-06-03 12:21               ` Sau Dan Lee [this message]
2004-06-03 13:46               ` Luciano Moreira - igLnx
2004-06-03 21:23               ` Vojtech Pavlik
2004-06-01 16:50           ` Sau Dan Lee
2004-06-01 18:18             ` Dmitry Torokhov
2004-06-01 22:23               ` Giuseppe Bilotta
2004-06-01 23:50                 ` Dmitry Torokhov
2004-06-02 15:08                   ` Giuseppe Bilotta
2004-06-01 21:01         ` keyboard problem with 2.6.6 jsimmons
2004-06-01 21:12           ` Valdis.Kletnieks
2004-05-30 13:54       ` Eduard Bloch
2004-05-30 14:03         ` Vojtech Pavlik
2004-06-01 21:03           ` jsimmons
2004-06-04 14:11     ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xb74qps4yth.fsf@savona.informatik.uni-freiburg.de \
    --to=danlee@informatik.uni-freiburg.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tuukkat@ee.oulu.fi \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®