Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3499986img; Mon, 25 Mar 2019 11:31:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMYEyfcjH+BuOfHq7jAEzVZDJnMiT+v6VCJN/Re46TmFgYhHW2y8usR2yUlB2behq6pWkh X-Received: by 2002:a65:6105:: with SMTP id z5mr25040758pgu.434.1553538706921; Mon, 25 Mar 2019 11:31:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553538706; cv=none; d=google.com; s=arc-20160816; b=kUrcrJ1M8FM/FbvLe2XqBKky+b1mAR1B00GwQBufLLtLCU8O8HP2YbVxrGvElf6PLx zt5i+1lqSZ+Bq65xSIQAvNCaQ+kOw5/+8Ioca2onx21MEg5gtELnX3WRUIX7DD6biT/j dJfP3b1BacchlTneINM4GiuMR6nfN1zWNIlSNQbMXRjmBR+sJlwyOk2bEp3ZNGT02sDY RK+wv0y7vTvhLETG148hGbsSDFdAf/aOaagEXpZicYIql9M/JkHSb9K07JWkEzsYETpA UUW8nKHwvSPTh6t8wmQlr8W57V/dCrVk6dhwWA2QX4qMnf3qGRLzvcNuMKVySh1/tKzK dLfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ibmine5CoYu+qwC4nsM/es1TEToU8N581offEqa03Jg=; b=XcCeRF3wT9P5JnX/Aw4AMAPy6mq75co1aq5zyvM7dVSxGIqHuPv6bZAAGoFbrAxkJ4 /FBs5tZO0Ykgu6XZiq8DPQYWd6dPCk777dOPscboSFUaX5hGaBp9aDIi2JbIu25y3JL/ /ydzFV1oi33SBm1A7N9280odJrYEoLCT1LipGP0vfQe7Ez4iuKOFXHXiuEsD10etSPIv xYXFKp59qh9ntkFS/ryEChdHb2H5Butl3cp773VhfyTbHHLn4bRPJMS0YOUcn9aQq74m icQD3v1qnrghNihkPtUkd5DYYRjnTcpDqzHaz6IjfSxIuruDuus3vl98tUzWxOxFuSMe LGUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LQ3+xwbV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h11si13628263pgs.432.2019.03.25.11.31.31; Mon, 25 Mar 2019 11:31:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LQ3+xwbV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730113AbfCYSal (ORCPT + 99 others); Mon, 25 Mar 2019 14:30:41 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:40294 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729938AbfCYSal (ORCPT ); Mon, 25 Mar 2019 14:30:41 -0400 Received: by mail-lj1-f194.google.com with SMTP id q66so8795430ljq.7 for ; Mon, 25 Mar 2019 11:30:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ibmine5CoYu+qwC4nsM/es1TEToU8N581offEqa03Jg=; b=LQ3+xwbVq0zaFEK2XfsapsupqeUvol/qn0i1bJhdWYbQh20ZA34zMArXfEXwDT8Dil GR+jse4z+rLNFNXTSKDQDAhHY1PzNujlhn39b9q0Mhm4i2iBV6sR6HHQ4dJ6Jez9LHNM kx1Hnkr2USGwkqddJnHNB/5DoxohADfmwimcc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ibmine5CoYu+qwC4nsM/es1TEToU8N581offEqa03Jg=; b=T1yXoY3AnqmmnNDpIdGJ2iYgKPHJXPANGjQBPPCf4GBqPb2hJHRXhYHt0Pqv/jhSSp O1e5ZZYY5cvfKMsExKK2b51KMn/ivWYpLW+/IfvvjXiCRmjkxzRvlPO02GCFhhOmZRcz CnBres29zuDRGZdVTcB9YTeYdRAgIuv9xkCDIya8ZU4dZza0TRi78jOgt6KUIPdeNaDU j96KLcR8K62xD5thVcR+0OVWYYWxTdhVXWi1X8C12OK2Rf1zsgQUWuwgutnTveHAzi2K 4Iaw/eLLIWJI/p9c1eJAOIPFV8iC9LOENc+5LSKoKs/+HxdmRJnGEeBsGg1dZE7OGPO4 OzjQ== X-Gm-Message-State: APjAAAUHO1IAprCGa58wj16anZWru9B449Lr+mpF0dTyZVNfhy0vMiQ+ t0vy5KyH7Co0cJsicXfwELdZv967D10= X-Received: by 2002:a2e:6e14:: with SMTP id j20mr3474867ljc.172.1553538639026; Mon, 25 Mar 2019 11:30:39 -0700 (PDT) Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com. [209.85.167.44]) by smtp.gmail.com with ESMTPSA id w22sm1633353ljd.42.2019.03.25.11.30.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Mar 2019 11:30:36 -0700 (PDT) Received: by mail-lf1-f44.google.com with SMTP id u68so6750815lff.7 for ; Mon, 25 Mar 2019 11:30:35 -0700 (PDT) X-Received: by 2002:a19:9794:: with SMTP id z142mr13924225lfd.46.1553538635692; Mon, 25 Mar 2019 11:30:35 -0700 (PDT) MIME-Version: 1.0 References: <20190325125704.6585-1-hotwater438@tutanota.com> In-Reply-To: From: Dmitry Torokhov Date: Mon, 25 Mar 2019 11:30:24 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ELAN touchpad i2c_hid bugs fix To: hotwater438@tutanota.com Cc: Hans de Goede , Vladislav Dalechyn , Benjamin Tissoires , Jiri Kosina , Kai Heng Feng , Swboyd , Bigeasy , "open list:HID CORE LAYER" , lkml Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 25, 2019 at 11:23 AM wrote: > > Hi. > > Mar 25, 2019, 6:56 PM by dtor@chromium.org: > > If you want to keep on using edge you need to make sure that i2c-hid > never loses edge, as replaying of previously disabled interrupts in > not at all reliable. So you need to "kick" the device after > enable_irq() by initiating read from it and be ready to not get any > data or get valid data and process accordingly. > > I'm sorry, but how edge can be loosed? There is device ID and quirk's which are associated with that ID, and quirk will always trigger edge irq. If edge arrives while interrupt is disabled and replay of the interrupt does not work when it is reenabled (and I do not think it ever works for GPIO, you can hunt for Thomas Gleixner emails to that effect on LKML), then ISR in the driver will never be called, so driver will never read from the device to reset the interrupt condition and interrupt will never be reasserted again -> edge lost. Thanks. -- Dmitry