Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3591743ybc; Thu, 14 Nov 2019 11:27:41 -0800 (PST) X-Google-Smtp-Source: APXvYqx2XOLZI+7G+xgCQM2jctFuxBPdkZzmqJbbOLCiiq3GcpHgAl0SA6gKimeYN/u/yh/rkYGj X-Received: by 2002:a1c:7f94:: with SMTP id a142mr9284950wmd.33.1573759660906; Thu, 14 Nov 2019 11:27:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573759660; cv=none; d=google.com; s=arc-20160816; b=JqKBukg18V8/2YPT0N6XVeCKSqNrl6tuW8NHXzPvnLH83rV+Z4Rfu4spxoo+hueVZI pZ4xXFIrh9UCKfkJRJI9cD48UOQTDE+V5PS5487uN99zSJ8bukUkaLfeF0JrrejvQctO w9RLT5OJWDU0GUBY39vq8rJwqZk1FmuY93AyHRX8r5tCBsNbAuIHRfMPs88Zcn3hNxqP cYkaAqbLr9ZC/4nNu7g8hn+fqIxRgRvvsa+qkU3ibk8PE8mBx+rWzf3FYq8HSMcqNo2J Q30DXM4iE92DRTiS5950lrDZY+OIiTCQt75QdtbQg8rgAwyCy8oUeUd4Jcht5nZdAZyU N2xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :date:subject:cc:to:from:message-id:dkim-signature; bh=wzCOnp2g5c74yPWIyp7wZK4sxxMOjO7vz0Rib0NxX9M=; b=W/2kWxl1RErS8j/euht3C+5bNCVOeF/uDjY1mSlVEN3/0NCBVX5mgRmvK4IgRXTI3c OFXlwoeKhlKsLiUMfngzhg2vuHEn9QagppiupMcnelfrBqVkzmcqodeqDNnJEXlMkVbr 5BcO1qpwmJ5eOqZqfOOM4aI3jH1EEuehVCcYJ8Ki9KhBO1ebTSqE7M1atZhOzboEYrGu wp3dF4WUbb/LEnM/rrjpjey32vEjnFJOuGo8z7C4KaMV9nplX1f2KpD36PDw7uG9FusG cQ/JX+0ciS4Sdk0d+oo0SBGl828PHITU3s7DWfdEwBWHYx1nGtUWF9OAK6d5YJaKhDEz p/Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="i06/EpMQ"; 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 x17si4239141edq.340.2019.11.14.11.27.16; Thu, 14 Nov 2019 11:27:40 -0800 (PST) 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="i06/EpMQ"; 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 S1726717AbfKNTXh (ORCPT + 99 others); Thu, 14 Nov 2019 14:23:37 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:35192 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726098AbfKNTXh (ORCPT ); Thu, 14 Nov 2019 14:23:37 -0500 Received: by mail-pf1-f193.google.com with SMTP id q13so4959379pff.2 for ; Thu, 14 Nov 2019 11:23:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=message-id:from:to:cc:subject:date:mime-version :content-transfer-encoding; bh=wzCOnp2g5c74yPWIyp7wZK4sxxMOjO7vz0Rib0NxX9M=; b=i06/EpMQzrDQkqBXZ46Y8NHt7bKhuduDvVXqDhVm3qe16yR54Bu0p2gw+kD7PkjZhv 1zxfHNP+6Jshhd2y50gYo6CVJsSbKrSW6nvV++h0ws+ynxg/ClYFlnNYHtsdbvp9/+Dg mRtWLqRBLHcOKDWACPkEa2XvriQkNROGlk1ZY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:from:to:cc:subject:date:mime-version :content-transfer-encoding; bh=wzCOnp2g5c74yPWIyp7wZK4sxxMOjO7vz0Rib0NxX9M=; b=HDwrMZOb7wWpyUH4fQtGPkHQz8A7mmUeH2t6i28+8Cbg2J0v1rHSB8LvTmTuULngbw Ygda6DNbdHFmatjLbznLJtWwfKLx8XkZ+Wfw0IStVYhSCFndgxnOKZePNTb3302lcwpA gkCynxD61fSgOrM6h8Fkap8ZO+1Rpm6TZ9QuKuAEyay3MjJJklcKwfqmz/m7tviS2BFy K9lW21X3BtN6qd1anJNXbV7cRXSd+JlBSZpmT24CinjakQ0J0MJGWwx5561QV2Ah5dre GEwI7EK1Z3nUzrPSZ9lxCOjEBcinnVKdnd5eW5pPQ3W7AOyAMzHBRQKiUT4qVTtD6t5/ 1ymQ== X-Gm-Message-State: APjAAAWl/hYs9G61qHt9NjwugTp8saH/Go0J6xmNGA/Z0U2EYNL8tZNA SpBbG7BrXD8kTTyt6K2mBuAxFw== X-Received: by 2002:a62:2cd7:: with SMTP id s206mr12742593pfs.106.1573759416886; Thu, 14 Nov 2019 11:23:36 -0800 (PST) Received: from evgreen2.mtv.corp.google.com ([2620:15c:202:201:ffda:7716:9afc:1301]) by smtp.gmail.com with ESMTPSA id z16sm7463478pge.55.2019.11.14.11.23.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 14 Nov 2019 11:23:36 -0800 (PST) Message-ID: <5dcda9b8.1c69fb81.74ed1.4e10@mx.google.com> X-Google-Original-Message-ID: <20191114112213.STABLE 4.14.1.I595ffb495f7a7c9217814c117ce671db8c73ab39@changeid> From: Evan Green To: Greg Kroah-Hartman Cc: Andrew Duggan , Dmitry Torokhov , stable@vger.kernel.org, Evan Green , Pan Bian , Sasha Levin , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Subject: [PATCH STABLE 4.14] Revert "Input: synaptics-rmi4 - avoid processing unknown IRQs" Date: Thu, 14 Nov 2019 11:22:59 -0800 X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 7b9f7a928255a232012be55cb95db30e963b83a7. That change should have had a fixes tag for commit 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to irq_domain"). The conversion to irq_domain introduced the issue being fixed by this commit. In older kernels the bitmap IRQ accounting is done differently, and it doesn't suffer from the same issue of calling handle_nested_irq(0). Keeping this commit on kernels 4.14 and older causes problems with touchpads due to the different semantics of the IRQ bitmasks. Signed-off-by: Evan Green --- This revert is only needed on 4.14 where the driver is not yet converted to irq_domain and the existing bitmasks work fine. Upstream, the patch works fine and should not be reverted. --- drivers/input/rmi4/rmi_driver.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c index bae46816a3b3..997ccae7ee05 100644 --- a/drivers/input/rmi4/rmi_driver.c +++ b/drivers/input/rmi4/rmi_driver.c @@ -165,7 +165,7 @@ static int rmi_process_interrupt_requests(struct rmi_device *rmi_dev) } mutex_lock(&data->irq_mutex); - bitmap_and(data->irq_status, data->irq_status, data->fn_irq_bits, + bitmap_and(data->irq_status, data->irq_status, data->current_irq_mask, data->irq_count); /* * At this point, irq_status has all bits that are set in the @@ -412,8 +412,6 @@ static int rmi_driver_set_irq_bits(struct rmi_device *rmi_dev, bitmap_copy(data->current_irq_mask, data->new_irq_mask, data->num_of_irq_regs); - bitmap_or(data->fn_irq_bits, data->fn_irq_bits, mask, data->irq_count); - error_unlock: mutex_unlock(&data->irq_mutex); return error; @@ -427,8 +425,6 @@ static int rmi_driver_clear_irq_bits(struct rmi_device *rmi_dev, struct device *dev = &rmi_dev->dev; mutex_lock(&data->irq_mutex); - bitmap_andnot(data->fn_irq_bits, - data->fn_irq_bits, mask, data->irq_count); bitmap_andnot(data->new_irq_mask, data->current_irq_mask, mask, data->irq_count); -- 2.21.0