linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Mario.Limonciello@dell.com
Cc: y.linux@paritcher.com, linux-kernel@vger.kernel.org,
	platform-driver-x86@vger.kernel.org, mjg59@srcf.ucam.org
Subject: Re: [PATCH 3/3] platform/x86: dell-wmi: add keys to bios_to_linux_keycode
Date: Tue, 9 Jun 2020 10:27:30 +0200	[thread overview]
Message-ID: <20200609082730.ncs3lbdtzfxb4fma@pali> (raw)
In-Reply-To: <f7ab352f27954bbb88bafb41d6b17fe1@AUSX13MPC105.AMER.DELL.COM>

On Monday 08 June 2020 20:58:38 Mario.Limonciello@dell.com wrote:
> > -----Original Message-----
> > From: platform-driver-x86-owner@vger.kernel.org <platform-driver-x86-
> > owner@vger.kernel.org> On Behalf Of Pali Rohár
> > Sent: Monday, June 8, 2020 3:48 PM
> > To: Limonciello, Mario
> > Cc: y.linux@paritcher.com; linux-kernel@vger.kernel.org; platform-driver-
> > x86@vger.kernel.org; mjg59@srcf.ucam.org
> > Subject: Re: [PATCH 3/3] platform/x86: dell-wmi: add keys to
> > bios_to_linux_keycode
> > 
> > 
> > [EXTERNAL EMAIL]
> > 
> > On Monday 08 June 2020 15:46:44 Mario.Limonciello@dell.com wrote:
> > > I would actually question if there is value to lines in dell-wmi.c like
> > this:
> > >
> > > pr_info("Unknown WMI event type 0x%x\n", (int)buffer_entry[1]);
> > >
> > > and
> > >
> > > pr_info("Unknown key with type 0x%04x and code 0x%04x pressed\n", type,
> > code);
> > >
> > > In both of those cases the information doesn't actually help the user, by
> > default it's
> > > ignored by the driver anyway.  It just notifies the user it's something
> > the driver doesn't
> > > comprehend.  I would think these are better suited to downgrade to debug.
> > And if
> > > a key combination isn't doing something expected the user can use dyndbg
> > to turn it
> > > back on and can be debugged what should be populated or "explicitly"
> > ignored.
> > 
> > My motivation for these messages was to provide information to user that
> > kernel received event, but was not able to process it as it do not
> > understand it.
> > 
> > It could help in situation when user press special key and nothing is
> > delivered to userspace. But he could see that something happened in log.
> > 
> 
> But does a user know what to do with this information?  From time to time
> coming to kernel mailing list, but that's it.

That is a good question. I'm really not sure if user can do anything
with it. But also users do not care about these kind of logs. So
probably even do not know about them.

What is nice in this solution that if you want to try "debug" such
problem you just need to ask user for logs. Nothing is needed to enabled
/ disable.

> I think same person who would know to come to kernel mailing list for a key
> not working can likely also hand turning on dyndbg to get the info.

You are probably right.

In past I did one thing thanks to these logs. I searched for these log
messages on interned. More results were on forum discussions. I tried to
contact users of those posts and I think 3-4 people wrote me back with
details which allowed me to extend dell-wmi driver to handle additional
key codes.

So I see two benefits from these logs: 1) no special setup is needed to
gather these logs (useful for non-power users) and 2) ability to search
on internet if we have laptops which generates such unknown key codes
and users are "complaining" or posting their logs for investigation on
places where are no kernel developers available.

So question is if these two points are reason why to stick with these
logs or turn them off by default.

I still think it can be useful.

> > Similar message is also printed by PS/2 keyboard driver atkbd.c:
> > 
> > 	case ATKBD_KEY_UNKNOWN:
> > 		dev_warn(&serio->dev,
> > 			 "Unknown key %s (%s set %d, code %#x on %s).\n",
> > 			 atkbd->release ? "released" : "pressed",
> > 			 atkbd->translated ? "translated" : "raw",
> > 			 atkbd->set, code, serio->phys);
> > 		dev_warn(&serio->dev,
> > 			 "Use 'setkeycodes %s%02x <keycode>' to make it known.\n",
> > 			 code & 0x80 ? "e0" : "", code & 0x7f);
> > 		input_sync(dev);
> > 		break;
> 
> I think the difference here is that user can actually do something from userland
> to do with `setkeycodes` for PS2.

