All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: "Frédéric L. W. Meunier" <1@pervalidus.net>
Cc: Peter Williams <peterw@aurema.com>, linux-kernel@vger.kernel.org
Subject: Re: XFree86 seems to be being wrongly accused of doing the wrong thing
Date: Thu, 18 Mar 2004 08:17:55 +0100	[thread overview]
Message-ID: <20040318071754.GA499@ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.58.0403180346000.1276@pervalidus.dyndns.org>

On Thu, Mar 18, 2004 at 03:56:35AM -0300, Frédéric L. W. Meunier wrote:

> Wrongly ? I don't think so, as it has presumably been fixed in
> XFree86 after 4.4.0.
> 
> http://www.xfree86.org/cvs/changes.html:
> 
> 6. Do the Linux KDKBDREP ioctl on the correct fd.  This
> prevents the fallback that tries to directly program the
> keyboard repeat rate, and the related warning messages that
> recent Linux kernels generate (David Dawes).
> 
> I'm attaching the patch I extracted from CVS.
> 
> Vojtech, what about adding such information to your HOWTO ? And
> better, adding the URL to atkbd.c, so people stop reporting it.

I'll add the info and the URL into the HOWTO and kill the message.

> On Thu, 18 Mar 2004, Peter Williams wrote:
> 
> > With 2.6.4 I'm getting the following messages very early in the boot
> > long before XFree86 is started:
> >
> > Mar 18 16:05:31 mudlark kernel: atkbd.c: Unknown key released
> > (translated set 2, code 0x7a on isa0060/serio0).
> > Mar 18 16:05:31 mudlark kernel: atkbd.c: This is an XFree86 bug. It
> > shouldn't access hardware directly.
> >
> > They are repeated 6 times and are NOT the result of any keys being
> > pressed or released.
> 
> -- 
> http://www.pervalidus.net/contact.html
> Index: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c
> diff -u xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c:3.26 xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c:3.27
> --- xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c:3.26	Mon Nov 17 22:20:41 2003
> +++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c	Wed Mar  3 18:53:41 2004
> @@ -1,4 +1,4 @@
> -/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c,v 3.26 2003/11/17 22:20:41 dawes Exp $ */
> +/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c,v 3.27 2004/03/03 18:53:41 dawes Exp $ */
>  /*
>   * Copyright 1992 by Orest Zborowski <obz@Kodak.com>
>   * Copyright 1993 by David Dawes <dawes@xfree86.org>
> @@ -81,7 +81,7 @@
>  #endif
>  
>  static int
> -KDKBDREP_ioctl_ok(int rate, int delay) {
> +KDKBDREP_ioctl_ok(int fd, int rate, int delay) {
>  #if defined(KDKBDREP) && !defined(__sparc__)
>       /* This ioctl is defined in <linux/kd.h> but is not
>  	implemented anywhere - must be in some m68k patches. */
> @@ -90,7 +90,7 @@
>     /* don't change, just test */
>     kbdrep_s.rate = -1;
>     kbdrep_s.delay = -1;
> -   if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
> +   if (ioctl( fd, KDKBDREP, &kbdrep_s )) {
>         return 0;
>     }
>  
> @@ -105,7 +105,7 @@
>     if (kbdrep_s.delay < 1)
>       kbdrep_s.delay = 1;
>     
> -   if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
> +   if (ioctl( fd, KDKBDREP, &kbdrep_s )) {
>       return 0;
>     }
>  
> @@ -174,7 +174,7 @@
>      delay = xf86Info.kbdDelay;
>  
>  
> -  if(KDKBDREP_ioctl_ok(rate, delay)) 	/* m68k? */
> +  if(KDKBDREP_ioctl_ok(xf86Info.consoleFd, rate, delay)) 	/* m68k? */
>      return;
>  
>    if(KIOCSRATE_ioctl_ok(rate, delay))	/* sparc? */
> Index: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c
> diff -u xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c:1.5 xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c:1.6
> --- xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c:1.5	Tue Nov  4 03:14:39 2003
> +++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c	Wed Mar  3 18:53:41 2004
> @@ -1,4 +1,4 @@
> -/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c,v 1.5 2003/11/04 03:14:39 tsi Exp $ */
> +/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_kbd.c,v 1.6 2004/03/03 18:53:41 dawes Exp $ */
>  
>  /*
>   * Copyright (c) 2002 by The XFree86 Project, Inc.
> @@ -108,7 +108,7 @@
>  #endif
>  
>  static int
> -KDKBDREP_ioctl_ok(int rate, int delay) {
> +KDKBDREP_ioctl_ok(int fd, int rate, int delay) {
>  #if defined(KDKBDREP) && !defined(__sparc__)
>       /* This ioctl is defined in <linux/kd.h> but is not
>  	implemented anywhere - must be in some m68k patches. */
> @@ -117,7 +117,7 @@
>     /* don't change, just test */
>     kbdrep_s.rate = -1;
>     kbdrep_s.delay = -1;
> -   if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
> +   if (ioctl( fd, KDKBDREP, &kbdrep_s )) {
>         return 0;
>     }
>  
> @@ -132,7 +132,7 @@
>     if (kbdrep_s.delay < 1)
>       kbdrep_s.delay = 1;
>     
> -   if (ioctl( 0, KDKBDREP, &kbdrep_s )) {
> +   if (ioctl( fd, KDKBDREP, &kbdrep_s )) {
>       return 0;
>     }
>  
> @@ -200,7 +200,7 @@
>    if (pKbd->delay >= 0)
>      delay = pKbd->delay;
>  
> -  if(KDKBDREP_ioctl_ok(rate, delay)) 	/* m68k? */
> +  if(KDKBDREP_ioctl_ok(pInfo->fd, rate, delay)) 	/* m68k? */
>      return;
>  
>    if(KIOCSRATE_ioctl_ok(rate, delay))	/* sparc? */


-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

  parent reply	other threads:[~2004-03-18  7:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-18  5:13 XFree86 seems to be being wrongly accused of doing the wrong thing Peter Williams
2004-03-18  6:56 ` Frédéric L. W. Meunier
2004-03-18  7:02   ` Peter Williams
2004-03-18  7:18     ` Vojtech Pavlik
2004-03-19 17:37     ` Gerhard Mack
2004-03-19 19:03       ` Vojtech Pavlik
2004-03-19 19:26         ` Gerhard Mack
2004-03-19 19:36           ` Vojtech Pavlik
2004-03-18  7:17   ` Vojtech Pavlik [this message]
2004-03-18  7:21     ` Frédéric L. W. Meunier
  -- strict thread matches above, loose matches on Subject: below --
2004-03-18  7:02 Christian Guggenberger
2004-03-18  7:08 ` Peter Williams
     [not found]   ` <1079594175.1830.22.camel@bonnie79>
     [not found]     ` <4059565E.4020007@aurema.com>
2004-03-18  8:16       ` Christian Guggenberger
2004-03-18 21:01         ` Vojtech Pavlik
2004-03-19  0:07           ` Peter Williams
2004-03-18  9:25   ` Emmanuel Fleury
2004-03-18  7:08 ` Christian Guggenberger

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=20040318071754.GA499@ucw.cz \
    --to=vojtech@suse.cz \
    --cc=1@pervalidus.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterw@aurema.com \
    /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 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.