All of lore.kernel.org
 help / color / mirror / Atom feed
* INPUT: keyboard_tasklet - don't touch LED's of already grabed device
@ 2005-09-06  7:34 Aivils Stoss
  2005-09-06 11:52 ` Hugo Vanwoerkom
  0 siblings, 1 reply; 4+ messages in thread
From: Aivils Stoss @ 2005-09-06  7:34 UTC (permalink / raw)
  To: Vojtech Pavlik, linux-kernel; +Cc: bruby

Hi, Vojtech!

Recent kernels allow exclusive usage of input device when
input device is grabed. keyboard_tasklet does not check
device state and switch LED's of all keyboards. However
grabed device may be use another LED steering code.

This patch forbid keyboard_tasklet switch LED's of
grabed devices.

Aivils Stoss

--- linux-2.6.13/drivers/char/keyboard.c        2005-08-29 02:41:01.000000000 +0300
+++ linux-2.6.13/drivers/char/keyboard.c~       2005-09-06 10:09:35.000000000 +0300
@@ -895,16 +895,18 @@ static inline unsigned char getleds(void

 static void kbd_bh(unsigned long dummy)
 {
        struct list_head * node;
        unsigned char leds = getleds();

        if (leds != ledstate) {
                list_for_each(node,&kbd_handler.h_list) {
+                       if (handle->dev->grab)
+                               continue;
                        struct input_handle * handle = to_handle_h(node);
                        input_event(handle->dev, EV_LED, LED_SCROLLL, !!(leds & 0x01));
                        input_event(handle->dev, EV_LED, LED_NUML,    !!(leds & 0x02));
                        input_event(handle->dev, EV_LED, LED_CAPSL,   !!(leds & 0x04));
                        input_sync(handle->dev);
                }
        }


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: INPUT: keyboard_tasklet - don't touch LED's of already grabed device
  2005-09-06  7:34 INPUT: keyboard_tasklet - don't touch LED's of already grabed device Aivils Stoss
@ 2005-09-06 11:52 ` Hugo Vanwoerkom
  2005-09-06 11:57   ` Vojtech Pavlik
  0 siblings, 1 reply; 4+ messages in thread
From: Hugo Vanwoerkom @ 2005-09-06 11:52 UTC (permalink / raw)
  To: Aivils Stoss, Vojtech Pavlik, linux-kernel; +Cc: bruby



--- Aivils Stoss <aivils@unibanka.lv> wrote:

> Hi, Vojtech!
> 
> Recent kernels allow exclusive usage of input device
> when
> input device is grabed. keyboard_tasklet does not
> check
> device state and switch LED's of all keyboards.
> However
> grabed device may be use another LED steering code.
> 
> This patch forbid keyboard_tasklet switch LED's of
> grabed devices.
> 
> Aivils Stoss


While trying this with 2.6.12 it gets a compilation
error. Not when you move the added statements after
the structure declaration.

Is that me heading for them thar hills?

Hugo

<snip patch>



	
		
______________________________________________________
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: INPUT: keyboard_tasklet - don't touch LED's of already grabed device
  2005-09-06 11:52 ` Hugo Vanwoerkom
@ 2005-09-06 11:57   ` Vojtech Pavlik
  2005-09-06 12:55     ` Aivils Stoss
  0 siblings, 1 reply; 4+ messages in thread
From: Vojtech Pavlik @ 2005-09-06 11:57 UTC (permalink / raw)
  To: Hugo Vanwoerkom; +Cc: Aivils Stoss, linux-kernel, bruby

On Tue, Sep 06, 2005 at 04:52:28AM -0700, Hugo Vanwoerkom wrote:
> 
> 
> --- Aivils Stoss <aivils@unibanka.lv> wrote:
> 
> > Hi, Vojtech!
> > 
> > Recent kernels allow exclusive usage of input device
> > when
> > input device is grabed. keyboard_tasklet does not
> > check
> > device state and switch LED's of all keyboards.
> > However
> > grabed device may be use another LED steering code.
> > 
> > This patch forbid keyboard_tasklet switch LED's of
> > grabed devices.
> > 
> > Aivils Stoss
> 
> 
> While trying this with 2.6.12 it gets a compilation
> error. Not when you move the added statements after
> the structure declaration.
> 
> Is that me heading for them thar hills?
 
The patch probably wasn't tested. ;)

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: INPUT: keyboard_tasklet - don't touch LED's of already grabed device
  2005-09-06 11:57   ` Vojtech Pavlik
@ 2005-09-06 12:55     ` Aivils Stoss
  0 siblings, 0 replies; 4+ messages in thread
From: Aivils Stoss @ 2005-09-06 12:55 UTC (permalink / raw)
  To: vojtech; +Cc: Hugo Vanwoerkom, linux-kernel, bruby

On Otrdiena, 6. Septembris 2005 14:57, Vojtech Pavlik wrote:
> On Tue, Sep 06, 2005 at 04:52:28AM -0700, Hugo Vanwoerkom wrote:
> > --- Aivils Stoss <aivils@unibanka.lv> wrote:
> > > Hi, Vojtech!
> > >
> > > Recent kernels allow exclusive usage of input device
> > > when
> > > input device is grabed. keyboard_tasklet does not
> > > check
> > > device state and switch LED's of all keyboards.
> > > However
> > > grabed device may be use another LED steering code.
> > >
> > > This patch forbid keyboard_tasklet switch LED's of
> > > grabed devices.
> > >
> > > Aivils Stoss
> >
> > While trying this with 2.6.12 it gets a compilation
> > error. Not when you move the added statements after
> > the structure declaration.
> >
> > Is that me heading for them thar hills?
>
> The patch probably wasn't tested. ;)

How a soul who hates kernel compilation can test a patch?
Runtime modifcation:
http://www.ltn.lv/~aivils/files/hijackled-2.6.11-12mdk.tar.bz2

Aivils

--- linux-2.6.13/drivers/char/keyboard.c        2005-08-29 02:41:01.000000000 +0300
+++ linux-2.6.13/drivers/char/keyboard.c~       2005-09-06 15:32:28.000000000 +0300
@@ -896,16 +896,18 @@ static inline unsigned char getleds(void
 static void kbd_bh(unsigned long dummy)
 {
        struct list_head * node;
        unsigned char leds = getleds();

        if (leds != ledstate) {
                list_for_each(node,&kbd_handler.h_list) {
                        struct input_handle * handle = to_handle_h(node);
+                       if (handle->dev->grab)
+                               continue;
                        input_event(handle->dev, EV_LED, LED_SCROLLL, !!(leds & 0x01));
                        input_event(handle->dev, EV_LED, LED_NUML,    !!(leds & 0x02));
                        input_event(handle->dev, EV_LED, LED_CAPSL,   !!(leds & 0x04));
                        input_sync(handle->dev);
                }
        }

        ledstate = leds;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-09-06 12:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-06  7:34 INPUT: keyboard_tasklet - don't touch LED's of already grabed device Aivils Stoss
2005-09-06 11:52 ` Hugo Vanwoerkom
2005-09-06 11:57   ` Vojtech Pavlik
2005-09-06 12:55     ` Aivils Stoss

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.