* Re: My logitech wireless keyboard and mouse stop working after 3.10 kernel
[not found] <CAPf1XsNNqBajqi=SZ=_gcB9dQ1RSAvMnGn981gnN7JqqdThjhQ@mail.gmail.com>
@ 2013-07-07 9:55 ` Jiri Kosina
2013-07-09 4:44 ` wujun zhou
0 siblings, 1 reply; 4+ messages in thread
From: Jiri Kosina @ 2013-07-07 9:55 UTC (permalink / raw)
To: wujun zhou
Cc: linux-input, Benjamin Tissoires, Andrew de los Reyes,
Nestor Lopez Casado
On Sat, 6 Jul 2013, wujun zhou wrote:
> Dear maintainers,
>
> After I switch to the 3.10 kernel, my logitech wireless keyboard and mouse
> stop working.
>
> The keyboard and mouse are connected to the desktop though logitech
> unifying receiver. This little problem almost makes my desktop totally
> unusable. Could someone check and fix the problem? Thanks
>
> Keywords: hid, input, logitech unifying receiver
> Version: Linux version 3.10.0 (gcc version 4.7.3 (Gentoo 4.7.3 p1.0,
> pie-0.5.5) ) #6 SMP Sat Jul 6 21:29:14 PDT 2013
[ adding some CCs ]
Hi,
you are not the first one reporting problems getting worse with later
kernels with the unifying receiver.
Does the keyboard/mouse get properly discovered if you unplug and replug
the receiver? Linus reported that sometimes this is the case for him as
well.
Quoting my response to him two days ago:
===
we have had such reports before, but commit a9dd22b730 (and subsequent
revert of workaround fone by 59626408) was supposed to fix exactly that.
Any idea when this started happening to you?
What if you revert back to the 59626408 workaround (i.e. revert
a9dd22b730 and 8af6c0883)?
I have a couple of unifying receivers myself, but was never able to see
this problem ... so it's either rather timing sensitive, or
device-specific.
===
>
> In case the model matters:
> My mouse: logitech M705
> Keyboard: logitech K270
> The logitech unifying receiver came with one of them. (Sorry, I can't
> remember exactly which one it belong to)
>
> The driver stop working after this commit
> 4f5a81042909fed6977881f22c024aa3582cfcca. The previous version
> 83a44ac8bf4a8e6cbbf0c00ff281a482778f708a works. And I think it is caused by
> the changes to drivers/hid/hid-logitech-dj.c
>
> I get the following dmesg and /proc/bus/input/devices using 3.10 kernel
> [ 5.523741] logitech-djreceiver 0003:046D:C52B.0005: hiddev0,hidraw2:
> USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:14.0-9.2/input2
>
> $ cat /proc/bus/input/devices
> ...
> I: Bus=0019 Vendor=0000 Product=0006 Version=0000
> N: Name="Video Bus"
> P: Phys=LNXVIDEO/video/input0
> S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input/input2
> U: Uniq=
> H: Handlers=kbd event2
> B: PROP=0
> B: EV=3
> B: KEY=3e000b00000000 0 0 0
>
> The kernel find the receiver but not the connected keyboard and mouse.
>
>
> The dmesg and /proc/bus/input/devices when everything works:
> commit 83a44ac8bf4a8e6cbbf0c00ff281a482778f708a
>
> [ 7.479464] logitech-djreceiver 0003:046D:C52B.0003: hiddev0,hidraw0:
> USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:14.0-9.2/input2
> [ 33.072330] input: Logitech Unifying Device. Wireless PID:101b as
> /devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9.2/3-9.2:1.2/0003:046D:C52B.0003/input/input3
> [ 33.072550] logitech-djdevice 0003:046D:C52B.0004: input,hidraw1: USB
> HID v1.11 Mouse [Logitech Unifying Device. Wireless PID:101b] on
> usb-0000:00:14.0-9.2:1
> [ 33.074266] input: Logitech Unifying Device. Wireless PID:4003 as
> /devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9.2/3-9.2:1.2/0003:046D:C52B.0003/input/input4
> [ 33.074380] logitech-djdevice 0003:046D:C52B.0005: input,hidraw2: USB
> HID v1.11 Keyboard [Logitech Unifying Device. Wireless PID:4003] on
> usb-0000:00:14.0-9.2:2
>
>
> $ cat /proc/bus/input/devices
> I: Bus=0019 Vendor=0000 Product=0001 Version=0000
> N: Name="Power Button"
> P: Phys=PNP0C0C/button/input0
> S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input0
> U: Uniq=
> H: Handlers=kbd event0
> B: PROP=0
> B: EV=3
> B: KEY=10000000000000 0
>
> I: Bus=0019 Vendor=0000 Product=0001 Version=0000
> N: Name="Power Button"
> P: Phys=LNXPWRBN/button/input0
> S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
> U: Uniq=
> H: Handlers=kbd event1
> B: PROP=0
> B: EV=3
> B: KEY=10000000000000 0
>
> I: Bus=0019 Vendor=0000 Product=0006 Version=0000
> N: Name="Video Bus"
> P: Phys=LNXVIDEO/video/input0
> S: Sysfs=/devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input/input2
> U: Uniq=
> H: Handlers=kbd event2
> B: PROP=0
> B: EV=3
> B: KEY=3e000b00000000 0 0 0
>
> I: Bus=0003 Vendor=046d Product=c52b Version=0111
> N: Name="Logitech Unifying Device. Wireless PID:101b"
> P: Phys=usb-0000:00:14.0-9.2:1
> S:
> Sysfs=/devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9.2/3-9.2:1.2/0003:046D:C52B.0003/input/input3
> U: Uniq=
> H: Handlers=mouse0 event3
> B: PROP=0
> B: EV=17
> B: KEY=ffff0000 0 0 0 0
> B: REL=143
> B: MSC=10
>
> I: Bus=0003 Vendor=046d Product=c52b Version=0111
> N: Name="Logitech Unifying Device. Wireless PID:4003"
> P: Phys=usb-0000:00:14.0-9.2:2
> S:
> Sysfs=/devices/pci0000:00/0000:00:14.0/usb3/3-9/3-9.2/3-9.2:1.2/0003:046D:C52B.0003/input/input4
> U: Uniq=
> H: Handlers=sysrq kbd event4
> B: PROP=0
> B: EV=12001f
> B: KEY=4837fff072ff32d bf54444600000000 1 30f908b17c007 ffff7bfad941dfff
> febeffdfffefffff fffffffffffffffe
> B: REL=40
> B: ABS=100000000
> B: MSC=10
> B: LED=1f
>
> Please let me know if you need more debug info. Thanks.
>
> Best,
> Wujun Zhou
>
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: My logitech wireless keyboard and mouse stop working after 3.10 kernel
2013-07-07 9:55 ` My logitech wireless keyboard and mouse stop working after 3.10 kernel Jiri Kosina
@ 2013-07-09 4:44 ` wujun zhou
2013-07-09 16:26 ` Benjamin Tissoires
0 siblings, 1 reply; 4+ messages in thread
From: wujun zhou @ 2013-07-09 4:44 UTC (permalink / raw)
To: Jiri Kosina
Cc: linux-input, Benjamin Tissoires, Andrew de los Reyes,
Nestor Lopez Casado
[-- Attachment #1: Type: text/plain, Size: 5338 bytes --]
Hello Jiri,
Thanks for the quick reply.
> Does the keyboard/mouse get properly discovered if you unplug and replug
> the receiver?
No. It is still not working after replug or reboot
> What if you revert back to the 59626408 workaround (i.e. revert
> a9dd22b730 and 8af6c0883)?
It works after revert 8af6c08830b1ae114d1a8b548b1f8b056e068887.
> so it's either rather timing sensitive, or device-specific.
The problem is indeed timing sensitive. Yesterday, after I inserted
some dbg_hid() for debuging, the problem just gone, very strange.
I think for my case, I find the reason of the problem. My device do
not report the expected REPORT_TYPE_NOTIF_DEVICE_PAIRED(0x41). (Not
discarded by the hid-core as mentioned in 8af6c0883, the hardware
itself has not sent the packet.)
Instead, the device reports a
REPORT_TYPE_NOTIF_CONNECTION_STATUS(0x42) event, with
dj_report->report_params[CONNECTION_STATUS_PARAM_STATUS]=0, the first
time I move the mouse.
And then report the normal activities of the mouse. (details about the
usb packets can be found in the attachment.)
In the current code, function
drivers/hid/hid-logitech-dj.c:logi_dj_raw_event (Line 629) will
discard that notification event silently.
switch (dj_report->report_type){
...
case REPORT_TYPE_NOTIF_CONNECTION_STATUS:
if (dj_report->report_params[CONNECTION_STATUS_PARAM_STATUS] ==
STATUS_LINKLOSS) { /* In
the case of the notification event, the STATUS is 0
(STATUS_LINKLOSS==1)*/
logi_dj_recv_forward_null_report(djrcv_dev, dj_report);
}
break;
...
When revert the 8af6c08830b1ae114d1a8b548b1f8b056e068887 (Revert "HID:
Fix logitech-dj: missing Unifying device issue")
The mouse's normal report (report_type==2) will trigger the
logi_dj_recv_forward_report() function and the function will enqueue
that report and schedule the tasklet delayedwork_callback.
The event then fall to the default case of the dj_report.report_type
switch. Which will trigger the
logi_dj_recv_query_paired_devices(djrcv_dev) to ask a new report. And
the device will send back the expected REPORT_TYPE_NOTIF_DEVICE_PAIRED
packet after this.
The attachment logitech_not_work.pcapng.gz and logitech_work.pcapng.gz
are the usb packets grabbed by wireshark.
The logitech_not_work uses the v3.10 driver and the logitech_work uses
v3.10 and revert the 8af6c08830b
The strange one is the package 50. I think we expect a
REPORT_TYPE_NOTIF_DEVICE_PAIRED(0x41) event (and the device report
that event sometimes after I inserted some dbg_hid(), which may slow
things down a little bit.)
But I get this in my computer: (I am using intel i7 4770 CPU)
20:01:42:00:00:00:00:00:00:00:00:00:00:00:00
The third field is REPORT_TYPE_NOTIF_CONNECTION_STATUS (0x42 [66]).
And after this, the mouse report the move events, and we do not
receive any REPORT_TYPE_NOTIF_DEVICE_PAIRED event without another
SET_REPORT request.
The logitech_not_work_dmesg.txt and logitech_work_dmesg.txt are dmsgs
with hid.debug set to 2 (The dmesg and the above captured packets are
from different session, so there may be different)
Besides, I change the dbg_hid() statement inside logi_dj_raw_event to
print the type of the event(And I also move that statement after the
switch statement to get the type)
For the logitech_not_work_dmesg.txt(v3.10), there are a lot of events like this:
Jul 08 14:21:05 g kernel: drivers/hid/hid-logitech-dj.c:
logi_dj_raw_event, size:15,type:66
Jul 08 14:21:05 g kernel: drivers/hid/hid-logitech-dj.c:
djrcv_dev->paired_dj_devices[dj_report->device_index] is NULL, index 1
Jul 08 14:21:05 g kernel: drivers/hid/hid-logitech-dj.c:
logi_dj_raw_event, size:15,type:2
Jul 08 14:21:05 g kernel: drivers/hid/hid-logitech-dj.c:
djrcv_dev->paired_dj_devices[dj_report->device_index] is NULL, index 1
Jul 08 14:21:05 g kernel: drivers/hid/hid-logitech-dj.c:
logi_dj_raw_event, size:15,type:2
Jul 08 14:21:05 g kernel: drivers/hid/hid-logitech-dj.c:
djrcv_dev->paired_dj_devices[dj_report->device_index] is NULL, index 1
Jul 08 14:21:05 g kernel: drivers/hid/hid-logitech-dj.c:
logi_dj_raw_event, size:15,type:2
...
For logitech_work_dmesg.txt(with the revert of 8af6c08830b):
Jul 08 14:37:07 g kernel: drivers/hid/usbhid/hid-core.c: submitting
ctrl urb: Set_Report wValue=0x0220 wIndex=0x0002 wLength=15
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c:
logi_dj_raw_event, size:15,type:66
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c:
djrcv_dev->paired_dj_devices[dj_report->device_index] is NULL, index 1
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c:
logi_dj_raw_event, size:15,type:2
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: delayedwork_callback
Jul 08 14:37:22 g kernel: drivers/hid/usbhid/hid-core.c: submitting
ctrl urb: Set_Report wValue=0x0220 wIndex=0x0002 wLength=15
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c:
logi_dj_raw_event, size:15,type:65
The type:2 report trigger the Set_Report packet and the new status is
reported. Please pay special attention to the time of the type
66(0x42) packet, it happened 15 seconds after the last set_report. (It
is trigger when I move the mouse)
The simple_unifying_receive_path is a fix working on my computer. But
my knowledge of the HID subsystem is very limited. Thus, this patch is
only for demonstration purpose.
Best,
Wujun Zhou
[-- Attachment #2: logitech_not_work_dmesg.txt --]
[-- Type: text/plain, Size: 4199 bytes --]
Jul 08 14:21:04 g kernel: usb 3-10.3: new full-speed USB device number 13 using xhci_hcd
Jul 08 14:21:04 g kernel: usb 3-10.3: ep0 maxpacket = 8
Jul 08 14:21:04 g kernel: usb 3-10.3: Successful evaluate context command
Jul 08 14:21:04 g kernel: usb 3-10.3: skipped 1 descriptor after interface
Jul 08 14:21:04 g kernel: usb 3-10.3: skipped 1 descriptor after interface
Jul 08 14:21:04 g kernel: usb 3-10.3: skipped 1 descriptor after interface
Jul 08 14:21:04 g kernel: usb 3-10.3: default language 0x0409
Jul 08 14:21:04 g kernel: usb 3-10.3: udev 13, busnum 3, minor = 268
Jul 08 14:21:04 g kernel: usb 3-10.3: New USB device found, idVendor=046d, idProduct=c52b
Jul 08 14:21:04 g kernel: usb 3-10.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jul 08 14:21:04 g kernel: usb 3-10.3: Product: USB Receiver
Jul 08 14:21:04 g kernel: usb 3-10.3: Manufacturer: Logitech
Jul 08 14:21:04 g kernel: usb 3-10.3: usb_probe_device
Jul 08 14:21:04 g kernel: usb 3-10.3: configuration #1 chosen from 1 choice
Jul 08 14:21:04 g kernel: usb 3-10.3: Successful Endpoint Configure command
Jul 08 14:21:04 g kernel: usb 3-10.3: adding 3-10.3:1.0 (config #1, interface 0)
Jul 08 14:21:04 g kernel: usbhid 3-10.3:1.0: usb_probe_interface
Jul 08 14:21:04 g kernel: usbhid 3-10.3:1.0: usb_probe_interface - got id
Jul 08 14:21:04 g kernel: drivers/hid/usbhid/hid-core.c: HID probe called for ifnum 0
Jul 08 14:21:04 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_probe called for ifnum 0
Jul 08 14:21:04 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_probe: ignoring ifnum 0
Jul 08 14:21:04 g kernel: usb 3-10.3: adding 3-10.3:1.1 (config #1, interface 1)
Jul 08 14:21:04 g kernel: usbhid 3-10.3:1.1: usb_probe_interface
Jul 08 14:21:04 g kernel: usbhid 3-10.3:1.1: usb_probe_interface - got id
Jul 08 14:21:04 g kernel: drivers/hid/usbhid/hid-core.c: HID probe called for ifnum 1
Jul 08 14:21:04 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_probe called for ifnum 1
Jul 08 14:21:04 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_probe: ignoring ifnum 1
Jul 08 14:21:04 g kernel: usb 3-10.3: adding 3-10.3:1.2 (config #1, interface 2)
Jul 08 14:21:04 g kernel: usbhid 3-10.3:1.2: usb_probe_interface
Jul 08 14:21:04 g kernel: usbhid 3-10.3:1.2: usb_probe_interface - got id
Jul 08 14:21:04 g kernel: drivers/hid/usbhid/hid-core.c: HID probe called for ifnum 2
Jul 08 14:21:04 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_probe called for ifnum 2
Jul 08 14:21:04 g kernel: drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Get_Report wValue=0x0110 wIndex=0x0002 wLength=7
Jul 08 14:21:04 g kernel: drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Get_Report wValue=0x0111 wIndex=0x0002 wLength=20
Jul 08 14:21:04 g kernel: drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Get_Report wValue=0x0120 wIndex=0x0002 wLength=15
Jul 08 14:21:04 g kernel: drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Get_Report wValue=0x0121 wIndex=0x0002 wLength=32
Jul 08 14:21:04 g kernel: usbhid 3-10.3:1.2: looking for a minor, starting at 96
Jul 08 14:21:04 g kernel: logitech-djreceiver 0003:046D:C52B.0029: hiddev0,hidraw3: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:14
Jul 08 14:21:04 g kernel: drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Set_Report wValue=0x0220 wIndex=0x0002 wLength=15
Jul 08 14:21:04 g kernel: drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Set_Report wValue=0x0220 wIndex=0x0002 wLength=15
Jul 08 14:21:05 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15,type:66
Jul 08 14:21:05 g kernel: drivers/hid/hid-logitech-dj.c: djrcv_dev->paired_dj_devices[dj_report->device_index] is NULL, index 1
Jul 08 14:21:05 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15,type:2
Jul 08 14:21:05 g kernel: drivers/hid/hid-logitech-dj.c: djrcv_dev->paired_dj_devices[dj_report->device_index] is NULL, index 1
Jul 08 14:21:05 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15,type:2
Jul 08 14:21:05 g kernel: drivers/hid/hid-logitech-dj.c: djrcv_dev->paired_dj_devices[dj_report->device_index] is NULL, index 1
Jul 08 14:21:05 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15,type:2
[-- Attachment #3: logitech_not_work.pcapng.gz --]
[-- Type: application/x-gzip, Size: 1682 bytes --]
[-- Attachment #4: logitech_work.pcapng.gz --]
[-- Type: application/x-gzip, Size: 2393 bytes --]
[-- Attachment #5: logitech_work_dmesg.txt --]
[-- Type: text/plain, Size: 7199 bytes --]
Jul 08 14:37:07 g kernel: hub 3-10:1.0: state 7 ports 4 chg 0000 evt 0010
Jul 08 14:37:07 g kernel: hub 3-10:1.0: port 4, status 0101, change 0001, 12 Mb/s
Jul 08 14:37:07 g kernel: hub 3-10:1.0: debounce: port 4: total 100ms stable 100ms status 0x101
Jul 08 14:37:07 g kernel: usb 3-10.4: new full-speed USB device number 15 using xhci_hcd
Jul 08 14:37:07 g kernel: usb 3-10.4: ep0 maxpacket = 8
Jul 08 14:37:07 g kernel: usb 3-10.4: Successful evaluate context command
Jul 08 14:37:07 g kernel: usb 3-10.4: skipped 1 descriptor after interface
Jul 08 14:37:07 g kernel: usb 3-10.4: skipped 1 descriptor after interface
Jul 08 14:37:07 g kernel: usb 3-10.4: skipped 1 descriptor after interface
Jul 08 14:37:07 g kernel: usb 3-10.4: default language 0x0409
Jul 08 14:37:07 g kernel: usb 3-10.4: udev 15, busnum 3, minor = 270
Jul 08 14:37:07 g kernel: usb 3-10.4: New USB device found, idVendor=046d, idProduct=c52b
Jul 08 14:37:07 g kernel: usb 3-10.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jul 08 14:37:07 g kernel: usb 3-10.4: Product: USB Receiver
Jul 08 14:37:07 g kernel: usb 3-10.4: Manufacturer: Logitech
Jul 08 14:37:07 g kernel: usb 3-10.4: usb_probe_device
Jul 08 14:37:07 g kernel: usb 3-10.4: configuration #1 chosen from 1 choice
Jul 08 14:37:07 g kernel: usb 3-10.4: Successful Endpoint Configure command
Jul 08 14:37:07 g kernel: usb 3-10.4: adding 3-10.4:1.0 (config #1, interface 0)
Jul 08 14:37:07 g kernel: usbhid 3-10.4:1.0: usb_probe_interface
Jul 08 14:37:07 g kernel: usbhid 3-10.4:1.0: usb_probe_interface - got id
Jul 08 14:37:07 g kernel: drivers/hid/usbhid/hid-core.c: HID probe called for ifnum 0
Jul 08 14:37:07 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_probe called for ifnum 0
Jul 08 14:37:07 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_probe: ignoring ifnum 0
Jul 08 14:37:07 g kernel: usb 3-10.4: adding 3-10.4:1.1 (config #1, interface 1)
Jul 08 14:37:07 g kernel: usbhid 3-10.4:1.1: usb_probe_interface
Jul 08 14:37:07 g kernel: usbhid 3-10.4:1.1: usb_probe_interface - got id
Jul 08 14:37:07 g kernel: drivers/hid/usbhid/hid-core.c: HID probe called for ifnum 1
Jul 08 14:37:07 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_probe called for ifnum 1
Jul 08 14:37:07 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_probe: ignoring ifnum 1
Jul 08 14:37:07 g kernel: usb 3-10.4: adding 3-10.4:1.2 (config #1, interface 2)
Jul 08 14:37:07 g kernel: usbhid 3-10.4:1.2: usb_probe_interface
Jul 08 14:37:07 g kernel: usbhid 3-10.4:1.2: usb_probe_interface - got id
Jul 08 14:37:07 g kernel: drivers/hid/usbhid/hid-core.c: HID probe called for ifnum 2
Jul 08 14:37:07 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_probe called for ifnum 2
Jul 08 14:37:07 g kernel: drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Get_Report wValue=0x0110 wIndex=0x0002 wLength=7
Jul 08 14:37:07 g kernel: drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Get_Report wValue=0x0111 wIndex=0x0002 wLength=20
Jul 08 14:37:07 g kernel: drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Get_Report wValue=0x0120 wIndex=0x0002 wLength=15
Jul 08 14:37:07 g kernel: drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Get_Report wValue=0x0121 wIndex=0x0002 wLength=32
Jul 08 14:37:07 g kernel: usbhid 3-10.4:1.2: looking for a minor, starting at 96
Jul 08 14:37:07 g kernel: logitech-djreceiver 0003:046D:C52B.0031: hiddev0,hidraw3: USB HID v1.11 Device [Logitech USB Receiver] on usb-0000:00:14.0-10.4/input2
Jul 08 14:37:07 g kernel: drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Set_Report wValue=0x0220 wIndex=0x0002 wLength=15
Jul 08 14:37:07 g kernel: drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Set_Report wValue=0x0220 wIndex=0x0002 wLength=15
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15,type:66
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: djrcv_dev->paired_dj_devices[dj_report->device_index] is NULL, index 1
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15,type:2
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: delayedwork_callback
Jul 08 14:37:22 g kernel: drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Set_Report wValue=0x0220 wIndex=0x0002 wLength=15
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15,type:65
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: delayedwork_callback
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_ll_parse
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_ll_parse: sending a mouse descriptor, reports_supported: 4
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_ll_start
Jul 08 14:37:22 g kernel: input: Logitech Unifying Device. Wireless PID:101b as /devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10.4/3-10.4:1.2/0003:046D:C52B.0031/input/input22
Jul 08 14:37:22 g kernel: logitech-djdevice 0003:046D:C52B.0032: input,hidraw4: USB HID v1.11 Mouse [Logitech Unifying Device. Wireless PID:101b] on usb-0000:00:14.0-10.4:1
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_ll_open:usb-0000:00:14.0-10.4:1
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15,type:65
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: delayedwork_callback
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_ll_parse
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_ll_parse: sending a kbd descriptor, reports_supported: 401a
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_ll_parse: sending a multimedia report descriptor: 401a
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_ll_parse: sending a power keys report descriptor: 401a
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_ll_parse: need to send kbd leds report descriptor: 401a
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_ll_start
Jul 08 14:37:22 g kernel: input: Logitech Unifying Device. Wireless PID:4003 as /devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10.4/3-10.4:1.2/0003:046D:C52B.0031/input/input23
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_ll_open:usb-0000:00:14.0-10.4:2
Jul 08 14:37:22 g kernel: logitech-djdevice 0003:046D:C52B.0033: input,hidraw5: USB HID v1.11 Keyboard [Logitech Unifying Device. Wireless PID:4003] on usb-0000:00:14.0-10.4:2
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15,type:65
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: delayedwork_callback
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_recv_add_djhid_device: device list is empty
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15,type:2
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15,type:2
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:7,type:143
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15,type:2
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:7,type:143
Jul 08 14:37:22 g kernel: drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15,type:2
[-- Attachment #6: simple_unifying_receiver_fix.patch --]
[-- Type: application/octet-stream, Size: 1936 bytes --]
From e39bdcd6da4de815f85e5aa2ceb19fe769d53688 Mon Sep 17 00:00:00 2001
From: Wujun Zhou <zwj.echo@gmail.com>
Date: Mon, 8 Jul 2013 20:54:49 -0700
Subject: [PATCH] HID: Fix logitech-dj: missing Unifying pair notification
---
drivers/hid/hid-logitech-dj.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index 5207591a..1a332b2 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -192,6 +192,7 @@ static struct hid_ll_driver logi_dj_ll_driver;
static int logi_dj_output_hidraw_report(struct hid_device *hid, u8 * buf,
size_t count,
unsigned char report_type);
+static int logi_dj_recv_query_paired_devices(struct dj_receiver_dev *djrcv_dev);
static void logi_dj_recv_destroy_djhid_device(struct dj_receiver_dev *djrcv_dev,
struct dj_report *dj_report)
@@ -305,6 +306,7 @@ static void delayedwork_callback(struct work_struct *work)
struct dj_report dj_report;
unsigned long flags;
int count;
+ int retval;
dbg_hid("%s\n", __func__);
@@ -336,6 +338,14 @@ static void delayedwork_callback(struct work_struct *work)
case REPORT_TYPE_NOTIF_DEVICE_UNPAIRED:
logi_dj_recv_destroy_djhid_device(djrcv_dev, &dj_report);
break;
+ case REPORT_TYPE_NOTIF_CONNECTION_STATUS:
+ retval = logi_dj_recv_query_paired_devices(djrcv_dev);
+ if (retval) {
+ dev_err(&djrcv_dev->hdev->dev,
+ "%s:logi_dj_recv_query_paired_devices "
+ "error:%d\n", __func__, retval);
+ }
+ break;
default:
dbg_hid("%s: unexpected report type\n", __func__);
}
@@ -672,6 +682,8 @@ static int logi_dj_raw_event(struct hid_device *hdev,
if (dj_report->report_params[CONNECTION_STATUS_PARAM_STATUS] ==
STATUS_LINKLOSS) {
logi_dj_recv_forward_null_report(djrcv_dev, dj_report);
+ } else {
+ logi_dj_recv_queue_notification(djrcv_dev, dj_report);
}
break;
default:
--
1.8.1.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: My logitech wireless keyboard and mouse stop working after 3.10 kernel
2013-07-09 4:44 ` wujun zhou
@ 2013-07-09 16:26 ` Benjamin Tissoires
2013-07-09 18:27 ` wujun zhou
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Tissoires @ 2013-07-09 16:26 UTC (permalink / raw)
To: wujun zhou
Cc: Jiri Kosina, linux-input, Andrew de los Reyes,
Nestor Lopez Casado, Linus Torvalds
On 07/09/2013 06:44 AM, wujun zhou wrote:
> Hello Jiri,
> Thanks for the quick reply.
>
>> Does the keyboard/mouse get properly discovered if you unplug and replug
>> the receiver?
> No. It is still not working after replug or reboot
>
>> What if you revert back to the 59626408 workaround (i.e. revert
>> a9dd22b730 and 8af6c0883)?
> It works after revert 8af6c08830b1ae114d1a8b548b1f8b056e068887.
>
>> so it's either rather timing sensitive, or device-specific.
> The problem is indeed timing sensitive. Yesterday, after I inserted
> some dbg_hid() for debuging, the problem just gone, very strange.
>
>
> I think for my case, I find the reason of the problem. My device do
> not report the expected REPORT_TYPE_NOTIF_DEVICE_PAIRED(0x41). (Not
> discarded by the hid-core as mentioned in 8af6c0883, the hardware
> itself has not sent the packet.)
> Instead, the device reports a
> REPORT_TYPE_NOTIF_CONNECTION_STATUS(0x42) event, with
> dj_report->report_params[CONNECTION_STATUS_PARAM_STATUS]=0, the first
> time I move the mouse.
> And then report the normal activities of the mouse. (details about the
> usb packets can be found in the attachment.)
>
Thanks for the logs. Your analysis is nearly good :) the problem comes
from the frame 49 and not the 50 in your pcap logs. When calling the
command REPORT_TYPE_CMD_GET_PAIRED_DEVICES (20 ff 81), we get an error
-EPIPE. That means that the receiver never got the request for him to
send the REPORT_TYPE_NOTIF_DEVICE_PAIRED(0x41).
So this bug is definitively linked to the bugs closed by commit
dcd9006b1b053c7b1cebe81333261d4fd492ffeb. There is something different
with USB 3 hubs that triggers this -EPIPE. The urb is still not ready
while it should.
I am trying a long shot here, but could you please give a test to the
following patch?
Cheers,
Benjamin
>From d73c86cff1be22e264fd857ebdc1fd16d07edaad Mon Sep 17 00:00:00 2001
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Date: Tue, 9 Jul 2013 18:22:29 +0200
Subject: [PATCH] HID: logitech-dj: wait for URB completion before asking
paired devices
On some USB3 boards, once the receiver is switched to the DJ mode, if
we try to directly call another SET_REPORT request, we get an error
-EPIPE.
Waiting for the command to complete fixes this.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
drivers/hid/hid-logitech-dj.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index 5207591a..9a6ccf8 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -766,6 +766,9 @@ static int logi_dj_probe(struct hid_device *hdev,
/* Allow incoming packets to arrive: */
hid_device_io_start(hdev);
+ /* wait for the receiver to accept other commands */
+ hid_hw_wait(hdev);
+
retval = logi_dj_recv_query_paired_devices(djrcv_dev);
if (retval < 0) {
dev_err(&hdev->dev, "%s:logi_dj_recv_query_paired_devices "
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: My logitech wireless keyboard and mouse stop working after 3.10 kernel
2013-07-09 16:26 ` Benjamin Tissoires
@ 2013-07-09 18:27 ` wujun zhou
0 siblings, 0 replies; 4+ messages in thread
From: wujun zhou @ 2013-07-09 18:27 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Jiri Kosina, linux-input, Andrew de los Reyes,
Nestor Lopez Casado, Linus Torvalds
[-- Attachment #1: Type: text/plain, Size: 5290 bytes --]
Sorry it still doesn't work all the time. 90% time it works. But
sometime(very rare), I still get -EPIPE in packet 49.
In case it matters:
My motherboard is a GIgabyte GA-Z87-UD4H, and all the usb port is
connected to the USB3.0 controller in the intel Z87 chipset
lspci -vv
00:14.0 USB controller: Intel Corporation Lynx Point USB xHCI Host
Controller (rev 04) (prog-if 30 [XHCI])
Subsystem: Giga-byte Technology Device 5007
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 44
Region 0: Memory at f0520000 (64-bit, non-prefetchable) [size=64K]
Capabilities: [70] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA
PME(D0-,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [80] MSI: Enable+ Count=1/8 Maskable- 64bit+
Address: 00000000feeff00c Data: 41d1
Kernel driver in use: xhci_hcd
lsusb
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
|__ Port 5: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 6: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
|__ Port 9: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 10: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 4: Dev 8, If 0, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 4: Dev 8, If 1, Class=Human Interface Device,
Driver=usbhid, 12M
|__ Port 4: Dev 8, If 2, Class=Human Interface Device,
Driver=usbhid, 12M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
On Tue, Jul 9, 2013 at 9:26 AM, Benjamin Tissoires
<benjamin.tissoires@redhat.com> wrote:
> On 07/09/2013 06:44 AM, wujun zhou wrote:
>> Hello Jiri,
>> Thanks for the quick reply.
>>
>>> Does the keyboard/mouse get properly discovered if you unplug and replug
>>> the receiver?
>> No. It is still not working after replug or reboot
>>
>>> What if you revert back to the 59626408 workaround (i.e. revert
>>> a9dd22b730 and 8af6c0883)?
>> It works after revert 8af6c08830b1ae114d1a8b548b1f8b056e068887.
>>
>>> so it's either rather timing sensitive, or device-specific.
>> The problem is indeed timing sensitive. Yesterday, after I inserted
>> some dbg_hid() for debuging, the problem just gone, very strange.
>>
>>
>> I think for my case, I find the reason of the problem. My device do
>> not report the expected REPORT_TYPE_NOTIF_DEVICE_PAIRED(0x41). (Not
>> discarded by the hid-core as mentioned in 8af6c0883, the hardware
>> itself has not sent the packet.)
>> Instead, the device reports a
>> REPORT_TYPE_NOTIF_CONNECTION_STATUS(0x42) event, with
>> dj_report->report_params[CONNECTION_STATUS_PARAM_STATUS]=0, the first
>> time I move the mouse.
>> And then report the normal activities of the mouse. (details about the
>> usb packets can be found in the attachment.)
>>
>
> Thanks for the logs. Your analysis is nearly good :) the problem comes
> from the frame 49 and not the 50 in your pcap logs. When calling the
> command REPORT_TYPE_CMD_GET_PAIRED_DEVICES (20 ff 81), we get an error
> -EPIPE. That means that the receiver never got the request for him to
> send the REPORT_TYPE_NOTIF_DEVICE_PAIRED(0x41).
>
> So this bug is definitively linked to the bugs closed by commit
> dcd9006b1b053c7b1cebe81333261d4fd492ffeb. There is something different
> with USB 3 hubs that triggers this -EPIPE. The urb is still not ready
> while it should.
>
> I am trying a long shot here, but could you please give a test to the
> following patch?
>
> Cheers,
> Benjamin
>
>
> From d73c86cff1be22e264fd857ebdc1fd16d07edaad Mon Sep 17 00:00:00 2001
> From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Date: Tue, 9 Jul 2013 18:22:29 +0200
> Subject: [PATCH] HID: logitech-dj: wait for URB completion before asking
> paired devices
>
> On some USB3 boards, once the receiver is switched to the DJ mode, if
> we try to directly call another SET_REPORT request, we get an error
> -EPIPE.
>
> Waiting for the command to complete fixes this.
>
> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> ---
> drivers/hid/hid-logitech-dj.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
> index 5207591a..9a6ccf8 100644
> --- a/drivers/hid/hid-logitech-dj.c
> +++ b/drivers/hid/hid-logitech-dj.c
> @@ -766,6 +766,9 @@ static int logi_dj_probe(struct hid_device *hdev,
> /* Allow incoming packets to arrive: */
> hid_device_io_start(hdev);
>
> + /* wait for the receiver to accept other commands */
> + hid_hw_wait(hdev);
> +
> retval = logi_dj_recv_query_paired_devices(djrcv_dev);
> if (retval < 0) {
> dev_err(&hdev->dev, "%s:logi_dj_recv_query_paired_devices "
> --
> 1.8.3.1
>
>
[-- Attachment #2: logitech_with_patch.pcapng.gz --]
[-- Type: application/x-gzip, Size: 1658 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-07-09 18:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAPf1XsNNqBajqi=SZ=_gcB9dQ1RSAvMnGn981gnN7JqqdThjhQ@mail.gmail.com>
2013-07-07 9:55 ` My logitech wireless keyboard and mouse stop working after 3.10 kernel Jiri Kosina
2013-07-09 4:44 ` wujun zhou
2013-07-09 16:26 ` Benjamin Tissoires
2013-07-09 18:27 ` wujun zhou
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).