From: "Pali Rohár" <pali.rohar@gmail.com>
To: Chris Diamand <chris@diamand.org>,
Richard Pospesel <pospeselr@gmail.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: byd - use DMI detection
Date: Sat, 12 Nov 2016 13:12:29 +0100 [thread overview]
Message-ID: <58270744.cf3fc20a.1e77d.30f0@mx.google.com> (raw)
In-Reply-To: 20161111235759.11988-1-chris@diamand.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On So 12. November 2016 00:57 Chris Diamand wrote:
...
> +static const struct dmi_system_id byd_dmi_table[] = {
> + {
> + .matches = {
> + DMI_MATCH(DMI_PRODUCT_NAME, "SharkBay Platform"),
> + DMI_MATCH(DMI_PRODUCT_SERIAL, "System Serial Number"),
> + DMI_MATCH(DMI_BOARD_NAME, "WhiteTip Mountain1 Fab2"),
> + DMI_MATCH(DMI_CHASSIS_VENDOR, "To Be Filled By O.E.M."),
> + },
> + },
> +};
Hi! This looks very fragile. We really cannot test presence of some device
by DMI string "To Be Filled By O.E.M." or by "WhiteTip Mountain1 Fab2".
Look at other dmi detection code. We match full device and vendor.
...
> + if (!dmi_check_system(byd_dmi_table))
> + return -1;
> +
> if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES))
> return -1;
> if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES))
...
If we really have a problem when byd detect incorrect detect some non-byd
device as byd, we either needs:
1) extend detect code to include also parts of init sequence (this should
fix problem on wrongly detected non-byd devices, but init code on them
will take longer)
2) or use another detection technique, which will address above problem (
your "To Be Filled By O.E.M." is not good; maybe looking at ACPI?)
- --
Pali Rohár
pali.rohar@gmail.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iEYEARECAAYFAlgnBy0ACgkQi/DJPQPkQ1JWmwCffbqKKjwjxVc+y2Gghb9bCcSB
Ae8AoJ8Hn+xP4h3tFqEi2Yna9hpYGYql
=Dvey
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2016-11-12 12:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-11 23:57 [PATCH] Input: byd - use DMI detection Chris Diamand
2016-11-12 12:12 ` Pali Rohár [this message]
2016-11-12 14:48 ` Chris Diamand
2016-11-12 15:04 ` Pali Rohár
2016-11-12 17:33 ` Richard Pospesel
2016-11-12 17:48 ` Pali Rohár
2016-11-12 18:01 ` Richard Pospesel
2016-11-12 19:13 ` 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=58270744.cf3fc20a.1e77d.30f0@mx.google.com \
--to=pali.rohar@gmail.com \
--cc=chris@diamand.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=pospeselr@gmail.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).