From: Hugo Osvaldo Barrera <hugo@osvaldobarrera.com.ar>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Nestor Lopez Casado <nlopezcasad@logitech.com>,
linux-input@vger.kernel.org,
Benjamin Tissoires <benjamin.tissoires@enac.fr>,
671292@bugs.debian.org, Jiri Kosina <jkosina@suse.cz>
Subject: Re: [PATCH/RFC v2] HID: logitech: read all 32 bits of report type bitfield
Date: Fri, 11 May 2012 09:50:00 -0300 [thread overview]
Message-ID: <4FAD0AF8.6010504@osvaldobarrera.com.ar> (raw)
In-Reply-To: <20120511073928.GB5733@burratino>
On 2012-05-11 04:39, Jonathan Nieder wrote:
> From: Nestor Lopez Casado <nlopezcasad@logitech.com>
>
> On big-endian systems (e.g., Apple PowerBook), trying to use a
> logitech wireless mouse with the Logitech Unifying Receiver does not
> work with v3.2 and later kernels. The device doesn't show up in
> /dev/input. Older kernels work fine.
>
> That is because the new hid-logitech-dj driver claims the device. The
> device arrival notification appears:
>
> 20 00 41 02 00 00 00 00 00 00 00 00 00 00 00
>
> and we read the report_types bitfield (02 00 00 00) to find out what
> kind of device it is. Unfortunately the driver only reads the first 8
> bits and treats that value as a 32-bit little-endian number, so on a
> powerpc the report type seems to be 0x02000000 and is not recognized.
>
> Even on little-endian machines, connecting a media center remote
> control (report type 00 01 00 00) with this driver loaded would
> presumably fail for the same reason.
>
> Fix both problems by using get_unaligned_le32() to read all four
> bytes, which is a little clearer anyway. After this change, the
> wireless mouse works on Hugo's PowerBook again.
>
> Addresses http://bugs.debian.org/671292
>
> [jn: with commit message and tweaked to use get_unaligned instead of
> copying onto the stack]
>
> Reported-by: Hugo Osvaldo Barrera <hugo@osvaldobarrera.com.ar>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
> Cc: <stable@vger.kernel.org>
> ---
> Change since v1: fixed attribution.
>
> I had been wondering why the patch you sent before didn't fix Hugo's
> problem while the effectively identical patch I sent did. The only
> explanation I can think of is an error introduced in applying the
> patch by hand.
>
<patch snipped>
I'd hate to think I screwed up applying such a simple patch, but it's
the only thing I can think of as well.
Thanks again to both of you for your time and effort, and for your
timely responses on this issue!
I hope this makes it to the main branch soon!
Cheers, and good luck to both,
--
Hugo Osvaldo Barrera
prev parent reply other threads:[~2012-05-11 12:49 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20120503052000.GC15205@burratino>
[not found] ` <20120503052420.GD15205@burratino>
[not found] ` <4FA217B7.7070908@osvaldobarrera.com.ar>
2012-05-03 5:50 ` [bug?] [powerpc] hid_logitech_dj: Wireless mouse does not work in xorg or gpm Jonathan Nieder
[not found] ` <CAE7qMrqtmu+bYYYp43s7Ek=UxfUG8HzwQSQBsdCGcVCBzCMQQw@mail.gmail.com>
2012-05-03 13:08 ` Jonathan Nieder
2012-05-03 13:13 ` Jonathan Nieder
2012-05-04 2:40 ` Bug#671292: " Hugo Osvaldo Barrera
2012-05-04 7:41 ` Jonathan Nieder
2012-05-04 8:10 ` Hugo Osvaldo Barrera
2012-05-04 8:14 ` Hugo Osvaldo Barrera
2012-05-04 8:36 ` Jonathan Nieder
2012-05-04 10:16 ` Nestor Lopez Casado
2012-05-04 10:49 ` Jonathan Nieder
2012-05-06 3:14 ` Hugo Osvaldo Barrera
2012-05-06 5:55 ` Jonathan Nieder
2012-05-06 6:11 ` Hugo Osvaldo Barrera
2012-05-06 6:23 ` Jonathan Nieder
2012-05-11 5:06 ` Hugo Osvaldo Barrera
2012-05-11 6:38 ` Nestor Lopez Casado
2012-05-11 7:22 ` [PATCH/RFC] HID: logitech: read all 32 bits of report type bitfield Jonathan Nieder
2012-05-11 7:36 ` Nestor Lopez Casado
2012-05-11 7:43 ` Jonathan Nieder
2012-05-11 7:39 ` [PATCH/RFC v2] " Jonathan Nieder
2012-05-11 10:55 ` Jiri Kosina
2012-05-11 12:50 ` Hugo Osvaldo Barrera [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FAD0AF8.6010504@osvaldobarrera.com.ar \
--to=hugo@osvaldobarrera.com.ar \
--cc=671292@bugs.debian.org \
--cc=benjamin.tissoires@enac.fr \
--cc=jkosina@suse.cz \
--cc=jrnieder@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=nlopezcasad@logitech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.