Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp748287pxb; Fri, 22 Apr 2022 10:18:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweAu71XthDHyNHum7BnNQI93VfLfQX+1MRcQ9pEzzF/SU0j2N/f5kqZYZrZ41La35X4fTY X-Received: by 2002:a65:4541:0:b0:382:a08a:bf37 with SMTP id x1-20020a654541000000b00382a08abf37mr4813757pgr.392.1650647919131; Fri, 22 Apr 2022 10:18:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650647919; cv=none; d=google.com; s=arc-20160816; b=UsmaCBwYQacqg8tG+LafcmT329/zqH3Tu7wokcFAJLSrnoE10khqikTfoZqoS4JXn+ Ldz7T1vsjHvXPJpNYjYJGzG0Y+qNX0Bj1FOHBOgvC+/uscOyuDyVJTFO+mYy1d3VsiJc G3nqnlc0YIait1aHuiXOu32BKNcvhq4eNmAWHr6U8BA8PKcSSxIgB6TaWjf/+bEyBpeu PPLraL6A733T83gmKKxWabvrI4h9pX0M+lrFq5JYkLSjgrucSq+r4Se3wRA1H8f7qk2s rq53FvtgXldVYjcCBPmib+tIcr/LbZCFiNCZ0tMqD/FfB2GEWs4FzaSOuV5rWTWgOz+D kTbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=zUhdLmoSrxomly6n+bm6O7T6WtKJcflbIdxv+ofyBUc=; b=zQ4aSGcjoFbILGej7L3oSpr6oYrpdFHp3r322xokZjqzOdgK1R/sMFe2MYp5lr7sdx 4NEX6xVzHWxA+bTJclqsTUjhq/QCvr+DrfWhtz5e+TUbfi8OkpbborOiZ6tO7rpXOmaN mqaZ8B7T8+JorhQWWszNndF9++tQH5xqCrCwGX7iCKMYzG05JjVLNcP6f20Yy7V/tGyR vNxUZwxaJWNAJJEcGw5jECEZsUGdRb/MtyxRFtHtGSkZJuJ3H08MHMpDDD+YVW0srmz/ 1YMsowJ6sA4ycuNcsRlAvjV7njRwg3RwPFOCtRWDwhmmKebSV+WrtV9wKyMYNvrIsEqb lXiQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n20-20020a63f814000000b003aa96397f63si5191895pgh.313.2022.04.22.10.18.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 10:18:39 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5BF8CDAD; Fri, 22 Apr 2022 10:14:54 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379423AbiDTOQS (ORCPT + 99 others); Wed, 20 Apr 2022 10:16:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359299AbiDTOP7 (ORCPT ); Wed, 20 Apr 2022 10:15:59 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 5833A46B0F for ; Wed, 20 Apr 2022 07:09:06 -0700 (PDT) Received: (qmail 631132 invoked by uid 1000); 20 Apr 2022 10:09:05 -0400 Date: Wed, 20 Apr 2022 10:09:05 -0400 From: Alan Stern To: Oliver Neukum Cc: Evan Green , Greg Kroah-Hartman , Thomas Gleixner , Mathias Nyman , Rajat Jain , Bjorn Helgaas , "Rafael J. Wysocki" , Razvan Heghedus , Wei Ming Chen , Youngjin Jang , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH v2 0/2] USB: Quiesce interrupts across pm freeze Message-ID: References: <20220418210046.2060937-1-evgreen@chromium.org> <9f2752b5-8717-8ea3-1462-69bcfe42bb0e@suse.com> <8321b2c6-5bdb-2853-6812-50cd4e4d1bc7@suse.com> <95e1bd39-b159-f7a1-f51e-115dd0e60500@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <95e1bd39-b159-f7a1-f51e-115dd0e60500@suse.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 Wed, Apr 20, 2022 at 10:47:27AM +0200, Oliver Neukum wrote: > > > On 19.04.22 19:49, Alan Stern wrote: > > On Tue, Apr 19, 2022 at 05:51:38PM +0200, Oliver Neukum wrote: > >> > >> On 19.04.22 16:35, Alan Stern wrote: > >>> On Tue, Apr 19, 2022 at 09:05:53AM +0200, Oliver Neukum wrote: > >>> > >>> > >>> The THAW part of suspend-to-hibernation is used only for writing the > >>> memory image to permanent storage. I doubt that a malfunctioning HID > >>> device would interfere with this process. > >>> > >> True, if and only if all goes well. At the time thaw() has run writing > >> the image to disk can still fail. In that case the devices will still > >> be needed. > > Consider adding a mechanism to usbcore which would allow an interface > > driver to request that the next time its device is resumed, the core > > should perform a reset-resume. Would that help? > > > > > > Strictly speaking no. We already have that in form of the RESET_RESUME > quirk. The broken devices we are talking about here can do runtime PM > perfectly fine, if and only if remote wakeup is requested. > So we need that flag to translate only in freeze()/thaw() resulting in that > behavior, as opposed to every pair of suspend()/resume() That was my point. The HID driver can check at suspend time whether or not remote wakeup will be enabled. If yes, well and good, no changes are needed. If not, the driver can then request that the following resume be a runtime-resume. Another possibility is, as you mentioned before, adding a USB quirk for devices which require reset-resume whenever they are resumed with wakeup disabled. Alan Stern