linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 devices
@ 2017-11-15  6:34 Aaron Ma
  2017-11-15  8:35 ` Pali Rohár
  0 siblings, 1 reply; 9+ messages in thread
From: Aaron Ma @ 2017-11-15  6:34 UTC (permalink / raw)
  To: linux-input, linux-kernel, dmitry.torokhov, masaki.ota, pali.rohar

There is a regression of commit 4a646580f793 ("Input: ALPS - fix
two-finger scroll breakage"), ALPS device fails with log:

psmouse serio1: alps: Rejected trackstick packet from non DualPoint device

ALPS device with id "74 03 28" report OTP[0] data 0xCE after
commit 4a646580f793, after restore the OTP reading order,
it becomes to 0x10 as before and reports the right flag.

Fixes: 4a646580f793 ("Input: ALPS - fix two-finger scroll breakage")
Cc: <stable@vger.kernel.org>
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
---
 drivers/input/mouse/alps.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 579b899add26..c59b8f7ca2fc 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -2562,8 +2562,8 @@ static int alps_set_defaults_ss4_v2(struct psmouse *psmouse,
 
 	memset(otp, 0, sizeof(otp));
 
-	if (alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]) ||
-	    alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]))
+	if (alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]) ||
+	    alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]))
 		return -1;
 
 	alps_update_device_area_ss4_v2(otp, priv);
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 devices
  2017-11-15  6:34 [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 devices Aaron Ma
@ 2017-11-15  8:35 ` Pali Rohár
  2017-11-16  7:27   ` Masaki Ota
  0 siblings, 1 reply; 9+ messages in thread
From: Pali Rohár @ 2017-11-15  8:35 UTC (permalink / raw)
  To: masaki.ota; +Cc: linux-input, linux-kernel, dmitry.torokhov, Aaron Ma

On Wednesday 15 November 2017 14:34:04 Aaron Ma wrote:
> There is a regression of commit 4a646580f793 ("Input: ALPS - fix
> two-finger scroll breakage"), ALPS device fails with log:
> 
> psmouse serio1: alps: Rejected trackstick packet from non DualPoint device
> 
> ALPS device with id "74 03 28" report OTP[0] data 0xCE after
> commit 4a646580f793, after restore the OTP reading order,
> it becomes to 0x10 as before and reports the right flag.
> 
> Fixes: 4a646580f793 ("Input: ALPS - fix two-finger scroll breakage")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
> ---
>  drivers/input/mouse/alps.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
> index 579b899add26..c59b8f7ca2fc 100644
> --- a/drivers/input/mouse/alps.c
> +++ b/drivers/input/mouse/alps.c
> @@ -2562,8 +2562,8 @@ static int alps_set_defaults_ss4_v2(struct psmouse *psmouse,
>  
>  	memset(otp, 0, sizeof(otp));
>  
> -	if (alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]) ||
> -	    alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]))
> +	if (alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]) ||
> +	    alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]))
>  		return -1;
>  
>  	alps_update_device_area_ss4_v2(otp, priv);

Masaki Ota, please look at this patch as it partially revert your commit
4a646580f793 ("Input: ALPS - fix two-finger scroll breakage"). Something
smells here.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 devices
  2017-11-15  8:35 ` Pali Rohár
