From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1767337AbXCIQCp (ORCPT ); Fri, 9 Mar 2007 11:02:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1767338AbXCIQCo (ORCPT ); Fri, 9 Mar 2007 11:02:44 -0500 Received: from twin.jikos.cz ([213.151.79.26]:50005 "EHLO twin.jikos.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1767337AbXCIQCn (ORCPT ); Fri, 9 Mar 2007 11:02:43 -0500 Date: Fri, 9 Mar 2007 17:01:30 +0100 (CET) From: Jiri Kosina To: Dmitry Torokhov cc: Jiri Slaby , Andrew Morton , linux-kernel@vger.kernel.org, Richard Purdie Subject: Re: Keyboard stops working after *lock [Was: 2.6.21-rc2-mm1] In-Reply-To: Message-ID: References: <20070302030026.5eef0c92.akpm@linux-foundation.org> <45E996A0.6070700@gmail.com> <45E99A45.9030506@gmail.com> <20070303094125.838ce04d.akpm@linux-foundation.org> <45F13791.8040408@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 9 Mar 2007, Jiri Kosina wrote: > If this is present also in vanilla and not only in -mm, could you please > try reverting commits 4237081e573b99a48991aa71364b0682c444651c and > d4ae650a904612ffb7edd3f28b69b022988d2466 and let me know if the > situation gets any better? Hi Jiri, or even better, does the patch below (against 2.6.21-rc3) fix the problem with your keyboard? I can see possibilities of report fields unaligned to the byte boundary, which this might be causing problems. (the original patch author added to cc) Thanks. diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index f4ee1af..f571513 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -873,10 +873,6 @@ static void hid_output_field(struct hid_field *field, __u8 *data) unsigned size = field->report_size; unsigned n; - /* make sure the unused bits in the last byte are zeros */ - if (count > 0 && size > 0) - data[(offset+count*size-1)/8] = 0; - for (n = 0; n < count; n++) { if (field->logical_minimum < 0) /* signed values */ implement(data, offset + n * size, size, s32ton(field->value[n], size));