Re: [bug?] [powerpc] hid_logitech_dj: Wireless mouse does not work in xorg or gpm

Started by Jonathan Nieder on May 3, 2012 · 9 messages from 3 authors · Last reply May 4, 2012

open the first message on its own page

Message details and related content
Nestor Lopez Casado wrote:
Thanks for reporting this issue. This is not a known problem.

It does point to an endianess issue.
Good to know.  Thanks for a quick reply.
As I do not have readily available PowerPC HW and we have some urgent
things to work on right now: Would it be possible if you help us by doing
the same tests, but enabling the debug log on hid ?
Hugo: please attach full output from "dmesg" after running

	modprobe -r hid-logitech-dj
	modprobe -r usbhid
	echo 1 >/sys/module/hid/parameters/debug
	modprobe usbhid
	modprobe hid-logitech-dj

An alternative method would be to boot with "hid.hid_debug=1
log_buf_len=2097152" and run dmesg.

Hope that helps,
Jonathan
Message details and related content
Jonathan Nieder wrote:
An alternative method would be to boot with "hid.hid_debug=1
log_buf_len=2097152" and run dmesg.
Apparently I can't spell.  An alternative method would be to run with
"hid.debug=1 log_buf_len=..." or to do

	modprobe -r hid-logitech-dj
	modprobe -r usbhid
	modprobe -r hid
	modprobe hid debug=1
	modprobe hid-logitech-dj
	dmesg

Sorry for the confusion.
Jonathan

Bug#671292: [bug?] [powerpc] hid_logitech_dj: Wireless mouse does not work in xorg or gpm

Message details and related content
Hi,

On 2012.05.03 08:13, Jonathan Nieder wrote:
Jonathan Nieder wrote:
quoted
An alternative method would be to boot with "hid.hid_debug=1
log_buf_len=2097152" and run dmesg.
Apparently I can't spell.  An alternative method would be to run with
"hid.debug=1 log_buf_len=..." or to do

	modprobe -r hid-logitech-dj
	modprobe -r usbhid
	modprobe -r hid
	modprobe hid debug=1
	modprobe hid-logitech-dj
	dmesg

Sorry for the confusion.
No problem
Jonathan
Here goes, I'm pretty sure a few of the first lines aren't relevant, but I prefer to send a couple too many instead of a couple to few :)

[ 1244.617478] usb 4-1: USB disconnect, device number 2
[77892.290041] usb 4-1: new full-speed USB device number 3 using ohci_hcd
[77892.512057] usb 4-1: New USB device found, idVendor=046d, idProduct=c52b
[77892.512817] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[77892.513584] usb 4-1: Product: USB Receiver
[77892.514280] usb 4-1: Manufacturer: Logitech
[77892.540356] logitech-djreceiver 0003:046D:C52B.000B: hiddev0,hidraw0: USB HID v1.11 Device [Logitech USB Receiver] on usb-0001:10:1b.1-1/input2
[77892.550769] logitech-djdevice 0003:046D:C52B.000C: hidraw1: USB HID v1.11 Device [Logitech Unifying Device. Wireless PID:101a] on usb-0001:10:1b.1-1:1
[77912.356716] usbcore: deregistering interface driver usbhid
[77927.421876] usbcore: registered new interface driver usbhid
[77927.422859] usbhid: USB HID core driver
[77927.461256] logitech-djreceiver 0003:046D:C52B.0003: hiddev0,hidraw0: USB HID v1.11 Device [Logitech USB Receiver] on usb-0001:10:1b.1-1/input2
[77927.473593] logitech-djdevice 0003:046D:C52B.0004: hidraw1: USB HID v1.11 Device [Logitech Unifying Device. Wireless PID:101a] on usb-0001:10:1b.1-1:1
[77985.718533] usbcore: deregistering interface driver usbhid
[77985.843593] hid: hid_debug is now used solely for parser and driver debugging.
[77985.843602] debugfs is now used for inspecting the device (report descriptor, reports)
[77985.890194] /build/buildd-linux-2.6_3.3.4-1~experimental.1-powerpc-atUZTv/linux-2.6-3.3.4/debian/build/source_powerpc_none/drivers/hid/usbhid/hid-core.c: HID probe called for ifnum 0
[77985.891586] /build/buildd-linux-2.6_3.3.4-1~experimental.1-powerpc-atUZTv/linux-2.6-3.3.4/debian/build/source_powerpc_none/drivers/hid/usbhid/hid-core.c: HID probe called for ifnum 1
[77985.893142] /build/buildd-linux-2.6_3.3.4-1~experimental.1-powerpc-atUZTv/linux-2.6-3.3.4/debian/build/source_powerpc_none/drivers/hid/usbhid/hid-core.c: HID probe called for ifnum 2
[77985.895398] usbcore: registered new interface driver usbhid
[77985.896491] usbhid: USB HID core driver
[77985.914131] /build/buildd-linux-2.6_3.3.4-1~experimental.1-powerpc-atUZTv/linux-2.6-3.3.4/debian/build/source_powerpc_none/drivers/hid/hid-logitech-dj.c: Logitech-DJ:logi_dj_init
[77985.914189] /build/buildd-linux-2.6_3.3.4-1~experimental.1-powerpc-atUZTv/linux-2.6-3.3.4/debian/build/source_powerpc_none/drivers/hid/hid-logitech-dj.c: logi_dj_probe called for ifnum 0
[77985.914198] /build/buildd-linux-2.6_3.3.4-1~experimental.1-powerpc-atUZTv/linux-2.6-3.3.4/debian/build/source_powerpc_none/drivers/hid/hid-logitech-dj.c: logi_dj_probe: ignoring ifnum 0
[77985.914224] /build/buildd-linux-2.6_3.3.4-1~experimental.1-powerpc-atUZTv/linux-2.6-3.3.4/debian/build/source_powerpc_none/drivers/hid/hid-logitech-dj.c: logi_dj_probe called for ifnum 1
[77985.914233] /build/buildd-linux-2.6_3.3.4-1~experimental.1-powerpc-atUZTv/linux-2.6-3.3.4/debian/build/source_powerpc_none/drivers/hid/hid-logitech-dj.c: logi_dj_probe: ignoring ifnum 1
[77985.914250] /build/buildd-linux-2.6_3.3.4-1~experimental.1-powerpc-atUZTv/linux-2.6-3.3.4/debian/build/source_powerpc_none/drivers/hid/hid-logitech-dj.c: logi_dj_probe called for ifnum 2
[77985.919851] /build/buildd-linux-2.6_3.3.4-1~experimental.1-powerpc-atUZTv/linux-2.6-3.3.4/debian/build/source_powerpc_none/drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Get_Report wValue=0x1001 wIndex=0x0200 wLength=1792
[77985.921771] /build/buildd-linux-2.6_3.3.4-1~experimental.1-powerpc-atUZTv/linux-2.6-3.3.4/debian/build/source_powerpc_none/drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Get_Report wValue=0x1101 wIndex=0x0200 wLength=5120
[77985.922775] /build/buildd-linux-2.6_3.3.4-1~experimental.1-powerpc-atUZTv/linux-2.6-3.3.4/debian/build/source_powerpc_none/drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Get_Report wValue=0x2001 wIndex=0x0200 wLength=3840
[77985.923763] /build/buildd-linux-2.6_3.3.4-1~experimental.1-powerpc-atUZTv/linux-2.6-3.3.4/debian/build/source_powerpc_none/drivers/hid/usbhid/hid-core.c: submitting ctrl urb: Get_Report wValue=0x2101 wIndex=0x0200 wLength=8192
[77985.927818] logitech-djreceiver 0003:046D:C52B.0003: hiddev0,hidraw0: USB HID v1.11 Device [Logitech USB Receiver] on usb-0001:10:1b.1-1/input2
[77985.937799] /build/buildd-linux-2.6_3.3.4-1~experimental.1-powerpc-atUZTv/linux-2.6-3.3.4/debian/build/source_powerpc_none/drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15
[77985.939796] /build/buildd-linux-2.6_3.3.4-1~experimental.1-powerpc-atUZTv/linux-2.6-3.3.4/debian/build/source_powerpc_none/drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15
[77985.939809] /build/buildd-linux-2.6_3.3.4-1~experimental.1-powerpc-atUZTv/linux-2.6-3.3.4/debian/build/source_powerpc_none/drivers/hid/hid-logitech-dj.c: logi_dj_recv_queue_notification: did not schedule the work item, was already queued
[77985.942193] /build/buildd-linux-2.6_3.3.4-1~experimental.1-powerpc-atUZTv/linux-2.6-3.3.4/debian/build/source_powerpc_none/drivers/hid/hid-logitech-dj.c: delayedwork_callback
[77985.942406] /build/buildd-linux-2.6_3.3.4-1~experimental.1-powerpc-atUZTv/linux-2.6-3.3.4/debian/build/source_powerpc_none/drivers/hid/hid-logitech-dj.c: logi_dj_ll_parse

4 more lines

Message details and related content
Hugo Osvaldo Barrera wrote:
Here goes, I'm pretty sure a few of the first lines aren't relevant, but I
prefer to send a couple too many instead of a couple to few :)
Thanks!  That was fast.  I'd also be interested in the corresponding
output from an Intel architecture machine with the same kernel version
for comparison.

I'm hoping some obvious difference will jump out --- otherwise I or
some other reader will have to look at the actual code. ;-)

Hope that helps,
Jonathan
Message details and related content
On 2012.05.04 02:41, Jonathan Nieder wrote:
Hugo Osvaldo Barrera wrote:
quoted
Here goes, I'm pretty sure a few of the first lines aren't relevant, but I
prefer to send a couple too many instead of a couple to few :)
Thanks!  That was fast.  I'd also be interested in the corresponding
output from an Intel architecture machine with the same kernel version
for comparison.

I'm hoping some obvious difference will jump out --- otherwise I or
some other reader will have to look at the actual code. ;-)

Hope that helps,
Jonathan
Here you go - *I* certainly can't make anything out of it, but hope it helps :)

$ uname -a
Linux hyperion 3.3.2-1-ARCH #1 SMP PREEMPT Sat Apr 14 09:48:37 CEST 2012 x86_64 AMD Phenom(tm) II X4 945 Processor AuthenticAMD GNU/Linux

dmesg:

<The following ONE line repeated itself 272 times.  I've snipped it for readability>
[335294.173474] drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15
[335294.173485] drivers/hid/hid-logitech-dj.c: logi_dj_ll_input_event: usb-0000:00:12.1-3:1, type:4 | code:4 | value:589825
[335294.277432] drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15
[335294.277442] drivers/hid/hid-logitech-dj.c: logi_dj_ll_input_event: usb-0000:00:12.1-3:1, type:4 | code:4 | value:589825
<The following ONE line repeated itself 94 times.  I've snipped it for readability>
[335295.841399] drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15
[335295.841407] drivers/hid/hid-logitech-dj.c: logi_dj_ll_input_event: usb-0000:00:12.1-3:1, type:4 | code:4 | value:589825
[335295.945386] drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15
[335295.945395] drivers/hid/hid-logitech-dj.c: logi_dj_ll_input_event: usb-0000:00:12.1-3:1, type:4 | code:4 | value:589825
<The following ONE line repeated itself 110 times.  I've snipped it for readability>
[335307.282816] drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15

<snipped some nvidia related stuff>

<The following ONE line repeated itself 71 times.  I've snipped it for readability>
[335313.294547] drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15
[335313.294559] drivers/hid/hid-logitech-dj.c: logi_dj_ll_input_event: usb-0000:00:12.1-3:1, type:4 | code:4 | value:589827
[335313.446544] drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15
[335313.446558] drivers/hid/hid-logitech-dj.c: logi_dj_ll_input_event: usb-0000:00:12.1-3:1, type:4 | code:4 | value:589827
<The following ONE line repeated itself 65 times.  I've snipped it for readability>
[335317.788350] drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15
[335317.788360] drivers/hid/hid-logitech-dj.c: logi_dj_ll_input_event: usb-0000:00:12.1-3:1, type:4 | code:4 | value:589825
<The following ONE line repeated itself 22 times.  I've snipped it for readability>
[335318.044338] drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15
[335318.044350] drivers/hid/hid-logitech-dj.c: logi_dj_ll_input_event: usb-0000:00:12.1-3:1, type:4 | code:4 | value:589825
<The following ONE line repeated itself 52 times.  I've snipped it for readability>
[335324.738080] drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15
[335324.738089] drivers/hid/hid-logitech-dj.c: logi_dj_ll_input_event: usb-0000:00:12.1-3:1, type:4 | code:4 | value:589827
<The following ONE line repeated itself 32 times.  I've snipped it for readability>
[335325.068018] drivers/hid/hid-logitech-dj.c: logi_dj_raw_event, size:15
[335325.068030] drivers/hid/hid-logitech-dj.c: logi_dj_ll_input_event: usb-0000:00:12.1-3:1, type:4 | code:4 | value:589827

98 more lines

Message details and related content
On 2012-05-04 05:10, Hugo Osvaldo Barrera wrote:
On 2012.05.04 02:41, Jonathan Nieder wrote:
quoted
Hugo Osvaldo Barrera wrote:
quoted
Here goes, I'm pretty sure a few of the first lines aren't relevant, but I
prefer to send a couple too many instead of a couple to few :)
Thanks!  That was fast.  I'd also be interested in the corresponding
output from an Intel architecture machine with the same kernel version
for comparison.

I'm hoping some obvious difference will jump out --- otherwise I or
some other reader will have to look at the actual code. ;-)

Hope that helps,
Jonathan
Here you go - *I* certainly can't make anything out of it, but hope it helps :)

$ uname -a
Linux hyperion 3.3.2-1-ARCH #1 SMP PREEMPT Sat Apr 14 09:48:37 CEST 2012 x86_64 AMD Phenom(tm) II X4 945 Processor AuthenticAMD GNU/Linux

dmesg:
<snip>

Oh, it slipped my mind and I used the other (identical) mouse for this,
does that matter?  They're the exact same model.

-- 
Hugo Osvaldo Barrera
Message details and related content
Hugo Osvaldo Barrera wrote:
Oh, it slipped my mind and I used the other (identical) mouse for this,
does that matter?  They're the exact same model.
Probably doesn't matter, but thanks for mentioning it.

Sincerely,
Jonathan
Message details and related content
Hi guys,

Thanks for those logs, very helpful.

Would you be able to test the following patch on both systems and let
us know about the result?

Cheers,
Nestor
diff --git a/drivers/hid/hid-logitech-dj.c b/drivers/hid/hid-logitech-dj.c
index 38b12e4..763e4d9 100644
--- a/drivers/hid/hid-logitech-dj.c
+++ b/drivers/hid/hid-logitech-dj.c
@@ -215,6 +215,7 @@ static void logi_dj_recv_add_djhid_device(struct
dj_receiver_dev *djrcv_dev,
 	struct usb_device *usbdev = interface_to_usbdev(intf);
 	struct hid_device *dj_hiddev;
 	struct dj_device *dj_dev;
+	u32 reports_supported;

 	/* Device index goes from 1 to 6, we need 3 bytes to store the
 	 * semicolon, the index, and a null terminator
@@ -264,9 +265,11 @@ static void logi_dj_recv_add_djhid_device(struct
dj_receiver_dev *djrcv_dev,
 			__func__);
 		goto dj_device_allocate_fail;
 	}
+	memcpy(&reports_supported,
+		&dj_report->report_params[DEVICE_PAIRED_RF_REPORT_TYPE],
+		sizeof(reports_supported));

-	dj_dev->reports_supported = le32_to_cpu(
-		dj_report->report_params[DEVICE_PAIRED_RF_REPORT_TYPE]);
+	dj_dev->reports_supported = le32_to_cpu(reports_supported);
 	dj_dev->hdev = dj_hiddev;
 	dj_dev->dj_receiver_dev = djrcv_dev;
 	dj_dev->device_index = dj_report->device_index;



On Fri, May 4, 2012 at 10:36 AM, Jonathan Nieder [off-list ref] wrote:
Hugo Osvaldo Barrera wrote:
quoted
Oh, it slipped my mind and I used the other (identical) mouse for this,
does that matter?  They're the exact same model.
Probably doesn't matter, but thanks for mentioning it.

Sincerely,
Jonathan
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Message details and related content
Nestor Lopez Casado wrote:
Would you be able to test the following patch on both systems and let
us know about the result?
Instructions for Hugo:

	# prerequisites
	apt-get install git build-essential

	# get the kernel history, if you don't already have it
	git clone \
	  git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

	# latest mainline kernel
	cd linux
	git fetch origin
	git checkout origin/master

	# configure
	cp /boot/config-$(uname -r) .config; # current configuration
	scripts/config --disable DEBUG_INFO; # smaller build
	make localmodconfig; # minimize configuration

	# apply patch
	git apply --index /path/to/patch

	# build
	make deb-pkg; # optionally with -j<num> for parallel build

	# test
	dpkg -i ../<name of package>; # as root
	reboot

	# to unapply patch:
	cd linux
	git reset --hard origin/master

	# when you want to build again:
	make deb-pkg; # maybe with -j4
	dpkg -i ../<name of package>; # as root
	reboot

I would also be interested in a capture of the pairing event, if possible:

11 more lines

Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help