Re: [PATCH] Input: byd - use DMI detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----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@xxxxxxxxx
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAlgnBy0ACgkQi/DJPQPkQ1JWmwCffbqKKjwjxVc+y2Gghb9bCcSB
Ae8AoJ8Hn+xP4h3tFqEi2Yna9hpYGYql
=Dvey
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux