Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D705C433EF for ; Fri, 3 Dec 2021 08:45:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379318AbhLCItT (ORCPT ); Fri, 3 Dec 2021 03:49:19 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:27469 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351242AbhLCItS (ORCPT ); Fri, 3 Dec 2021 03:49:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638521154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wr5FuvjVcX7SC5c2qwRq/4np3gbYK+aB0OUFPg2us1g=; b=eTVkikQeA1ui8qJOeFggtyMRsGhyuO+88aCi7kq1js52GJkRXV0S5LwkpV/Z+oXfjYi6mF LE4N+OGlEN4z1Vt7JZ8RHVdUL091so5syN4Btxx/X7/O2EysEjh27tNxaOUdDpWSAnUfcf eNAjdLwkLL/enrnmjDxItmTgMUZ+H2A= Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-476-S1B6L-tQNVi46-l_SoNbzg-1; Fri, 03 Dec 2021 03:45:53 -0500 X-MC-Unique: S1B6L-tQNVi46-l_SoNbzg-1 Received: by mail-pg1-f197.google.com with SMTP id r15-20020a63ec4f000000b002e582189837so1483829pgj.20 for ; Fri, 03 Dec 2021 00:45:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=wr5FuvjVcX7SC5c2qwRq/4np3gbYK+aB0OUFPg2us1g=; b=FxkUGIAMBsErXundLAMwv5JzbMVjblfu0hvwThNYRFX7MCACcZ47Y++Wbpv6C/+Awv zaOqvU0YhvjTzXcBNyQuzYP0MWeuqqH07FSYhWZFD5Xc1BBlptu9cKWSUsTzgVe7Rp4d y0KcTdGHu5Wg/AqiQQ1OHSpLg7Yyps4ZXdAx14LTly8h7Lc+g4HEoRwv3qzmH+UsAum6 tGOFvx3yMv3hlnk6yRBkDTmi0QvBzkBcCGZub64tzXnOy1fqE/M8alJPNEFN5NEQ3h8W XdBNaZG5H/4uUi74aDtUW0yU4hs6P7MV/bVFqYKvid/GuHKToxy1craT3VfPTZiuUOcp 60nw== X-Gm-Message-State: AOAM530tiobHNE9A6k6yM+dJRjMgQ63SYowvhM38GyQ2sSxOrlPL4qO/ 8e2xN/jhZHjVfajiwIR1DIrEnBYAqGQZyz8dRfR8xU0wtwj2CwtjfYwhKUqCVdKd9WY7C18LNOn hz+o/thKEucsvuhivcZxNmgSrYxSRx0L/aFxqNPBd X-Received: by 2002:a17:903:1c7:b0:141:e630:130c with SMTP id e7-20020a17090301c700b00141e630130cmr21352724plh.80.1638521152214; Fri, 03 Dec 2021 00:45:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvs+4WyxBsI0PowrRG0Yz/rESddXVKNX1pGr8vIxAXqTpV2FXSAFuNa5ZcbscddqQPJag+OktCbi1zZBRw0CI= X-Received: by 2002:a17:903:1c7:b0:141:e630:130c with SMTP id e7-20020a17090301c700b00141e630130cmr21352701plh.80.1638521151949; Fri, 03 Dec 2021 00:45:51 -0800 (PST) MIME-Version: 1.0 References: <20211130060117.3026-1-linux@weissschuh.net> <2a336482fb73d8093ed284942c6b63c53b9a8727.camel@linux.intel.com> In-Reply-To: <2a336482fb73d8093ed284942c6b63c53b9a8727.camel@linux.intel.com> From: Benjamin Tissoires Date: Fri, 3 Dec 2021 09:45:41 +0100 Message-ID: Subject: Re: [PATCH] HID: intel-ish-hid: ipc: only enable IRQ wakeup when requested To: Srinivas Pandruvada Cc: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , Jiri Kosina , "open list:HID CORE LAYER" , lkml , Mark Pearson , Daniel Drubin Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 1, 2021 at 2:35 PM Srinivas Pandruvada wrote: > > On Tue, 2021-11-30 at 07:01 +0100, Thomas Wei=C3=9Fschuh wrote: > > Fixes spurious wakeups from s0ix on Lenovo ThinkPad X1 Cargon Gen 9 > > on > > lid close. > > > > These wakeups are generated by interrupts from the ISH on changes to > > the > > lid status. > > > > By disabling the wake IRQ from the ISH we inhibit these spurious > > wakeups while keeping the resume from LID open through the ACPI > > interrupt. > > > > Reports on the Lenovo forums indicate that Lenovo ThinkPad X1 Yoga > > Gen6 > > is also affected. > > > > Fixes: ae02e5d40d5f ("HID: intel-ish-hid: ipc layer") > > BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=3D214855 > > Signed-off-by: Thomas Wei=C3=9Fschuh > Acked-by: Srinivas Pandruvada Applied to for-5.16/upstream-fixes in hid.git thanks Cheers, Benjamin > > > --- > > drivers/hid/intel-ish-hid/ipc/pci-ish.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/hid/intel-ish-hid/ipc/pci-ish.c > > b/drivers/hid/intel-ish-hid/ipc/pci-ish.c > > index 1c5039081db2..8e9d9450cb83 100644 > > --- a/drivers/hid/intel-ish-hid/ipc/pci-ish.c > > +++ b/drivers/hid/intel-ish-hid/ipc/pci-ish.c > > @@ -266,7 +266,8 @@ static void __maybe_unused > > ish_resume_handler(struct work_struct *work) > > > > if (ish_should_leave_d0i3(pdev) && !dev->suspend_flag > > && IPC_IS_ISH_ILUP(fwsts)) { > > - disable_irq_wake(pdev->irq); > > + if (device_may_wakeup(&pdev->dev)) > > + disable_irq_wake(pdev->irq); > > > > ish_set_host_ready(dev); > > > > @@ -337,7 +338,8 @@ static int __maybe_unused ish_suspend(struct device > > *device) > > */ > > pci_save_state(pdev); > > > > - enable_irq_wake(pdev->irq); > > + if (device_may_wakeup(&pdev->dev)) > > + enable_irq_wake(pdev->irq); > > } > > } else { > > /* > > > > base-commit: d58071a8a76d779eedab38033ae4c821c30295a5 > >