Re: [patch] IBM HDAPS accelerometer driver.

From: Mikulas Patocka (mikulas_at_artax.karlin.mff.cuni.cz)
Date: 08/28/05

  • Next message: James Bottomley: "Re: [PATCH] make radix tree gang lookup faster by using a bitmap search"
    Date:	Sun, 28 Aug 2005 21:30:46 +0200 (CEST)
    To: Pavel Machek <pavel@ucw.cz>
    
    

    >>>> Of late I have been working on a driver for the IBM Hard Drive Active
    >>>> Protection System (HDAPS), which provides a two-axis accelerometer and
    >>>> some other misc. data. The hardware is found on recent IBM ThinkPad
    >>>> laptops.
    >>>>
    >>>> The following patch adds the driver to 2.6.13-rc6-mm2. It is
    >>>> self-contained and fairly simple.
    >>>
    >>> Do we really need input interface *and* sysfs interface? Input should be
    >>> enough.
    >>
    >> I think he doesn't need to export it at all and he should write code to
    >> park and disable hard disk instead.
    >> (in userspace it's unsolvable --- i.e. you can't enable hard disk when
    >> detected stable condition if the daemon is swapped out on that hard disk)
    >
    > man mlockall() :-).

    You also must not use any syscall that allocates even temporary memory in
    kernel (select, poll, many others ...) or that waits on semaphore that
    might be held while allocating memory (i.e. audit and rewrite ide ioctl
    path).

    And you need extra flags to protect the daemon from being killed at
    shutdown or blocked at suspend.

    I think writing it as kernel thread would be easir than all this.

    > Accelerometer is usefull for other stuff besides parking heads, like
    > playing marble madness or what is the name of the game, and even
    > parking heads is way too complex to be put into the kernel.
    >
    > Even if you don't like mlockall(), you can put timeout into
    > disk-freezing interface.

    That makes the protection less reliable (you shake the notebook and after
    the timeout drop it).

    Mikulas

    > Pavel
    > --
    > if you have sharp zaurus hardware you don't need... you know my address
    >
    -
    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: James Bottomley: "Re: [PATCH] make radix tree gang lookup faster by using a bitmap search"

    Relevant Pages

    • 2.4.0-test9 and HDD LED
      ... most boots the LED will go on continually. ... I have an IDE hard disk using DMA. ... using (no patches were applied to the kernel source). ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Switch back to Real mode and then boot strap
      ... it is really good if I have to load another kernel. ... > the hard disk has been imaged with requested operating system by a user. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • whining noise - possible bug in nForce2 support?
      ... CPU is AMD Athlon XP 1800+, ... Kernel version is 2.6.7, tested distros are Slackware 10 and Knoppix 3.4. ... as long as the hard disk has something to do, ... 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/ ...
      (Linux-Kernel)
    • [USB-Storage : i386] Oops with an adaptor for laptop hard disk.
      ... usb-storage module. ... If I disconnect my hard disk, ... Most recent kernel version which did not have the bug: ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: USB timeout Canon Powsrshot S30
      ... > Are you using gphoto2? ... It passes down the timeout value to the kernel, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)