[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211213132053.GW1978@kadam>
Date: Mon, 13 Dec 2021 16:20:53 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: lianzhi chang <changlianzhi@...ontech.com>
Cc: linux-kernel@...r.kernel.org, dmitry.torokhov@...il.com,
gregkh@...uxfoundation.org, jirislaby@...nel.org,
andriy.shevchenko@...ux.intel.com, 282827961@...com,
kernel test robot <lkp@...el.com>
Subject: Re: [PATCH v20] tty: Fix the keyboard led light display problem
"the keyboard led light display problem" is pretty vague. Perhaps say
"Fix incorrect "Num Lock" LED indicator"
On Mon, Dec 13, 2021 at 02:12:44PM +0800, lianzhi chang wrote:
> Use the "ctrl+alt+Fn" key combination to switch the system from tty to
> desktop or switch the system from desktop to tty. After the switch is
> completed, it is found that the state of the keyboard lock is
Is this one of those fancy gaming keyboards with LEDs under the keys or
are we talking about Num Lock?
> +int vt_do_kdgkbledctl(unsigned int console)
> +{
> + struct kbd_struct *kb = &kbd_table[console];
> + /* This is a spot read so needs no locking */
> + switch (kb->kbdledctl) {
> + case VC_LEDCTL_ON:
> + return K_LEDCTL_ON;
> + case VC_LEDCTL_OFF:
> + return K_LEDCTL_OFF;
> + }
Extra tab.
> +}
> +
> +#define VC_LEDCTL_ON 0 /* VT can set the keyboard light */
> +#define VC_LEDCTL_OFF 1 /* Prohibit VT to set the keyboard light */
> +#define K_LEDCTL_ON 0x00
> +#define K_LEDCTL_OFF 0x01
It's weird that ON is zero and OFF one. Really, it's unfortunate that
we need a new ioctl to fix this bug...
regards,
dan carpenter
Powered by blists - more mailing lists