@ 2017-11-16  7:27   ` Masaki Ota
  2017-11-16  9:07     ` Aaron Ma
  2018-01-29 22:51     ` dmitry.torokhov
  0 siblings, 2 replies; 9+ messages in thread
From: Masaki Ota @ 2017-11-16  7:27 UTC (permalink / raw)
  To: Pali Rohár; +Cc: linux-input, linux-kernel, dmitry.torokhov, Aaron Ma

Hi, Pali, Aaron,

Current code is correct device setting, previous code is wrong.
If the trackstick does not work(DUALPOINT flag disable), Device Firmware setting is wrong.

But recently I received the same report from Thinkpad L570 user, and I checked this device and found this device Firmware setting is wrong. Sorry for our mistake.
Is your laptop L570 ?

I will add code that supports the trackstick for this device.

Best Regards,
Masaki Ota
-----Original Message-----
From: Pali Rohár [mailto:pali.rohar@gmail.com] 
Sent: Wednesday, November 15, 2017 5:35 PM
To: 太田 真喜 Masaki Ota <masaki.ota@jp.alps.com>
Cc: linux-input@vger.kernel.org; linux-kernel@vger.kernel.org; dmitry.torokhov@gmail.com; Aaron Ma <aaron.ma@canonical.com>
Subject: Re: [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 devices

On Wednesday 15 November 2017 14:34:04 Aaron Ma wrote:
> There is a regression of commit 4a646580f793 ("Input: ALPS - fix 
> two-finger scroll breakage"), ALPS device fails with log:
> 
> psmouse serio1: alps: Rejected trackstick packet from non DualPoint 
> device
> 
> ALPS device with id "74 03 28" report OTP[0] data 0xCE after commit 
> 4a646580f793, after restore the OTP reading order, it becomes to 0x10 
> as before and reports the right flag.
> 
> Fixes: 4a646580f793 ("Input: ALPS - fix two-finger scroll breakage")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
> ---
>  drivers/input/mouse/alps.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c 
> index 579b899add26..c59b8f7ca2fc 100644
> --- a/drivers/input/mouse/alps.c
> +++ b/drivers/input/mouse/alps.c
> @@ -2562,8 +2562,8 @@ static int alps_set_defaults_ss4_v2(struct 
> psmouse *psmouse,
>  
>  	memset(otp, 0, sizeof(otp));
>  
> -	if (alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]) ||
> -	    alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]))
> +	if (alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]) ||
> +	    alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]))
>  		return -1;
>  
>  	alps_update_device_area_ss4_v2(otp, priv);

Masaki Ota, please look at this patch as it partially revert your commit
4a646580f793 ("Input: ALPS - fix two-finger scroll breakage"). Something smells here.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 devices
  2017-11-16  7:27   ` Masaki Ota
@ 2017-11-16  9:07     ` Aaron Ma
  2018-01-29 22:51     ` dmitry.torokhov
  1 sibling, 0 replies; 9+ messages in thread
From: Aaron Ma @ 2017-11-16  9:07 UTC (permalink / raw)
  To: Masaki Ota, Pali Rohár; +Cc: linux-input, linux-kernel, dmitry.torokhov

Hi Masaki Ota:

Yes, the laptop is L570.

If your code is right, the workaround code for L570 must be done.

Please fix it ASAP.

Regards,
Aaron

On 11/16/2017 03:27 PM, Masaki Ota wrote:
> Hi, Pali, Aaron,
> 
> Current code is correct device setting, previous code is wrong.
> If the trackstick does not work(DUALPOINT flag disable), Device Firmware setting is wrong.
> 
> But recently I received the same report from Thinkpad L570 user, and I checked this device and found this device Firmware setting is wrong. Sorry for our mistake.
> Is your laptop L570 ?
> 
> I will add code that supports the trackstick for this device.
> 
> Best Regards,
> Masaki Ota
> -----Original Message-----
> From: Pali Rohár [mailto:pali.rohar@gmail.com] 
> Sent: Wednesday, November 15, 2017 5:35 PM
> To: 太田 真喜 Masaki Ota <masaki.ota@jp.alps.com>
> Cc: linux-input@vger.kernel.org; linux-kernel@vger.kernel.org; dmitry.torokhov@gmail.com; Aaron Ma <aaron.ma@canonical.com>
> Subject: Re: [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 devices
> 
> On Wednesday 15 November 2017 14:34:04 Aaron Ma wrote:
>> There is a regression of commit 4a646580f793 ("Input: ALPS - fix 
>> two-finger scroll breakage"), ALPS device fails with log:
>>
>> psmouse serio1: alps: Rejected trackstick packet from non DualPoint 
>> device
>>
>> ALPS device with id "74 03 28" report OTP[0] data 0xCE after commit 
>> 4a646580f793, after restore the OTP reading order, it becomes to 0x10 
>> as before and reports the right flag.
>>
>> Fixes: 4a646580f793 ("Input: ALPS - fix two-finger scroll breakage")
>> Cc: <stable@vger.kernel.org>
>> Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
>> ---
>>  drivers/input/mouse/alps.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c 
>> index 579b899add26..c59b8f7ca2fc 100644
>> --- a/drivers/input/mouse/alps.c
>> +++ b/drivers/input/mouse/alps.c
>> @@ -2562,8 +2562,8 @@ static int alps_set_defaults_ss4_v2(struct 
>> psmouse *psmouse,
>>  
>>  	memset(otp, 0, sizeof(otp));
>>  
>> -	if (alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]) ||
>> -	    alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]))
>> +	if (alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]) ||
>> +	    alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]))
>>  		return -1;
>>  
>>  	alps_update_device_area_ss4_v2(otp, priv);
> 
> Masaki Ota, please look at this patch as it partially revert your commit
> 4a646580f793 ("Input: ALPS - fix two-finger scroll breakage"). Something smells here.
> 
> --
> Pali Rohár
> pali.rohar@gmail.com
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 devices
  2017-11-16  7:27   ` Masaki Ota
  2017-11-16  9:07     ` Aaron Ma
