From: Dan Carpenter <dan.carpenter@oracle.com>
To: lianzhi chang <changlianzhi@uniontech.com>
Cc: linux-kernel@vger.kernel.org, dmitry.torokhov@gmail.com,
gregkh@linuxfoundation.org, jirislaby@kernel.org,
andriy.shevchenko@linux.intel.com, 282827961@qq.com,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v20] tty: Fix the keyboard led light display problem
Date: Mon, 13 Dec 2021 16:20:53 +0300 [thread overview]
Message-ID: <20211213132053.GW1978@kadam> (raw)
In-Reply-To: <20211213061244.13732-1-changlianzhi@uniontech.com>
"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
next prev parent reply other threads:[~2021-12-13 13:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-13 6:12 [PATCH v20] tty: Fix the keyboard led light display problem lianzhi chang
2021-12-13 12:15 ` Andy Shevchenko
2021-12-13 12:41 ` Joe Perches
2021-12-13 19:41 ` Dmitry Torokhov
2021-12-13 20:06 ` Andy Shevchenko
2021-12-13 21:38 ` Dmitry Torokhov
2021-12-13 13:20 ` Dan Carpenter [this message]
2021-12-13 13:36 ` Greg KH
2021-12-13 19:39 ` Dmitry Torokhov
2021-12-14 2:06 ` lianzhi chang
2021-12-14 5:40 ` dmitry.torokhov
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=20211213132053.GW1978@kadam \
--to=dan.carpenter@oracle.com \
--cc=282827961@qq.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=changlianzhi@uniontech.com \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox