From patchwork Thu Apr 29 16:57:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Fritz X-Patchwork-Id: 95912 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3UHCAC9008589 for ; Fri, 30 Apr 2010 17:12:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758245Ab0D3RMA (ORCPT ); Fri, 30 Apr 2010 13:12:00 -0400 Received: from fg-out-1718.google.com ([72.14.220.152]:60443 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932714Ab0D3RIl (ORCPT ); Fri, 30 Apr 2010 13:08:41 -0400 Received: by fg-out-1718.google.com with SMTP id 19so4463127fgg.1 for ; Fri, 30 Apr 2010 10:08:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=/KLCY7v5Y1u4+EdAPPgH+h5+gQ6qO0YRyKjC+lMonIw=; b=CurADtlvpKODeTCziNN6+I9AJ/ZgVBuk3Z557uHX1lJhxEF/+XqTSZGPvjzbMIY0FY /hhh7gT4XWuLBp4tFYl1a9gK2xerNfDKjaXPlv1QoFn48+8kEGFLQzSRWVQZmwPC17Eu 0gIaGEFn5UXEvCTKSp4eGA0eFz+zaJKkoWx18= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=de1NbQczMypPvOj9VYv/8rY7UaaBPeadiqN1r6kquhWuZJAnftGscQY+01COOY2Zo6 Hogziy/K85fMVTogYpnvG1tLLTtWkuxM66QXLDExmXQz5jMpUsNiUhc9xldVUYaStLVn HqXqDe2BzfqDxC6dBQxCai/t9nO52+iQEPh+A= Received: by 10.87.50.6 with SMTP id c6mr1903975fgk.41.1272559927020; Thu, 29 Apr 2010 09:52:07 -0700 (PDT) Received: from [127.0.0.1] (p3EE0543D.dip.t-dialin.net [62.224.84.61]) by mx.google.com with ESMTPS id 18sm1217234fks.5.2010.04.29.09.52.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 29 Apr 2010 09:52:02 -0700 (PDT) Subject: Re: [PATCH] Reset ps/2 port should psmouse_probe fail before retrying From: Christoph Fritz To: "Peter M. Petrakis" Cc: Dmitry Torokhov , linux-input@vger.kernel.org, rubini , Christopher Heiny In-Reply-To: <4BD897D4.4060405@canonical.com> References: <1271723857.6652.6.camel@lovely> <20100422215517.GB28213@core.coreip.homeip.net> <1271983668.16254.44.camel@lovely> <201004230953.52447.dmitry.torokhov@gmail.com> <4BD1EB1C.1070200@canonical.com> <20100428170721.GA6608@core.coreip.homeip.net> <4BD897D4.4060405@canonical.com> Date: Thu, 29 Apr 2010 18:57:48 +0200 Message-Id: <1272560268.3987.12.camel@lovely> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 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 (demeter.kernel.org [140.211.167.41]); Fri, 30 Apr 2010 17:12:11 +0000 (UTC) diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 026df60..aa25fbd 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -103,8 +103,12 @@ void synaptics_reset(struct psmouse *psmouse) */ static int synaptics_send_cmd(struct psmouse *psmouse, unsigned char c, unsigned char *param) { - if (psmouse_sliced_command(psmouse, c)) - return -1; + int i; + + for (i = 0; i < 4; i++) { + if (ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_SETRES)) + return -1; + } if (ps2_command(&psmouse->ps2dev, param, PSMOUSE_CMD_GETINFO)) return -1; return 0;