Re: SERIO_USERDEV patch for 2.6

From: Tuukka Toivonen (tuukkat_at_ee.oulu.fi)
Date: 06/01/04

  • Next message: Sau Dan Lee: "BUG: atkbd.c keyboard driver bug [Was: keyboard problem with 2.6.6]"
    Date:	Tue, 1 Jun 2004 11:18:20 +0300 (EEST)
    To: Vojtech Pavlik <vojtech@suse.cz>
    
    

    On Sun, 30 May 2004, Vojtech Pavlik wrote:

    >The newest I could find:
    >linux-2.6.5-userdev.20040507.patch

    Yes, it's still the newest. Applies cleanly against 2.6.6 too.
    I didn't want to add features before getting some feedback.

    >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.

    If the user is careful, in practice both kernel and userspace drivers
    can work simultaneously with the current code. But if you prefer otherwise,
    I'll change it, no problem. However, this could take a few days
    or so (busy with real work).

    Dmitry suggested adding a kernel parameter to specify which ports would
    allow to be read in raw mode and which would be handled by kernel drivers.
    In my opinion, almost the same is achieved more conveniently by handling
    in raw mode simply exactly those ports that are opened from userspace
    (ie. "cat serio1" would disconnect kernel driver), and everything else by
    kernel drivers.
    No additional parameters would be then necessary, nor module reloads
    to change anything.

    The only exception I can see is if the kernel driver is loaded first
    and its autodetection confuses a device. Or, for example, kernel
    driver sets Touchpad into its custom mode, but then user wants to run
    standard PS/2 mouse driver in user space. I don't know if the latter
    driver could reset the Touchpad back into PS/2 mouse emulation mode.

    >I'd like to keep it separate from the
    >serio.c file, although it's obvious it'll require to be linked to it
    >statically, because it needs hooks there

    Agreed. I'll do that (serio-dev.c). Disadvantage: the functions
    can not be anymore inline (unless I put lots of stuff into header
    file) which may make code less efficient. Hopefully not significantly.

    Also, I have to rename serio.c into serio-core.c so that it can be linked
    into serio.o with serio-dev.o. The diff will be a bit ugly.

    >It's indeed time for me to examine the SERIO_USERDEV patch, and I

    Thanks for that :)

    >I don't need to test your [San Dan Lee's] userspace drivers,
    >as I'm not interested in those.

    Fair enough. Just provide a mechanism that allows user space
    protocol drivers, and let other people do them if they insist ;)
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Sau Dan Lee: "BUG: atkbd.c keyboard driver bug [Was: keyboard problem with 2.6.6]"

    Relevant Pages

    • Re: parameter for module gspca_sn9c20x
      ... not the actual kernel drivers. ... Till today I used the driver from to make it work. ... are known to have the sensor mounted upside down. ... to know if the sensor is upside down or not on all supported devices. ...
      (Linux-Kernel)
    • Re: Is Wince 6.0 really secure?
      ... the kernel drivers which are included in runtime. ... But user can access physical memory as follows1. ... Write a kernel driver which is capabke of using VirtualAlloc, ...
      (microsoft.public.windowsce.platbuilder)
    • Re: file_operations and PCI driver, what is best?
      ... Linux kernel drivers is different from WIndows drivers. ... The driver in user space looks very interesting. ...
      (comp.os.linux.development.system)
    • Re: [RFC] libusb / in-kernel usb driver criteria
      ... When does a kernel driver make sense over ... interface and creates a new user-visible interface that is going to be used ... The libusb based applications I've seen tend to be quite convoluted ... they stay as kernel drivers. ...
      (Linux-Kernel)
    • Re: [PATCH] uio: User IRQ Mode
      ... In this mode the user space driver ... is responsible for acknowledging and re-enabling the interrupt. ... This can easily be done without your patch. ...
      (Linux-Kernel)