From patchwork Mon Jul 10 07:24:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai-Heng Feng X-Patchwork-Id: 9832447 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1AC7760393 for ; Mon, 10 Jul 2017 07:24:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A1A426E96 for ; Mon, 10 Jul 2017 07:24:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2AB327FB7; Mon, 10 Jul 2017 07:24:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E877726E97 for ; Mon, 10 Jul 2017 07:24:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753173AbdGJHYo (ORCPT ); Mon, 10 Jul 2017 03:24:44 -0400 Received: from mail-wr0-f173.google.com ([209.85.128.173]:35423 "EHLO mail-wr0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752427AbdGJHYn (ORCPT ); Mon, 10 Jul 2017 03:24:43 -0400 Received: by mail-wr0-f173.google.com with SMTP id k67so125620801wrc.2 for ; Mon, 10 Jul 2017 00:24:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=xUoOuu/MblSobpFsLZoJI7ZNGosXdCOTBZck4kR3Zok=; b=IRGFdWZEh7FVpyJdInbDb1EPQ16dCWkimAlN67gI5yrcGIWILqyaIbYSPexjcbH7Rv xL58kbBQ2NcFi0VT/+pBfvWc/E5Lxgyfn4iLpRvY2WsfoooMwLwYDrU2/lrYfVkGDRey N9hb7VbPa2fAX7WJUcGoflbhA2+0L/M821UbSrAiUPurrpdW1O4U7CwLMJ9MZsNeLTa/ HmsSQ4/WNSLWsvpK8uezyuWvoTYtGp2R4wRR66/zbpIqJ6G7Va8PyuqyhThsXlODUNK+ anToJDyFHSDwNLDRtAWV9tGHtGHofA5ee7VWswCodXy3Wn/VLQ9zBOJa4vgGS+oxoc0T amtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=xUoOuu/MblSobpFsLZoJI7ZNGosXdCOTBZck4kR3Zok=; b=lXb47kD7F7aP2xJDl4caTXeDf0c8c0qzgUbuu0U+YqznBh9AMp0XIfOZR3x7ZB23r9 djee4aR1A0m6xJjTfyOQ0iD0fraIbehtYwoKxRZiVxVElQKiHIZ7yHfU+zncD82qk6R4 mxmKBAImvSEUf1aianc3uG6eM/SGb90gqOcCEgEP6Res8K51Q2P0sNGA2HASY0QZLdJA Oc5Zjc981k/pxje+7sp9wMM2/Ls9j0M4SKpGxi8BpYG6/RL5GNV7aqmf7ZCkNrRayGuP iyJ4YpBixIpie0SelvNAa6GzyOOp92IPFmL7MDhzBe12+3IYntpZd7sj5rFmvykyegyn bSIw== X-Gm-Message-State: AIVw112wWsvAhmzYSahjqkbTP4uOcBJGKtb2uI9JSm7oNljuLSKlXlmy SeR5V/YaXpRBuUKRWRhcBpkMqhuJ/7mMWwA= X-Received: by 10.223.163.202 with SMTP id m10mr6946751wrb.197.1499671467864; Mon, 10 Jul 2017 00:24:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.149.209 with HTTP; Mon, 10 Jul 2017 00:24:27 -0700 (PDT) From: Kai-Heng Feng Date: Mon, 10 Jul 2017 15:24:27 +0800 Message-ID: Subject: Cypress PS/2 trackpad does not work To: linux-input@vger.kernel.org, dudl@cypress.com Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, The original bug report is at [1]. I used diff below to 1. generate verbose debug information, 2. print bad packet data, 3. ignore bad data and continue .. But the touchpad still falls back to ImPS/2 mouse. The dmesg is at [2]. Also, change "cytp->tp_metrics_supporte" from 1 to 0 doesn't help, either. How do I help the user to debug this issue further? Thanks. /* call packet process for reporting finger leave. */ @@ -606,8 +610,13 @@ static psmouse_ret_t cypress_validate_byte(struct psmouse *psmouse) if ((cytp->mode & CYTP_BIT_ABS_REL_MASK) == 0) return PSMOUSE_GOOD_DATA; - if ((packet[0] & 0x08) == 0x08) - return PSMOUSE_BAD_DATA; + if ((packet[0] & 0x08) == 0x08) { + psmouse_warn(psmouse, + "lp1693440: bad packet[0] = %0x, " + "but let's pretend it's nothing\n", + packet[0]); + //return PSMOUSE_BAD_DATA; + } contact_cnt = cypress_get_finger_count(packet[0]); if (cytp->mode & CYTP_BIT_ABS_NO_PRESSURE) [1] https://bugs.launchpad.net/bugs/1693440 [2] https://launchpadlibrarian.net/326836808/4.12dmesg --- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/input/mouse/cypress_ps2.c b/drivers/input/mouse/cypress_ps2.c index 125f72cf9814..ed2cf770ae53 100644 --- a/drivers/input/mouse/cypress_ps2.c +++ b/drivers/input/mouse/cypress_ps2.c @@ -27,7 +27,7 @@ #include "cypress_ps2.h" -#undef CYTP_DEBUG_VERBOSE /* define this and DEBUG for more verbose dump */ +#define CYTP_DEBUG_VERBOSE /* define this and DEBUG for more verbose dump */ static void cypress_set_packet_size(struct psmouse *psmouse, unsigned int n) { @@ -583,8 +583,12 @@ static psmouse_ret_t cypress_validate_byte(struct psmouse *psmouse) unsigned char *packet = psmouse->packet; struct cytp_data *cytp = psmouse->private; - if (index < 0 || index > cytp->pkt_size) + if (index < 0 || index > cytp->pkt_size) { + psmouse_warn(psmouse, + "lp1693440: index = %d, pkt_size = %d\n", + index, cytp->pkt_size); return PSMOUSE_BAD_DATA; + } if (index == 0 && (packet[0] & 0xfc) == 0) {