lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 12 Feb 2018 23:25:28 +0100
From:   Pali Rohár <pali.rohar@...il.com>
To:     Masaki Ota <masaki.ota@...alps.com>
Cc:     Masaki Ota <012nexus@...il.com>,
        "dmitry.torokhov@...il.com" <dmitry.torokhov@...il.com>,
        "benjamin.tissoires@...hat.com" <benjamin.tissoires@...hat.com>,
        "aaron.ma@...onical.com" <aaron.ma@...onical.com>,
        "jaak@...tioja.ee" <jaak@...tioja.ee>,
        "linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        richard@...hsie.com
Subject: Re: [PATCH] Support TrackStick of Thinkpad L570

Masaki: About firmware update, there is Linux Vendor Firmware Service
project at https://fwupd.org/ exactly for purpose to update firmwares
from Linux distributions. Maintainer of this project, Richard Hughes
(CCed), is more times willing to write support for new devices. So
maybe this can be a solution for future.

On Monday 20 November 2017 08:43:45 Masaki Ota wrote:
> Hi, Pali,
> 
> 1) Yes, but we don't have FW update plan.
>  And this device works as SMBus in Windows, so this issue happens on only Linux.
> 
> 2) Yes.
> 
> Best Regards,
> Masaki Ota
> -----Original Message-----
> From: Pali Rohár [mailto:pali.rohar@...il.com] 
> Sent: Monday, November 20, 2017 5:30 PM
> To: Masaki Ota <012nexus@...il.com>; dmitry.torokhov@...il.com
> Cc: benjamin.tissoires@...hat.com; aaron.ma@...onical.com; jaak@...tioja.ee; 太田 真喜 Masaki Ota <masaki.ota@...alps.com>; linux-input@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH] Support TrackStick of Thinkpad L570
> 
> On Monday 20 November 2017 16:55:30 Masaki Ota wrote:
> > From: Masaki Ota <masaki.ota@...alps.com>
> > - The issue is that Thinkpad L570 TrackStick does not work. Because the main interface of Thinkpad L570 device is SMBus, so ALPS overlooked PS2 interface Firmware setting of TrackStick. The detail is that TrackStick otp bit is disabled.
> > - Add the code that checks 0xD7 address value. This value is device number information, so we can identify the device by checking this value.
> > - If we check 0xD7 value, we need to enable Command mode and after check the value we need to disable Command mode, then we have to enable the device(0xF4 command).
> > - Thinkpad L570 device number is 0x0C or 0x1D. If it is TRUE, enable ALPS_DUALPOINT flag.
> 
> So, the root of this problem is in ALPS firmware which provides wrong information to kernel?
> 
> Masaki, I have two questions:
> 
> 1) Can ALPS or Lenovo release a new firmware update for this Thinkpad to
>    fix this issue?
> 
> 2) Have all Thinkpad L570 machines trackpoint?
> 
> Dmitry, as a workaround for firmware bug on particular notebook, would not be better to check DMI information and DMI based hook?
> 
> > Signed-off-by: Masaki Ota <masaki.ota@...alps.com>
> > ---
> >  drivers/input/mouse/alps.c | 21 ++++++++++++++++++---
> >  1 file changed, 18 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c 
> > index 850b00e3ad8e..cce52104ed5a 100644
> > --- a/drivers/input/mouse/alps.c
> > +++ b/drivers/input/mouse/alps.c
> > @@ -2541,13 +2541,28 @@ static int 
> > alps_update_btn_info_ss4_v2(unsigned char otp[][4],  }
> >  
> >  static int alps_update_dual_info_ss4_v2(unsigned char otp[][4],
> > -				       struct alps_data *priv)
> > +				       struct alps_data *priv,
> > +					struct psmouse *psmouse)
> >  {
> >  	bool is_dual = false;
> > +	int reg_val = 0;
> > +	struct ps2dev *ps2dev = &psmouse->ps2dev;
> >  
> > -	if (IS_SS4PLUS_DEV(priv->dev_id))
> > +	if (IS_SS4PLUS_DEV(priv->dev_id)) {
> >  		is_dual = (otp[0][0] >> 4) & 0x01;
> >  
> > +		/* For support TrackStick of Thinkpad L570 device */
> > +		if (alps_exit_command_mode(psmouse) == 0 &&
> > +			alps_enter_command_mode(psmouse) == 0) {
> > +			reg_val = alps_command_mode_read_reg(psmouse, 0xD7);
> > +		}
> > +		alps_exit_command_mode(psmouse);
> > +		ps2_command(ps2dev, NULL, PSMOUSE_CMD_ENABLE);
> > +
> > +		if (reg_val == 0x0C || reg_val == 0x1D)
> > +			is_dual = true;
> > +	}
> > +
> >  	if (is_dual)
> >  		priv->flags |= ALPS_DUALPOINT |
> >  					ALPS_DUALPOINT_WITH_PRESSURE;
> > @@ -2570,7 +2585,7 @@ static int alps_set_defaults_ss4_v2(struct 
> > psmouse *psmouse,
> >  
> >  	alps_update_btn_info_ss4_v2(otp, priv);
> >  
> > -	alps_update_dual_info_ss4_v2(otp, priv);
> > +	alps_update_dual_info_ss4_v2(otp, priv, psmouse);
> >  
> >  	return 0;
> >  }
> 
> --
> Pali Rohár
> pali.rohar@...il.com

-- 
Pali Rohár
pali.rohar@...il.com

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists