Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1825425iog; Thu, 16 Jun 2022 14:54:56 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v41bUxfDAt/tCjqW/4JoPd/nw55dT6UzdLHrn6IWKx+6KyQ35nt9qQjxf2a1csENZgwwbM X-Received: by 2002:a05:6a00:17a0:b0:51b:c7a9:bf0c with SMTP id s32-20020a056a0017a000b0051bc7a9bf0cmr6609290pfg.71.1655416495962; Thu, 16 Jun 2022 14:54:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655416495; cv=pass; d=google.com; s=arc-20160816; b=EfBiqTh3L/RKYTUODbPMhKZevscmtT1t5vZnZcYPD/BwuXkoUrPh9tdOX74jw57scT dZWfY3bJil6mJJoXgHZg9Ax/3daIX6APexXOXmmPrVo82jbMWG41FP0rw8YAVWEa2p+T 2mZbT4yLM2NhWFu7MS8WA6whY1hAYbqB/W+zL9uwR/wjp/bj+Pt4RGLdAbVq3uDPrJ2m uUZKmlwGf2kaPNoN0Ir1QTrLVxL6znAmT8KAmfDBa7mN+xLtoOIiiXWMDo+XcSHIjHUL 7RTIgsN7wTvUS5NG4XIaL7XIb13zd2d3JJ8mEruxHRYKhIcEBTNdtic3N84YfSJI0Dgw f9JQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=XpZLp2E3nfEzLuT9kshTotOAZVQlsgG9AEi0i9gbGC0=; b=nEXW4c9G8/D0eYSzagbsMIAR3ajattOIdLVkiuoKs9A2oTbt4edxwk4DoXXEJdwbLX 9bNfPHujP4IhVaNbRTP4BBHHJ6Zn4YO2u+I5/i9Hx1ollSlkCMW9gC5ykMeSVSHO6Y4x nxfDFFB7oYWmR9Ei8luwy23ZG35aw54lKMK+WAkVlde62j832xO3rMrLej/Tdy82994B n5eTCIawC+po+0AWF/cwE4vssN6V3r7SMsDoq/tSb4+H2H1LGLVWboN15OCWi+hnKUDd C/Bxa1PRPxRSuA7vqLqp+fThvFHd/4LVT3XiJQ1uoxfBFfkOGcNsT3r/AD/Eb2Fz4v2Q SX0w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=V5BgjFcF; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c18-20020a170902d49200b00163c5233708si4049881plg.430.2022.06.16.14.54.43; Thu, 16 Jun 2022 14:54:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=V5BgjFcF; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233061AbiFPVrS (ORCPT + 99 others); Thu, 16 Jun 2022 17:47:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbiFPVrP (ORCPT ); Thu, 16 Jun 2022 17:47:15 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2076.outbound.protection.outlook.com [40.107.244.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9586660DA5; Thu, 16 Jun 2022 14:47:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YvA+/aLLf8aKoHeooyd0/mfx+PImsQjWPlz+O1upsH1DlR9rekHYh6g3qHsMD2Sh2XkZ+QMkISH7Y3mMYj4qfPYCS7JuXZk4ErtAGtyT5Yi/wJ8wo8dePN/OwAoONGhIyDu7s9AuWg8+YUUBgEbMOvsaGx4WZvL8UVkYNu9EbYH6KmJA62rwbsVOieiZy/DN2qyi7mvNq/G7AmmEkRisC0qLYoSfo39XAsKmnhW4duqZSxZUiMxHsyc5RvrdjiVfAgJruU17mmXaGPvrirkpXUNEQI5EpEwn5hVSpcC9rYZuKillZVbsRXjKddgCcSzOHW8YI+L5QkGs4uSyaFHCZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XpZLp2E3nfEzLuT9kshTotOAZVQlsgG9AEi0i9gbGC0=; b=eCsKx7j4glCli2qaM/XDo1iRoivo1PFMlV+AdZR0VkpmdKXmxUUhFqW47gZTudfKzKPx3Mpa2qGBRLFcAAn4C1rgGloa2HyFUJtTAwfyQtR+jGKOUofcKRCVcDr13q+KJJA5Ag6zlBqFjACcfkTlnrN6XvqyKJhEQhsPFv6idtJW5m4z56FEWwFXPTD4EOe0vEuLAloojMl6mAXK1VdknGq1sewDhmfBTvsWMrqOQG/6pisrbb8rA5M85ZImMp4+5sGTlqbIJoND43Ch2F7wWrkkrL1cOaB2Ib9t0ti2V/SQsoKfPumvHb3fRFa3IsuHAeMHz56SKkSn9RzBGIXwFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XpZLp2E3nfEzLuT9kshTotOAZVQlsgG9AEi0i9gbGC0=; b=V5BgjFcFj75xRO/Pp4kUgCPb7b6YtEZJFrG7EVuEqIcRuCxGnQF5hFdtMFQUkq0zcQlckRoLgr8H3x2xHvN2onad9gKtXtMozGZeIZFb95T3iX3fgo59nxguuf67zdt4SNYowGzlWRRU46jpUMi433Hfk716W//47NBNHXmyad0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) by BYAPR12MB2632.namprd12.prod.outlook.com (2603:10b6:a03:6c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.13; Thu, 16 Jun 2022 21:47:12 +0000 Received: from MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::3839:4183:6783:b1d1]) by MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::3839:4183:6783:b1d1%6]) with mapi id 15.20.5332.022; Thu, 16 Jun 2022 21:47:12 +0000 Message-ID: <0e700e9b-35db-f419-813a-1277e0b7476a@amd.com> Date: Thu, 16 Jun 2022 16:47:09 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v2] HID: usbhid: set mouse as a wakeup resource Content-Language: en-US To: Greg KH Cc: Jiri Kosina , Benjamin Tissoires , "open list:USB HID/HIDBP DRIVERS [USB KEYBOARDS, MICE, REM..." , "open list:HID CORE LAYER" , open list , Richard Gong References: <20220616183142.14472-1-mario.limonciello@amd.com> From: "Limonciello, Mario" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BL1PR13CA0331.namprd13.prod.outlook.com (2603:10b6:208:2c6::6) To MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4c692609-b9d4-43f9-c4d6-08da4fe1c502 X-MS-TrafficTypeDiagnostic: BYAPR12MB2632:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7ee+f04h0ht5kwdGtj35anLZsPz0pzJ0WnnsDC9dMSXir94y/IPwWnQQUr9Qzl+JS2o82jRoMMbVAHkLs4Igv6IJZ5PVZ9QQN0iNzMxdqG7BVqrM/Hs1boo9C8bpHMCvFOlSH5tK/iT7+8MU3n3ukGN+RcahVbbA1O3GrxzypDBJraJ38xRjxJvdkm/qGm3qoOzNquIBtV14M6DArNF8oov4PbXHcSVJNGBnq/5MHQdvDo9Y1Ln7mg2Zu6Ud9XM3/V6Z8RSUM6fUOzXBBDpp7yaGcXplE1nvRt3AXzxvgU/t+Z7ixTmRQ2SpaB8c8ZGCWhIFI1MrQ0Po9Jc0/zTbw+Hh8fGVOT7mfS418IW69u3u3G5LJeT3n4oG8yk17X6/kGHfRq43cOJ+xsL21UG21QInFjvWbqyigy1zmae2VibZ740hOkKBswhuIzvvsrWkYyFEwCI9bATwcd5XOAwkVJY1DTe9ZC4jPsY2M7OwmV2Xe6qT/HfbEAP2w/rUVKSN9rrS7RcId7WAonR51qUEms5T4kbaMt/nWAe2vAV9fXm3Qk1WqHvqXVVdcbuCBk41qSzXdrFcVE/z+zYu5rGuNeWC3lt5THhH5fhBZK3+swUGuqyNM93Uu4O964DUs5inmwxBTw2S1JABM8Rz2xNd9oXscJuryYCJ8kl5Mendw2Gh+zPj4fynUOkmMP0LHvGk3zAM6xUG+MxVquRSdPXlQ9tpWEUGDhq/fKiMr5xNygxNoofepqNQExfzlOa5ukLvkyZIarX0FDoe5Ug/N/+ISu5gOPjnGd31mglLEnxrV4Gl+rjgmzjiAu5QmKwi8Saw4xnDZGbnArndWiidj/R/AAtOtuHrXmkh4tfXzVp6AJg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN0PR12MB6101.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(366004)(6916009)(6486002)(2906002)(508600001)(83380400001)(966005)(186003)(54906003)(6666004)(45080400002)(8936002)(5660300002)(66946007)(4326008)(8676002)(66556008)(66476007)(86362001)(316002)(36756003)(6512007)(53546011)(31696002)(2616005)(6506007)(31686004)(26005)(38100700002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?S3FGY2RWTzB5d1dmWHF3NEtXTXpaTm9DaC9TWEV0Vm45UVE2Mk5xT1BYWVB4?= =?utf-8?B?Y25tbVQrUDlkWW16RG93TUdOZjZHcEZLang0YitaSlUxVXFSZDJvcVlIMzkw?= =?utf-8?B?VCs0T1RCUU5NOGsyZy9aNzdwalJkQVo2LzQ2eXg0ZE1QdUQ3MEpzVnRNRHlY?= =?utf-8?B?MTMzSld0ckZFcFhKSUtjd093MWFzdGI3VFBUbnFDMmkrYXpYaFhCR0NGUVhZ?= =?utf-8?B?ZjcrWGE3MjM2bzI5NmxVYktmVmtWUjB3SjkzYXhNR05RTUV0MUljNExNSlVo?= =?utf-8?B?VWRabU1kR093V2h0S0EwQ1ZGeGowUSsyT3FKVDBjV3dwakpOdFFsZmNhb2ZF?= =?utf-8?B?OTgvdHVnVk1JSEVMTGhnK25xeDlJUFhHRTk5em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OGVqY0ZW?= =?utf-8?B?d21ZcHF2UmRZd0hlZTNicVFuNVdPbEliREtaR1ZjRkRhd3RCNDVXQmxnVEI4?= =?utf-8?B?aXVZbW85MjFkajVvdGcvMEhtY1FLUmhQbERNMWRsVzVvNjJGSDBqNGtkZHov?= =?utf-8?B?d2tML1N0R1B1aVI4NkxwdFVJVU9nMmtoTU4rVk9EeVpCNi9WcU96dz09?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4c692609-b9d4-43f9-c4d6-08da4fe1c502 X-MS-Exchange-CrossTenant-AuthSource: MN0PR12MB6101.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2022 21:47:11.8812 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mTURF56o3NZN9x+tFlyUClrlpD19NmCnMWCsrTwOQ2arbUf1md065gAx/gqvUBtz4Z4wBy9Scg2P8KG0LURzDA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2632 X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/16/2022 16:28, Greg KH wrote: > On Thu, Jun 16, 2022 at 01:31:42PM -0500, Mario Limonciello wrote: >> The USB HID transport layer doesn't set mice for wakeup by default so users >> can not wake system from s2idle using wired USB mouse. However, users can >> wake the same system from Modern Standby on Windows with the same wired >> USB mouse. >> >> Microsoft documentation indicates that all USB mice and touchpads should >> be waking the system from Modern Standby. To align expectations from users >> make this behavior the same when the system is configured by the OEM and >> the user to use s2idle in Linux. >> >> Link: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-hardware%2Fdesign%2Fdevice-experiences%2Fmodern-standby-wake-sources%23input-devices-1&data=05%7C01%7Cmario.limonciello%40amd.com%7C98b9958eb5304304fcbf08da4fdf1cdf%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637910116925045711%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ZI7wX9jq38V0bNZFjca2qbVZrU4frillcrZ6WEGEn%2FQ%3D&reserved=0 >> Link: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Flinux-usb%2F20220404214557.3329796-1-richard.gong%40amd.com%2F&data=05%7C01%7Cmario.limonciello%40amd.com%7C98b9958eb5304304fcbf08da4fdf1cdf%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637910116925045711%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=tt1eHDJqtKybfNw8XDF9ZFCuAMJJEotOB2NnGuXItA8%3D&reserved=0 >> Suggested-by: Richard Gong >> Signed-off-by: Mario Limonciello >> --- >> More people keep coming to us confused that they couldn't wake a Linux system >> up from sleep using a mouse, so this patch is being revived. > > How many different devices did you test this on? I tested it on all the mice I have at my disposal and the AMD systems I have that support s2idle on top of 5.19-rc2. As the code path doesn't run without s2idle any more I didn't look at that. Mostly Logitech, a few no-name brands. Both wireless (via a proprietary dongle) and wired. Richard tested (the earlier version of it) on what he had available to him. A few other people in AMD tested a variant of it with the mice they had as well. I know you have concerns from the previous version on test coverage and I feel that if this is accepted it will get a lot more testing in the various labs from other companies as well. We can put some explicit calls to testing on this early on in in the RC cycle to try to encourage more testing. > >> >> Microsoft documentation doesn't indicate any allowlist for this behavior, and >> they actually prescribe it for all USB mice and touchpads. >> v1->v2: >> * Resubmit by Mario >> * Update commit message >> * Only activate on systems configured by user and OEM for using s2idle >> >> drivers/hid/usbhid/hid-core.c | 36 ++++++++++++++++++++++++----------- >> 1 file changed, 25 insertions(+), 11 deletions(-) >> >> diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c >> index 4490e2f7252a..3a1214ecec49 100644 >> --- a/drivers/hid/usbhid/hid-core.c >> +++ b/drivers/hid/usbhid/hid-core.c >> @@ -12,6 +12,7 @@ >> /* >> */ >> >> +#include >> #include >> #include >> #include >> @@ -26,6 +27,7 @@ >> #include >> #include >> #include >> +#include >> >> #include >> >> @@ -1176,17 +1178,29 @@ static int usbhid_start(struct hid_device *hid) >> usb_autopm_put_interface(usbhid->intf); >> } >> >> - /* Some keyboards don't work until their LEDs have been set. >> - * Since BIOSes do set the LEDs, it must be safe for any device >> - * that supports the keyboard boot protocol. >> - * In addition, enable remote wakeup by default for all keyboard >> - * devices supporting the boot protocol. >> - */ >> - if (interface->desc.bInterfaceSubClass == USB_INTERFACE_SUBCLASS_BOOT && >> - interface->desc.bInterfaceProtocol == >> - USB_INTERFACE_PROTOCOL_KEYBOARD) { >> - usbhid_set_leds(hid); >> - device_set_wakeup_enable(&dev->dev, 1); >> + if (interface->desc.bInterfaceSubClass == USB_INTERFACE_SUBCLASS_BOOT) { >> + switch (interface->desc.bInterfaceProtocol) { >> + /* Some keyboards don't work until their LEDs have been set. >> + * Since BIOSes do set the LEDs, it must be safe for any device >> + * that supports the keyboard boot protocol. >> + * In addition, enable remote wakeup by default for all keyboard >> + * devices supporting the boot protocol. >> + */ >> + case USB_INTERFACE_PROTOCOL_KEYBOARD: >> + usbhid_set_leds(hid); >> + device_set_wakeup_enable(&dev->dev, 1); >> + break; >> +#ifdef CONFIG_ACPI > > Why a #ifdef? AFAICT acpi_gbl_FADT is only available when CONFIG_ACPI is defined. I didn't think it was reasonable to make usbhid depend on ACPI. > >> + /* Setup remote wakeup by default for mice supporting boot >> + * protocol if the system supports s2idle >> + */ >> + case USB_INTERFACE_PROTOCOL_MOUSE: >> + if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0 && > > That seems odd, there's no acpi/pm call for this instead? No, there's not. You'll find checking of this bit in about 8 other places too. I probably should explain the difference from this and pm_suspend_default_s2idle: acpi_gbl_FADT-> There is a bit in here indicating that the system supports low power idle. This bit is set by the OEM and is used to indicate that the system should use the special ACPI LPS0 device and should prefer s2idle over s3 if both are present. pm_suspend_default_s2idle-> This means that the system has been configured to s2idle after processing the kernel command line. If the system offers both S3 and S2idle, users can override what's in the FADT to set the default as they desire. This is also how i8042 decides to set keyboard wakeups only in s2idle mode. > >> + pm_suspend_default_s2idle()) >> + device_set_wakeup_enable(&dev->dev, 1); >> + break; >> +#endif > > thanks, > > greg k-h