Of course, I agree.

  reply	other threads:[~2020-06-09  8:27 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-08  4:22 [PATCH 0/3] platform/x86: dell-wmi: new keys Y Paritcher
2020-06-08  4:22 ` [PATCH 1/3] platform/x86: dell-wmi: add new backlight events Y Paritcher
2020-06-08  8:35   ` Pali Rohár
2020-06-08 15:30     ` Mario.Limonciello
2020-06-08 20:11       ` Y Paritcher
2020-06-08 20:14         ` Mario.Limonciello
2020-06-08 20:36           ` Pali Rohár
2020-06-08 20:38             ` Mario.Limonciello
2020-06-08  4:22 ` [PATCH 2/3] platform/x86: dell-wmi: add new keymap type 0x0012 Y Paritcher
2020-06-08  8:50   ` Pali Rohár
2020-06-08 20:12     ` Y Paritcher
2020-06-08 15:40   ` Mario.Limonciello
2020-06-08 20:12     ` Y Paritcher
2020-06-08 20:30       ` Pali Rohár
2020-06-08 20:36       ` Mario.Limonciello
2020-06-08 21:03         ` Y Paritcher
2020-06-08 22:00           ` Mario.Limonciello
2020-06-08 22:53             ` Y Paritcher
2020-06-09 10:44         ` Hans de Goede
2020-06-09 15:36           ` Mario.Limonciello
2020-06-09 16:14             ` Hans de Goede
2020-06-09 19:41               ` Mario.Limonciello
2020-06-09 15:49         ` Pali Rohár
2020-06-09 16:45           ` Sebastian Reichel
2020-06-09 16:59             ` Hans de Goede
2020-06-19 15:31               ` Sebastian Reichel
2020-06-19 17:26                 ` Mario.Limonciello
2020-06-09  8:04     ` Pali Rohár
2020-06-08  4:22 ` [PATCH 3/3] platform/x86: dell-wmi: add keys to bios_to_linux_keycode Y Paritcher
2020-06-08  6:36   ` kernel test robot
2020-06-08  7:36   ` kernel test robot
2020-06-08  9:00   ` Pali Rohár
2020-06-08 15:46     ` Mario.Limonciello
2020-06-08 20:12       ` Y Paritcher
2020-06-08 20:48       ` Pali Rohár
2020-06-08 20:58         ` Mario.Limonciello
2020-06-09  8:27           ` Pali Rohár [this message]
2020-06-08 23:05 ` [PATCH v2 0/3] platform/x86: dell-wmi: new keys Y Paritcher
2020-06-08 23:05   ` [PATCH v2 1/3] platform/x86: dell-wmi: add new backlight events Y Paritcher
2020-06-08 23:24     ` Pali Rohár
2020-06-08 23:05   ` [PATCH v2 2/3] platform/x86: dell-wmi: add new keymap type 0x0012 Y Paritcher
2020-06-08 23:33     ` Pali Rohár
2020-06-09  0:26       ` Mario.Limonciello
2020-06-09  0:57         ` Y Paritcher
2020-06-09  8:40           ` Pali Rohár
2020-06-09  8:50         ` Pali Rohár
2020-06-08 23:05   ` [PATCH v2 3/3] platform/x86: dell-wmi: add new dmi keys to bios_to_linux_keycode Y Paritcher
2020-06-08 23:27     ` Randy Dunlap
2020-06-08 23:55       ` Pali Rohár
2020-06-09  0:43         ` Y Paritcher
2020-06-09  8:35           ` Pali Rohár
2020-06-09 19:49         ` Mario.Limonciello
2020-06-10  9:44           ` Pali Rohár
2020-06-10 12:35             ` Mario.Limonciello
2020-06-12 14:14               ` Pali Rohár
2020-06-12 14:59                 ` Mario.Limonciello
2020-06-09  3:52 ` [PATCH v3 0/3] platform/x86: dell-wmi: new keys Y Paritcher
2020-06-09  3:52   ` [PATCH v3 1/3] platform/x86: dell-wmi: add new backlight events Y Paritcher
2020-06-09 16:02     ` Mario.Limonciello
2020-06-09  3:52   ` [PATCH v3 2/3] platform/x86: dell-wmi: add new keymap type 0x0012 Y Paritcher
2020-06-09  3:52   ` [PATCH v3 3/3] platform/x86: dell-wmi: add new dmi mapping for keycode 0xffff Y Paritcher
2020-06-09  9:19     ` Pali Rohár
2020-06-10 17:56 ` [PATCH v4 0/3] platform/x86: dell-wmi: new keys Y Paritcher
2020-06-10 17:56   ` [PATCH v4 1/3] platform/x86: dell-wmi: add new backlight events Y Paritcher
2020-06-10 17:56   ` [PATCH v4 2/3] platform/x86: dell-wmi: add new keymap type 0x0012 Y Paritcher
2020-06-10 17:56   ` [PATCH v4 3/3] platform/x86: dell-wmi: add new dmi mapping for keycode 0xffff Y Paritcher
2020-06-10 19:22   ` [PATCH v4 0/3] platform/x86: dell-wmi: new keys Mario.Limonciello
2020-07-09 19:29     ` Andy Shevchenko
2020-07-13  7:29       ` Pali Rohár
2020-08-14  8:10         ` Pali Rohár
2020-06-12 14:09   ` Pali Rohár

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=20200609082730.ncs3lbdtzfxb4fma@pali \
    --to=pali@kernel.org \
    --cc=Mario.Limonciello@dell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=y.linux@paritcher.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;
as well as URLs for NNTP newsgroup(s).