From: Kevin Daughtridge <kevin@kdau.com>
To: Henrik Rydberg <rydberg@euromail.se>,
Sergei Shtylyov <sshtylyov@mvista.com>
Cc: Jiri Kosina <jkosina@suse.cz>,
linux-input@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usbhid: call report_fixup before comparing descriptors
Date: Tue, 18 Sep 2012 19:21:09 -0700 [thread overview]
Message-ID: <50592C15.8060505@kdau.com> (raw)
In-Reply-To: <20120918161615.GA1439@polaris.bitmath.org>
On 09/18/12 09:16 N.U., Henrik Rydberg wrote:
> You can use dev_rdesc here instead.
Hi Henrik. Thanks for the tip. I tried comparing rdesc to hid->dev_rdesc
without any report_fixup call, but the problem (device nonfunctional
with "reset_resume error 1" message) still occurred. Upon looking at
hid_open_report, I noticed that it calls report_fixup on dev_rdesc
(pointer copied to "start") before it is kmemdup'd to rdesc. For most
HID drivers, the report_fixup method directly modifies and returns the
passed structure instead of returning a new pointer, so dev_rdesc is
also modified. Assuming that dev_rdesc is supposed to be the unmodified
data, I moved the report_fixup call in hid_open_report to after the
kmemdup. This combination successfully solves the original problem. I'll
submit a new patch version presently that addresses both points.
On 09/18/12 05:00 N.U., Sergei Shtylyov wrote:
> Your patch is whitespace damaged, i.e. has all tabs replaced by spaces.
Hi Sergei. Thanks for catching that. The munging problem was supposedly
fixed in Thunderbird years ago! I guess I'll just mail the new version
from the command line.
-Kevin
prev parent reply other threads:[~2012-09-19 2:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-17 20:05 [PATCH] usbhid: call report_fixup before comparing descriptors Kevin Daughtridge
2012-09-18 12:00 ` Sergei Shtylyov
2012-09-18 16:16 ` Henrik Rydberg
2012-09-19 2:21 ` Kevin Daughtridge [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=50592C15.8060505@kdau.com \
--to=kevin@kdau.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=rydberg@euromail.se \
--cc=sshtylyov@mvista.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 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).