From patchwork Sat Oct 2 00:00:08 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 226112 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9206415003678 for ; Sat, 2 Oct 2010 00:06:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752477Ab0JBAAT (ORCPT ); Fri, 1 Oct 2010 20:00:19 -0400 Received: from smtp206.alice.it ([82.57.200.102]:46474 "EHLO smtp206.alice.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752172Ab0JBAAT (ORCPT ); Fri, 1 Oct 2010 20:00:19 -0400 Received: from jcn (82.57.107.78) by smtp206.alice.it (8.5.124.08) (authenticated as fospite@alice.it) id 4C1A268C06AF3045; Sat, 2 Oct 2010 02:00:14 +0200 Date: Sat, 2 Oct 2010 02:00:08 +0200 From: Antonio Ospite To: Alan Ott Cc: Jiri Kosina , linux-input@vger.kernel.org Subject: Re: [PATCH v4 1/2] HID: Add Support for Setting and Getting Feature Reports from hidraw Message-Id: <20101002020008.4812d6a9.ospite@studenti.unina.it> In-Reply-To: <20101001000309.9bb53de4.ospite@studenti.unina.it> References: <1281442367.12579.206.camel@localhost.localdomain> <1281990059-3562-2-git-send-email-alan@signal11.us> <20100930015104.49fc5acf.ospite@studenti.unina.it> <4CA40605.6080800@signal11.us> <20101001000309.9bb53de4.ospite@studenti.unina.it> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64-pc-linux-gnu) X-Face: z*RaLf`X<@C75u6Ig9}{oW$H; 1_\2t5)({*|jhM/Vb; ]yA5\I~93>J<_`<4)A{':UrE Mime-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sat, 02 Oct 2010 00:06:04 +0000 (UTC) diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index df80532..c6648d3 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@ -825,6 +825,11 @@ static int usbhid_get_raw_report(struct hid_device *hid, interface->desc.bInterfaceNumber, buf, count, USB_CTRL_SET_TIMEOUT); + /* restore report number into buf[0], + * some non conformant device might be mangling it + */ + buf[0] = report_number; + /* count also the report id */ if (ret > 0 && skipped_report_id) ret++;