Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp713664pxj; Thu, 13 May 2021 15:19:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0blu97wcRB5r3nffelNfJ8AT6+euH5PIGbGP+Dn9xdQs0bzzGlpYThGQRHGrtWj+0Y1Lt X-Received: by 2002:a50:fc91:: with SMTP id f17mr52489646edq.23.1620944341490; Thu, 13 May 2021 15:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620944341; cv=none; d=google.com; s=arc-20160816; b=iEHYt8PDY9T4TwiJBCRyrSGTNE01NhE7JL0PsP1se046rQGl4Pe/lo1eO+EHMBAzPV HSNiaDjcgpj4OtnEmJlitrrL0wmDpV69ozipS55P41tWo9E+NaE3LeQHxMRdktaXf7ND 37KV3kfVWTDA8h50xYK24IcDLtsZw+yCWlPhl17iBt2u3W4/oz/GDnY0M98HdiOo4157 3kcv/Ueazxq5A+KdklarydO6ClemYwOSczgCGkLIGp/qllXtZWvzR4XPptH1Ngz8A/qt SpVq8/hCCe4LiAfp1HQFHFF4JSRFOsJcS5VNXGuMFZX6xC+Ul1z0FvdzEamoJ0s+jNr9 VWuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=4YxdvPpmxA5/wTRUJUFyRM/Aumj6xCw8AaSAZbZNFrE=; b=Gn37pwwHge3h79u1vkL9rR6gGRYzRgLkMkdGylDVPIsdc7bTqg84fwU87IE45taHil 0z9hYOgkjlVrzOAuZbgFW0CfyxhviVIRnzZMoE7xGbqhXtEsOyma31V9hL3e2NSW4qrO 75GiprnmwatftPGCarno+ntZS5VAjr8UX5H73idM85hBWzmmC7/mgxl87DnfPUnSiyM2 NSZ5QdNTvJ5BxiYpqiZxQ7B/X4TWUuCAtq3EeiUNOHTkihNS95CzGThwsSZEfemwdpRy Df1qxipg0S90ke3cLfWAP+Inor+hZPQtGz7jGKO8QMz8vEB5RO/lKp95L9D1Kel070IX /2bQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs15si714543ejc.160.2021.05.13.15.18.37; Thu, 13 May 2021 15:19:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234632AbhEMOmx (ORCPT + 99 others); Thu, 13 May 2021 10:42:53 -0400 Received: from netrider.rowland.org ([192.131.102.5]:55733 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S234619AbhEMOmq (ORCPT ); Thu, 13 May 2021 10:42:46 -0400 Received: (qmail 968921 invoked by uid 1000); 13 May 2021 10:41:36 -0400 Date: Thu, 13 May 2021 10:41:36 -0400 From: Alan Stern To: Chris Chiu Cc: Greg KH , m.v.b@runbox.com, hadess@hadess.net, linux-usb@vger.kernel.org, Linux Kernel Subject: Re: [PATCH v2 1/2] USB: reset-resume the device when PORT_SUSPEND is set but timeout Message-ID: <20210513144136.GF967812@rowland.harvard.edu> References: <20210510145030.1495-1-chris.chiu@canonical.com> <20210510145030.1495-2-chris.chiu@canonical.com> <20210510150203.GD863718@rowland.harvard.edu> <20210511163026.GA901897@rowland.harvard.edu> <20210512150424.GA934575@rowland.harvard.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 13, 2021 at 12:21:52PM +0800, Chris Chiu wrote: > On Wed, May 12, 2021 at 11:04 PM Alan Stern wrote: > > > > For testing purposes, set status to 0 and jump to a new goto label in > > the "else" branch. In other words, treat it as if the suspend really > > had worked and go back to the successful pathway. Try this out and see > > if it fixes the problem. > > > > If it does then the reset-resume isn't needed. If it doesn't, post your > > patch again, and mention in the patch description that testing shows the > > reset-resume really is necessary. > > > > Alan Stern > > Thanks for the suggestion. I revised the patch to create a new goto > label in the "else" branch and clear the status to zero if the port is > really suspended. It fixed the problem in my 100 time suspend/resume > test. I will send v3 patch w/ the modification. Great! This is a much better solution. Alan Stern