@ 2018-01-29 22:51     ` dmitry.torokhov
  2018-03-20 18:47       ` Dmitry Torokhov
  1 sibling, 1 reply; 9+ messages in thread
From: dmitry.torokhov @ 2018-01-29 22:51 UTC (permalink / raw)
  To: Masaki Ota; +Cc: Pali Rohár, linux-input, linux-kernel, Aaron Ma

Hi,

On Thu, Nov 16, 2017 at 07:27:02AM +0000, Masaki Ota wrote:
> Hi, Pali, Aaron,
> 
> Current code is correct device setting, previous code is wrong.
> If the trackstick does not work(DUALPOINT flag disable), Device Firmware setting is wrong.
> 
> But recently I received the same report from Thinkpad L570 user, and I checked this device and found this device Firmware setting is wrong. Sorry for our mistake.
> Is your laptop L570 ?
> 
> I will add code that supports the trackstick for this device.

Sorry for resurrecting this old thread, I am just trying to understand
what went wrong here. Is the sequence of "f0 f0 e9" and "ea ea e9" is
important in getting the correct OTP data and we originally got this
order wrong? It is not clear from the original patch and discussion that
this change was intentional.

Thanks.

> 
> Best Regards,
> Masaki Ota
> -----Original Message-----
> From: Pali Rohár [mailto:pali.rohar@gmail.com] 
> Sent: Wednesday, November 15, 2017 5:35 PM
> To: 太田 真喜 Masaki Ota <masaki.ota@jp.alps.com>
> Cc: linux-input@vger.kernel.org; linux-kernel@vger.kernel.org; dmitry.torokhov@gmail.com; Aaron Ma <aaron.ma@canonical.com>
> Subject: Re: [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 devices
> 
> On Wednesday 15 November 2017 14:34:04 Aaron Ma wrote:
> > There is a regression of commit 4a646580f793 ("Input: ALPS - fix 
> > two-finger scroll breakage"), ALPS device fails with log:
> > 
> > psmouse serio1: alps: Rejected trackstick packet from non DualPoint 
> > device
> > 
> > ALPS device with id "74 03 28" report OTP[0] data 0xCE after commit 
> > 4a646580f793, after restore the OTP reading order, it becomes to 0x10 
> > as before and reports the right flag.
> > 
> > Fixes: 4a646580f793 ("Input: ALPS - fix two-finger scroll breakage")
> > Cc: <stable@vger.kernel.org>
> > Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
> > ---
> >  drivers/input/mouse/alps.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c 
> > index 579b899add26..c59b8f7ca2fc 100644
> > --- a/drivers/input/mouse/alps.c
> > +++ b/drivers/input/mouse/alps.c
> > @@ -2562,8 +2562,8 @@ static int alps_set_defaults_ss4_v2(struct 
> > psmouse *psmouse,
> >  
> >  	memset(otp, 0, sizeof(otp));
> >  
> > -	if (alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]) ||
> > -	    alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]))
> > +	if (alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]) ||
> > +	    alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]))
> >  		return -1;
> >  
> >  	alps_update_device_area_ss4_v2(otp, priv);
> 
> Masaki Ota, please look at this patch as it partially revert your commit
> 4a646580f793 ("Input: ALPS - fix two-finger scroll breakage"). Something smells here.
> 
> --
> Pali Rohár
> pali.rohar@gmail.com

-- 
Dmitry

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 devices
  2018-01-29 22:51     ` dmitry.torokhov
@ 2018-03-20 18:47       ` Dmitry Torokhov
  2018-03-25 21:25         ` Pali Rohár
  0 siblings, 1 reply; 9+ messages in thread
From: Dmitry Torokhov @ 2018-03-20 18:47 UTC (permalink / raw)
  To: Masaki Ota; +Cc: Pali Rohár, linux-input, linux-kernel, Aaron Ma

On Mon, Jan 29, 2018 at 2:51 PM, dmitry.torokhov@gmail.com
<dmitry.torokhov@gmail.com> wrote:
> Hi,
>
> On Thu, Nov 16, 2017 at 07:27:02AM +0000, Masaki Ota wrote:
>> Hi, Pali, Aaron,
>>
>> Current code is correct device setting, previous code is wrong.
>> If the trackstick does not work(DUALPOINT flag disable), Device Firmware setting is wrong.
>>
>> But recently I received the same report from Thinkpad L570 user, and I checked this device and found this device Firmware setting is wrong. Sorry for our mistake.
>> Is your laptop L570 ?
>>
>> I will add code that supports the trackstick for this device.
>
> Sorry for resurrecting this old thread, I am just trying to understand
> what went wrong here. Is the sequence of "f0 f0 e9" and "ea ea e9" is
> important in getting the correct OTP data and we originally got this
> order wrong? It is not clear from the original patch and discussion that
> this change was intentional.

Could I please get an answer to my question?

Thanks!

>
> Thanks.
>
>>
>> Best Regards,
>> Masaki Ota
>> -----Original Message-----
>> From: Pali Rohár [mailto:pali.rohar@gmail.com]
>> Sent: Wednesday, November 15, 2017 5:35 PM
>> To: 太田 真喜 Masaki Ota <masaki.ota@jp.alps.com>
>> Cc: linux-input@vger.kernel.org; linux-kernel@vger.kernel.org; dmitry.torokhov@gmail.com; Aaron Ma <aaron.ma@canonical.com>
>> Subject: Re: [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 devices
>>
>> On Wednesday 15 November 2017 14:34:04 Aaron Ma wrote:
>> > There is a regression of commit 4a646580f793 ("Input: ALPS - fix
>> > two-finger scroll breakage"), ALPS device fails with log:
>> >
>> > psmouse serio1: alps: Rejected trackstick packet from non DualPoint
>> > device
>> >
>> > ALPS device with id "74 03 28" report OTP[0] data 0xCE after commit
>> > 4a646580f793, after restore the OTP reading order, it becomes to 0x10
>> > as before and reports the right flag.
>> >
>> > Fixes: 4a646580f793 ("Input: ALPS - fix two-finger scroll breakage")
>> > Cc: <stable@vger.kernel.org>
>> > Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
>> > ---
>> >  drivers/input/mouse/alps.c | 4 ++--
>> >  1 file changed, 2 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
>> > index 579b899add26..c59b8f7ca2fc 100644
>> > --- a/drivers/input/mouse/alps.c
>> > +++ b/drivers/input/mouse/alps.c
>> > @@ -2562,8 +2562,8 @@ static int alps_set_defaults_ss4_v2(struct
>> > psmouse *psmouse,
>> >
>> >     memset(otp, 0, sizeof(otp));
>> >
>> > -   if (alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]) ||
>> > -       alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]))
>> > +   if (alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]) ||
>> > +       alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]))
>> >             return -1;
>> >
>> >     alps_update_device_area_ss4_v2(otp, priv);
>>
>> Masaki Ota, please look at this patch as it partially revert your commit
>> 4a646580f793 ("Input: ALPS - fix two-finger scroll breakage"). Something smells here.
>>
>> --
>> Pali Rohár
>> pali.rohar@gmail.com
>
> --
> Dmitry



-- 
Dmitry

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 devices
  2018-03-20 18:47       ` Dmitry Torokhov
