* [PATCH] HID: logitech-dj: Fix check of logi_dj_recv_query_paired_devices()
@ 2019-07-25 14:57 YueHaibing
2019-07-31 10:59 ` Petr Vorel
0 siblings, 1 reply; 9+ messages in thread
From: YueHaibing @ 2019-07-25 14:57 UTC (permalink / raw)
To: jikos, benjamin.tissoires, hdegoede; +Cc: linux-kernel, linux-input, YueHaibing
In delayedwork_callback(), logi_dj_recv_query_paired_devices
may return positive value while success now, so check it
correctly.
Fixes: dbcbabf7da92 ("HID: logitech-dj: fix return value of logi_dj_recv_query_hidpp_devices")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/hid/hid-logitech-dj.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index 8cdf373..bf6b289 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -793,7 +793,7 @@ static void delayedwork_callback(struct work_struct *work)
break;
case WORKITEM_TYPE_UNKNOWN:
retval = logi_dj_recv_query_paired_devices(djrcv_dev);
- if (retval) {
+ if (retval < 0) {
hid_err(djrcv_dev->hidpp, "%s: logi_dj_recv_query_paired_devices error: %d\n",
__func__, retval);
}
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] HID: logitech-dj: Fix check of logi_dj_recv_query_paired_devices()
2019-07-25 14:57 [PATCH] HID: logitech-dj: Fix check of logi_dj_recv_query_paired_devices() YueHaibing
@ 2019-07-31 10:59 ` Petr Vorel
2019-07-31 11:06 ` Petr Vorel
0 siblings, 1 reply; 9+ messages in thread
From: Petr Vorel @ 2019-07-31 10:59 UTC (permalink / raw)
To: YueHaibing; +Cc: jikos, benjamin.tissoires, hdegoede, linux-kernel, linux-input
Hi,
> In delayedwork_callback(), logi_dj_recv_query_paired_devices
> may return positive value while success now, so check it
> correctly.
> Fixes: dbcbabf7da92 ("HID: logitech-dj: fix return value of logi_dj_recv_query_hidpp_devices")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] HID: logitech-dj: Fix check of logi_dj_recv_query_paired_devices()
2019-07-31 10:59 ` Petr Vorel
@ 2019-07-31 11:06 ` Petr Vorel
2019-07-31 11:29 ` Hans de Goede
0 siblings, 1 reply; 9+ messages in thread
From: Petr Vorel @ 2019-07-31 11:06 UTC (permalink / raw)
To: YueHaibing; +Cc: jikos, benjamin.tissoires, hdegoede, linux-kernel, linux-input
Hi,
> > In delayedwork_callback(), logi_dj_recv_query_paired_devices
> > may return positive value while success now, so check it
> > correctly.
> > Fixes: dbcbabf7da92 ("HID: logitech-dj: fix return value of logi_dj_recv_query_hidpp_devices")
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
OK, not only it didn't fix problems with logitech mouse (see below),
but removing mouses USB dongle effectively crashes kernel, so this one probably
shouldn't be applied :).
[ 330.721629] logitech-djreceiver: probe of 0003:046D:C52F.0013 failed with error 7
[ 331.462335] hid 0003:046D:C52F.0013: delayedwork_callback: logi_dj_recv_query_paired_devices error: 7
Kind regards,
Petr
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] HID: logitech-dj: Fix check of logi_dj_recv_query_paired_devices()
2019-07-31 11:06 ` Petr Vorel
@ 2019-07-31 11:29 ` Hans de Goede
2019-07-31 11:41 ` Yuehaibing
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Hans de Goede @ 2019-07-31 11:29 UTC (permalink / raw)
To: Petr Vorel, YueHaibing
Cc: jikos, benjamin.tissoires, linux-kernel, linux-input
Hi Petr,
On 31-07-19 13:06, Petr Vorel wrote:
> Hi,
>
>>> In delayedwork_callback(), logi_dj_recv_query_paired_devices
>>> may return positive value while success now, so check it
>>> correctly.
>
>>> Fixes: dbcbabf7da92 ("HID: logitech-dj: fix return value of logi_dj_recv_query_hidpp_devices")
>>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> OK, not only it didn't fix problems with logitech mouse (see below),
> but removing mouses USB dongle effectively crashes kernel, so this one probably
> shouldn't be applied :).
>
> [ 330.721629] logitech-djreceiver: probe of 0003:046D:C52F.0013 failed with error 7
> [ 331.462335] hid 0003:046D:C52F.0013: delayedwork_callback: logi_dj_recv_query_paired_devices error: 7
Please test my patch titled: "HID: logitech-dj: Really fix return value of logi_dj_recv_query_hidpp_devices"
which should fix this.
Regards,
Hans
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] HID: logitech-dj: Fix check of logi_dj_recv_query_paired_devices()
2019-07-31 11:29 ` Hans de Goede
@ 2019-07-31 11:41 ` Yuehaibing
2019-07-31 11:46 ` Petr Vorel
2019-08-05 8:51 ` Jiri Kosina
2 siblings, 0 replies; 9+ messages in thread
From: Yuehaibing @ 2019-07-31 11:41 UTC (permalink / raw)
To: Hans de Goede, Petr Vorel
Cc: jikos, benjamin.tissoires, linux-kernel, linux-input
On 2019/7/31 19:29, Hans de Goede wrote:
> Hi Petr,
>
> On 31-07-19 13:06, Petr Vorel wrote:
>> Hi,
>>
>>>> In delayedwork_callback(), logi_dj_recv_query_paired_devices
>>>> may return positive value while success now, so check it
>>>> correctly.
>>
>>>> Fixes: dbcbabf7da92 ("HID: logitech-dj: fix return value of logi_dj_recv_query_hidpp_devices")
>>>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>>> Reviewed-by: Petr Vorel <pvorel@suse.cz>
>> OK, not only it didn't fix problems with logitech mouse (see below),
>> but removing mouses USB dongle effectively crashes kernel, so this one probably
>> shouldn't be applied :).
>>
>> [ 330.721629] logitech-djreceiver: probe of 0003:046D:C52F.0013 failed with error 7
>> [ 331.462335] hid 0003:046D:C52F.0013: delayedwork_callback: logi_dj_recv_query_paired_devices error: 7
>
> Please test my patch titled: "HID: logitech-dj: Really fix return value of logi_dj_recv_query_hidpp_devices"
> which should fix this.
Yes, this is better one, thanks!
>
> Regards,
>
> Hans
>
> .
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] HID: logitech-dj: Fix check of logi_dj_recv_query_paired_devices()
2019-07-31 11:29 ` Hans de Goede
2019-07-31 11:41 ` Yuehaibing
@ 2019-07-31 11:46 ` Petr Vorel
2019-08-05 8:51 ` Jiri Kosina
2 siblings, 0 replies; 9+ messages in thread
From: Petr Vorel @ 2019-07-31 11:46 UTC (permalink / raw)
To: Hans de Goede
Cc: YueHaibing, jikos, benjamin.tissoires, linux-kernel, linux-input
Hi Hans,
> Please test my patch titled: "HID: logitech-dj: Really fix return value of logi_dj_recv_query_hidpp_devices"
> which should fix this.
Indeed, patch [1] fixed that, thanks :)
> Regards,
> Hans
Kind regards,
Petr
[1] https://patchwork.kernel.org/patch/11064087/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] HID: logitech-dj: Fix check of logi_dj_recv_query_paired_devices()
2019-07-31 11:29 ` Hans de Goede
2019-07-31 11:41 ` Yuehaibing
2019-07-31 11:46 ` Petr Vorel
@ 2019-08-05 8:51 ` Jiri Kosina
2019-08-05 8:55 ` Hans de Goede
2 siblings, 1 reply; 9+ messages in thread
From: Jiri Kosina @ 2019-08-05 8:51 UTC (permalink / raw)
To: Hans de Goede
Cc: Petr Vorel, YueHaibing, benjamin.tissoires, linux-kernel, linux-input
On Wed, 31 Jul 2019, Hans de Goede wrote:
> >>> In delayedwork_callback(), logi_dj_recv_query_paired_devices
> >>> may return positive value while success now, so check it
> >>> correctly.
> >
> >>> Fixes: dbcbabf7da92 ("HID: logitech-dj: fix return value of
> >>> Fixes: logi_dj_recv_query_hidpp_devices")
> >>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> >> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> > OK, not only it didn't fix problems with logitech mouse (see below),
> > but removing mouses USB dongle effectively crashes kernel, so this one
> > probably
> > shouldn't be applied :).
> >
> > [ 330.721629] logitech-djreceiver: probe of 0003:046D:C52F.0013 failed with
> > error 7
> > [ 331.462335] hid 0003:046D:C52F.0013: delayedwork_callback:
> > logi_dj_recv_query_paired_devices error: 7
>
> Please test my patch titled: "HID: logitech-dj: Really fix return value of
> logi_dj_recv_query_hidpp_devices"
> which should fix this.
Hans, have I been CCed on that patch? I don't seem to see it in in inbox.
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] HID: logitech-dj: Fix check of logi_dj_recv_query_paired_devices()
2019-08-05 8:51 ` Jiri Kosina
@ 2019-08-05 8:55 ` Hans de Goede
2019-08-05 9:27 ` Benjamin Tissoires
0 siblings, 1 reply; 9+ messages in thread
From: Hans de Goede @ 2019-08-05 8:55 UTC (permalink / raw)
To: Jiri Kosina
Cc: Petr Vorel, YueHaibing, benjamin.tissoires, linux-kernel, linux-input
Hi Jiri,
On 05-08-19 10:51, Jiri Kosina wrote:
> On Wed, 31 Jul 2019, Hans de Goede wrote:
>
>>>>> In delayedwork_callback(), logi_dj_recv_query_paired_devices
>>>>> may return positive value while success now, so check it
>>>>> correctly.
>>>
>>>>> Fixes: dbcbabf7da92 ("HID: logitech-dj: fix return value of
>>>>> Fixes: logi_dj_recv_query_hidpp_devices")
>>>>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>>>> Reviewed-by: Petr Vorel <pvorel@suse.cz>
>>> OK, not only it didn't fix problems with logitech mouse (see below),
>>> but removing mouses USB dongle effectively crashes kernel, so this one
>>> probably
>>> shouldn't be applied :).
>>>
>>> [ 330.721629] logitech-djreceiver: probe of 0003:046D:C52F.0013 failed with
>>> error 7
>>> [ 331.462335] hid 0003:046D:C52F.0013: delayedwork_callback:
>>> logi_dj_recv_query_paired_devices error: 7
>>
>> Please test my patch titled: "HID: logitech-dj: Really fix return value of
>> logi_dj_recv_query_hidpp_devices"
>> which should fix this.
>
> Hans, have I been CCed on that patch? I don't seem to see it in in inbox.
I have "Jiri Kosina <jikos@kernel.org>" in the To: for the patch in the
copy in my Inbox (I always Cc myself).
Anyways, you can grab it here:
https://patchwork.kernel.org/patch/11064087/
It has gathered 2 Tested-by-s and 2 Reviewed-by-s since posting, so
assuming you like it too, this is ready for merging.
Regards,
Hans
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] HID: logitech-dj: Fix check of logi_dj_recv_query_paired_devices()
2019-08-05 8:55 ` Hans de Goede
@ 2019-08-05 9:27 ` Benjamin Tissoires
0 siblings, 0 replies; 9+ messages in thread
From: Benjamin Tissoires @ 2019-08-05 9:27 UTC (permalink / raw)
To: Hans de Goede
Cc: Jiri Kosina, Petr Vorel, YueHaibing, lkml, open list:HID CORE LAYER
Hi all,
On Mon, Aug 5, 2019 at 10:55 AM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Hi Jiri,
>
> On 05-08-19 10:51, Jiri Kosina wrote:
> > On Wed, 31 Jul 2019, Hans de Goede wrote:
> >
> >>>>> In delayedwork_callback(), logi_dj_recv_query_paired_devices
> >>>>> may return positive value while success now, so check it
> >>>>> correctly.
> >>>
> >>>>> Fixes: dbcbabf7da92 ("HID: logitech-dj: fix return value of
> >>>>> Fixes: logi_dj_recv_query_hidpp_devices")
> >>>>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> >>>> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> >>> OK, not only it didn't fix problems with logitech mouse (see below),
> >>> but removing mouses USB dongle effectively crashes kernel, so this one
> >>> probably
> >>> shouldn't be applied :).
> >>>
> >>> [ 330.721629] logitech-djreceiver: probe of 0003:046D:C52F.0013 failed with
> >>> error 7
> >>> [ 331.462335] hid 0003:046D:C52F.0013: delayedwork_callback:
> >>> logi_dj_recv_query_paired_devices error: 7
> >>
> >> Please test my patch titled: "HID: logitech-dj: Really fix return value of
> >> logi_dj_recv_query_hidpp_devices"
> >> which should fix this.
> >
> > Hans, have I been CCed on that patch? I don't seem to see it in in inbox.
>
> I have "Jiri Kosina <jikos@kernel.org>" in the To: for the patch in the
> copy in my Inbox (I always Cc myself).
>
> Anyways, you can grab it here:
>
> https://patchwork.kernel.org/patch/11064087/
>
> It has gathered 2 Tested-by-s and 2 Reviewed-by-s since posting, so
> assuming you like it too, this is ready for merging.
>
Sorry for being silent on the mailing list.
I have been 2 weeks on PTO, and when I came back, my server that shown
a few corruptions here and there was completely broken.
I spent the last week trying to revive it until I realized that I have
a bad memory chip on it, which introduced random errors.
Anyway, I think Hans' patch should go in, but I am not fully
operational given that my test box is still recovering :(
Cheers,
Benjamin
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-08-05 9:27 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-25 14:57 [PATCH] HID: logitech-dj: Fix check of logi_dj_recv_query_paired_devices() YueHaibing
2019-07-31 10:59 ` Petr Vorel
2019-07-31 11:06 ` Petr Vorel
2019-07-31 11:29 ` Hans de Goede
2019-07-31 11:41 ` Yuehaibing
2019-07-31 11:46 ` Petr Vorel
2019-08-05 8:51 ` Jiri Kosina
2019-08-05 8:55 ` Hans de Goede
2019-08-05 9:27 ` Benjamin Tissoires
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).