@ 2018-03-25 21:25         ` Pali Rohár
  2018-03-27  4:37           ` Masaki Ota
  0 siblings, 1 reply; 9+ messages in thread
From: Pali Rohár @ 2018-03-25 21:25 UTC (permalink / raw)
  To: Masaki Ota; +Cc: Dmitry Torokhov, linux-input, linux-kernel, Aaron Ma

[-- Attachment #1: Type: text/plain, Size: 3503 bytes --]

On Tuesday 20 March 2018 11:47:26 Dmitry Torokhov wrote:
> On Mon, Jan 29, 2018 at 2:51 PM, dmitry.torokhov@gmail.com
> <dmitry.torokhov@gmail.com> wrote:
> > Hi,
> >
> > On Thu, Nov 16, 2017 at 07:27:02AM +0000, Masaki Ota wrote:
> >> Hi, Pali, Aaron,
> >>
> >> Current code is correct device setting, previous code is wrong.
> >> If the trackstick does not work(DUALPOINT flag disable), Device Firmware setting is wrong.
> >>
> >> But recently I received the same report from Thinkpad L570 user, and I checked this device and found this device Firmware setting is wrong. Sorry for our mistake.
> >> Is your laptop L570 ?
> >>
> >> I will add code that supports the trackstick for this device.
> >
> > Sorry for resurrecting this old thread, I am just trying to understand
> > what went wrong here. Is the sequence of "f0 f0 e9" and "ea ea e9" is
> > important in getting the correct OTP data and we originally got this
> > order wrong? It is not clear from the original patch and discussion that
> > this change was intentional.
> 
> Could I please get an answer to my question?
> 
> Thanks!

Masaki, this question is for you ↑↑↑

> >
> > Thanks.
> >
> >>
> >> Best Regards,
> >> Masaki Ota
> >> -----Original Message-----
> >> From: Pali Rohár [mailto:pali.rohar@gmail.com]
> >> Sent: Wednesday, November 15, 2017 5:35 PM
> >> To: 太田 真喜 Masaki Ota <masaki.ota@jp.alps.com>
> >> Cc: linux-input@vger.kernel.org; linux-kernel@vger.kernel.org; dmitry.torokhov@gmail.com; Aaron Ma <aaron.ma@canonical.com>
> >> Subject: Re: [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 devices
> >>
> >> On Wednesday 15 November 2017 14:34:04 Aaron Ma wrote:
> >> > There is a regression of commit 4a646580f793 ("Input: ALPS - fix
> >> > two-finger scroll breakage"), ALPS device fails with log:
> >> >
> >> > psmouse serio1: alps: Rejected trackstick packet from non DualPoint
> >> > device
> >> >
> >> > ALPS device with id "74 03 28" report OTP[0] data 0xCE after commit
> >> > 4a646580f793, after restore the OTP reading order, it becomes to 0x10
> >> > as before and reports the right flag.
> >> >
> >> > Fixes: 4a646580f793 ("Input: ALPS - fix two-finger scroll breakage")
> >> > Cc: <stable@vger.kernel.org>
> >> > Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
> >> > ---
> >> >  drivers/input/mouse/alps.c | 4 ++--
> >> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >> >
> >> > diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
> >> > index 579b899add26..c59b8f7ca2fc 100644
> >> > --- a/drivers/input/mouse/alps.c
> >> > +++ b/drivers/input/mouse/alps.c
> >> > @@ -2562,8 +2562,8 @@ static int alps_set_defaults_ss4_v2(struct
> >> > psmouse *psmouse,
> >> >
> >> >     memset(otp, 0, sizeof(otp));
> >> >
> >> > -   if (alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]) ||
> >> > -       alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]))
> >> > +   if (alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]) ||
> >> > +       alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]))
> >> >             return -1;
> >> >
> >> >     alps_update_device_area_ss4_v2(otp, priv);
> >>
> >> Masaki Ota, please look at this patch as it partially revert your commit
> >> 4a646580f793 ("Input: ALPS - fix two-finger scroll breakage"). Something smells here.
> >>
> >> --
> >> Pali Rohár
> >> pali.rohar@gmail.com
> >
> > --
> > Dmitry
> 
> 
> 

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 devices
  2018-03-25 21:25         ` Pali Rohár
@ 2018-03-27  4:37           ` Masaki Ota
  2018-03-28  7:38             ` Pali Rohár
  0 siblings, 1 reply; 9+ messages in thread
From: Masaki Ota @ 2018-03-27  4:37 UTC (permalink / raw)
  To: Pali Rohár; +Cc: Dmitry Torokhov, linux-input, linux-kernel, Aaron Ma

Hi, 

We can get OTP page 0 value by EA EA E9 commands, but we cannot get it by EA EA EA E9.
As far as I remember, Device initialization finish at EA command, then sends EA EA E9 commands.
In this case we cannot get correct OTP page 0 value.
So I changed this order. (We can get OTP page 1 value by both of EA F0 F0 E9 and F0 F0 E9.)

Best Regards,
Masaki Ota
-----Original Message-----
From: Pali Rohár [mailto:pali.rohar@gmail.com] 
Sent: Monday, March 26, 2018 6:26 AM
To: 太田 真喜 Masaki Ota <masaki.ota@jp.alps.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>; linux-input@vger.kernel.org; linux-kernel@vger.kernel.org; Aaron Ma <aaron.ma@canonical.com>
Subject: Re: [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 devices

On Tuesday 20 March 2018 11:47:26 Dmitry Torokhov wrote:
> On Mon, Jan 29, 2018 at 2:51 PM, dmitry.torokhov@gmail.com 
> <dmitry.torokhov@gmail.com> wrote:
> > Hi,
> >
> > On Thu, Nov 16, 2017 at 07:27:02AM +0000, Masaki Ota wrote:
> >> Hi, Pali, Aaron,
> >>
> >> Current code is correct device setting, previous code is wrong.
> >> If the trackstick does not work(DUALPOINT flag disable), Device Firmware setting is wrong.
> >>
> >> But recently I received the same report from Thinkpad L570 user, and I checked this device and found this device Firmware setting is wrong. Sorry for our mistake.
> >> Is your laptop L570 ?
> >>
> >> I will add code that supports the trackstick for this device.
> >
> > Sorry for resurrecting this old thread, I am just trying to 
> > understand what went wrong here. Is the sequence of "f0 f0 e9" and 
> > "ea ea e9" is important in getting the correct OTP data and we 
> > originally got this order wrong? It is not clear from the original 
> > patch and discussion that this change was intentional.
> 
> Could I please get an answer to my question?
> 
> Thanks!

Masaki, this question is for you ↑↑↑

> >
> > Thanks.
> >
> >>
> >> Best Regards,
> >> Masaki Ota
> >> -----Original Message-----
> >> From: Pali Rohár [mailto:pali.rohar@gmail.com]
> >> Sent: Wednesday, November 15, 2017 5:35 PM
> >> To: 太田 真喜 Masaki Ota <masaki.ota@jp.alps.com>
> >> Cc: linux-input@vger.kernel.org; linux-kernel@vger.kernel.org; 
> >> dmitry.torokhov@gmail.com; Aaron Ma <aaron.ma@canonical.com>
> >> Subject: Re: [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 
> >> devices
> >>
> >> On Wednesday 15 November 2017 14:34:04 Aaron Ma wrote:
> >> > There is a regression of commit 4a646580f793 ("Input: ALPS - fix 
> >> > two-finger scroll breakage"), ALPS device fails with log:
> >> >
> >> > psmouse serio1: alps: Rejected trackstick packet from non 
> >> > DualPoint device
> >> >
> >> > ALPS device with id "74 03 28" report OTP[0] data 0xCE after 
> >> > commit 4a646580f793, after restore the OTP reading order, it 
> >> > becomes to 0x10 as before and reports the right flag.
> >> >
> >> > Fixes: 4a646580f793 ("Input: ALPS - fix two-finger scroll 
> >> > breakage")
> >> > Cc: <stable@vger.kernel.org>
> >> > Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
> >> > ---
> >> >  drivers/input/mouse/alps.c | 4 ++--
> >> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >> >
> >> > diff --git a/drivers/input/mouse/alps.c 
> >> > b/drivers/input/mouse/alps.c index 579b899add26..c59b8f7ca2fc 
> >> > 100644
> >> > --- a/drivers/input/mouse/alps.c
> >> > +++ b/drivers/input/mouse/alps.c
> >> > @@ -2562,8 +2562,8 @@ static int alps_set_defaults_ss4_v2(struct 
> >> > psmouse *psmouse,
> >> >
> >> >     memset(otp, 0, sizeof(otp));
> >> >
> >> > -   if (alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]) ||
> >> > -       alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]))
> >> > +   if (alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]) ||
> >> > +       alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]))
> >> >             return -1;
> >> >
> >> >     alps_update_device_area_ss4_v2(otp, priv);
> >>
> >> Masaki Ota, please look at this patch as it partially revert your 
> >> commit
> >> 4a646580f793 ("Input: ALPS - fix two-finger scroll breakage"). Something smells here.
> >>
> >> --
> >> Pali Rohár
> >> pali.rohar@gmail.com
> >
> > --
> > Dmitry
> 
> 
> 

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 devices
  2018-03-27  4:37           ` Masaki Ota
@ 2018-03-28  7:38             ` Pali Rohár
  0 siblings, 0 replies; 9+ messages in thread
From: Pali Rohár @ 2018-03-28  7:38 UTC (permalink / raw)
  To: Masaki Ota; +Cc: Dmitry Torokhov, linux-input, linux-kernel, Aaron Ma

Ideally this information should be put as a comment into the code. It is
really not obvious.

On Tuesday 27 March 2018 04:37:19 Masaki Ota wrote:
> Hi, 
> 
> We can get OTP page 0 value by EA EA E9 commands, but we cannot get it by EA EA EA E9.
> As far as I remember, Device initialization finish at EA command, then sends EA EA E9 commands.
> In this case we cannot get correct OTP page 0 value.
> So I changed this order. (We can get OTP page 1 value by both of EA F0 F0 E9 and F0 F0 E9.)
> 
> Best Regards,
> Masaki Ota
> -----Original Message-----
> From: Pali Rohár [mailto:pali.rohar@gmail.com] 
> Sent: Monday, March 26, 2018 6:26 AM
> To: 太田 真喜 Masaki Ota <masaki.ota@jp.alps.com>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>; linux-input@vger.kernel.org; linux-kernel@vger.kernel.org; Aaron Ma <aaron.ma@canonical.com>
> Subject: Re: [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 devices
> 
> On Tuesday 20 March 2018 11:47:26 Dmitry Torokhov wrote:
> > On Mon, Jan 29, 2018 at 2:51 PM, dmitry.torokhov@gmail.com 
> > <dmitry.torokhov@gmail.com> wrote:
> > > Hi,
> > >
> > > On Thu, Nov 16, 2017 at 07:27:02AM +0000, Masaki Ota wrote:
> > >> Hi, Pali, Aaron,
> > >>
> > >> Current code is correct device setting, previous code is wrong.
> > >> If the trackstick does not work(DUALPOINT flag disable), Device Firmware setting is wrong.
> > >>
> > >> But recently I received the same report from Thinkpad L570 user, and I checked this device and found this device Firmware setting is wrong. Sorry for our mistake.
> > >> Is your laptop L570 ?
> > >>
> > >> I will add code that supports the trackstick for this device.
> > >
> > > Sorry for resurrecting this old thread, I am just trying to 
> > > understand what went wrong here. Is the sequence of "f0 f0 e9" and 
> > > "ea ea e9" is important in getting the correct OTP data and we 
> > > originally got this order wrong? It is not clear from the original 
> > > patch and discussion that this change was intentional.
> > 
> > Could I please get an answer to my question?
> > 
> > Thanks!
> 
> Masaki, this question is for you ↑↑↑
> 
> > >
> > > Thanks.
> > >
> > >>
> > >> Best Regards,
> > >> Masaki Ota
> > >> -----Original Message-----
> > >> From: Pali Rohár [mailto:pali.rohar@gmail.com]
> > >> Sent: Wednesday, November 15, 2017 5:35 PM
> > >> To: 太田 真喜 Masaki Ota <masaki.ota@jp.alps.com>
> > >> Cc: linux-input@vger.kernel.org; linux-kernel@vger.kernel.org; 
> > >> dmitry.torokhov@gmail.com; Aaron Ma <aaron.ma@canonical.com>
> > >> Subject: Re: [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 
> > >> devices
> > >>
> > >> On Wednesday 15 November 2017 14:34:04 Aaron Ma wrote:
> > >> > There is a regression of commit 4a646580f793 ("Input: ALPS - fix 
> > >> > two-finger scroll breakage"), ALPS device fails with log:
> > >> >
> > >> > psmouse serio1: alps: Rejected trackstick packet from non 
> > >> > DualPoint device
> > >> >
> > >> > ALPS device with id "74 03 28" report OTP[0] data 0xCE after 
> > >> > commit 4a646580f793, after restore the OTP reading order, it 
> > >> > becomes to 0x10 as before and reports the right flag.
> > >> >
> > >> > Fixes: 4a646580f793 ("Input: ALPS - fix two-finger scroll 
> > >> > breakage")
> > >> > Cc: <stable@vger.kernel.org>
> > >> > Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
> > >> > ---
> > >> >  drivers/input/mouse/alps.c | 4 ++--
> > >> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >> >
> > >> > diff --git a/drivers/input/mouse/alps.c 
> > >> > b/drivers/input/mouse/alps.c index 579b899add26..c59b8f7ca2fc 
> > >> > 100644
> > >> > --- a/drivers/input/mouse/alps.c
> > >> > +++ b/drivers/input/mouse/alps.c
> > >> > @@ -2562,8 +2562,8 @@ static int alps_set_defaults_ss4_v2(struct 
> > >> > psmouse *psmouse,
> > >> >
> > >> >     memset(otp, 0, sizeof(otp));
> > >> >
> > >> > -   if (alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]) ||
> > >> > -       alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]))
> > >> > +   if (alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]) ||
> > >> > +       alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]))
> > >> >             return -1;
> > >> >
> > >> >     alps_update_device_area_ss4_v2(otp, priv);
> > >>
> > >> Masaki Ota, please look at this patch as it partially revert your 
> > >> commit
> > >> 4a646580f793 ("Input: ALPS - fix two-finger scroll breakage"). Something smells here.
> > >>
> > >> --
> > >> Pali Rohár
> > >> pali.rohar@gmail.com
> > >
> > > --
> > > Dmitry
> > 
> > 
> > 
> 
> --
> Pali Rohár
> pali.rohar@gmail.com

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-03-28  7:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-15  6:34 [PATCH] Input: ALPS - fix DualPoint flag for 74 03 28 devices Aaron Ma
2017-11-15  8:35 ` Pali Rohár
2017-11-16  7:27   ` Masaki Ota
2017-11-16  9:07     ` Aaron Ma
2018-01-29 22:51     ` dmitry.torokhov
2018-03-20 18:47       ` Dmitry Torokhov
2018-03-25 21:25         ` Pali Rohár
2018-03-27  4:37           ` Masaki Ota
2018-03-28  7:38             ` Pali Rohár

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).