Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3446387pxb; Tue, 20 Apr 2021 08:30:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybiSZnHGLORA0SPdFqMY5nz4VvrmYiGfbx6QV3J163vMc2aGGow5+twyJRIE4Qlps9K0C2 X-Received: by 2002:aa7:824e:0:b029:20a:3a1:eeda with SMTP id e14-20020aa7824e0000b029020a03a1eedamr24971322pfn.71.1618932621300; Tue, 20 Apr 2021 08:30:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618932621; cv=none; d=google.com; s=arc-20160816; b=HYTOawsLH3Ov/HstyrBi8xh0p8X3fkys/dSFOan4tUxY22qkGgv7fUynFqw1sUgs+G z+R9KDj2ffs/om/6HWOMeeITHzmx2i84A0hCb9HBDwqGmOfrpDc+IRqAIBjkQSXMQ44k R+tW/P07nFUdyz7Lr7ZxQpYc+9GTTGadDxbxqI2UVKErJ/QEBeMSDhjVxLDcj5/E6WBD MXIbNx74h/7t0Vb2yoZBZrI/7LyYROtGb64rY5Er4DbbgWUk70Uq0kOU3hyIV95PA5RG I1lGGh869l66VAENZbmQDg0B8Y4S+iRKGSQVTLHDKNphbBF6FD/8nbdNG52ZXKerZ9yk wOZg== 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=Sy/mbhNEKXO32ZLLOMYTz5t8ydjxdi4aliI+3W8Nzw0=; b=bVAere8yi8Zqlx/UdAWreRa/8gAZyb+2odFOW7IICVxbvc1xnkKWShC3neYbNcb3LR 3ZoIkRG+8Kfrfo0tc/FVWr1I9Tgkb0BQ+EViZx+QziLYStZgeZE7E/4S17BSMk7vObm4 02O61gTI6NNNCdxuxrlPbrE7EABuWCD1n2FMiURopJqFfMiqqq/ssXUa1sm8z/KJHijR BWC5zSiTuWPy4C4EBNwaAz4GLaJJaZmA44SWGZAQcYDEwc8RccvzSNMoLjbATEcjUYr3 uluXsFGmVvl3KN/HiVFn0fOfCPM3FElffQZUSFO5ZVQjumaSI13tk5Fmi1iv/qYAfmUP Wtyw== 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 e3si19898494pgd.419.2021.04.20.08.30.08; Tue, 20 Apr 2021 08:30:21 -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 S232835AbhDTP3Y (ORCPT + 99 others); Tue, 20 Apr 2021 11:29:24 -0400 Received: from netrider.rowland.org ([192.131.102.5]:57767 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S233033AbhDTP3U (ORCPT ); Tue, 20 Apr 2021 11:29:20 -0400 Received: (qmail 174910 invoked by uid 1000); 20 Apr 2021 11:28:48 -0400 Date: Tue, 20 Apr 2021 11:28:48 -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 v3] USB: Don't set USB_PORT_FEAT_SUSPEND on WD19's Realtek Hub Message-ID: <20210420152848.GC170810@rowland.harvard.edu> References: <20210415114856.4555-1-chris.chiu@canonical.com> <20210415184637.GA15445@rowland.harvard.edu> <20210416153932.GD42403@rowland.harvard.edu> <20210419141921.GA133494@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 Tue, Apr 20, 2021 at 03:14:56PM +0800, Chris Chiu wrote: > On Mon, Apr 19, 2021 at 10:19 PM Alan Stern wrote: > > > > On Mon, Apr 19, 2021 at 01:11:38AM -0400, Chris Chiu wrote: > > > Sorry that I didn't make myself clear. I found that if I applied RESET_RESUME > > > quirk on the problematic hub, the Set-Port-Feature(suspend) timeout error > > > disappeared. SInce the timeout is not happening for each suspend by default, > > > I suspect maybe reset-resume take everything back to clean state for the hub > > > and the Set-Port-Feature(suspend) can be taken care of w/o problems. > > > > Okay, that's a good solution for system suspend. > > > > > I didn't like RESET_RESUME because runtime PM would not work on the quirked > > > device. > > > > A more interesting question is whether it will work for devices plugged > > into the hub. Even though the hub won't be runtime suspended, the > > things attached to it might be. > > > > > But if the Set-Port-Feature(suspend) can't be handled and > > > skipped, I can't > > > expect the runtime PM to work for all devices connected to the hub either. > > > Is that right? If what I proposed in the patch can not get better > > > result than existing > > > quirk, I think using the RESET_RESUME would be a better option. Any suggestions? > > > > Try the RESET_RESUME quirk and see how well it works with runtime > > suspend. > > > > Alan Stern > > [ 453.064346] usb 3-4: finish reset-resume > [ 453.192387] usb 3-4: reset high-speed USB device number 2 using xhci_hcd > [ 453.339916] usb 3-4: USB quirks for this device: 2 Here 3-4 is problematic RealTek hub, right? > Seems that even w/ the RESET_RESUME enabled, the connected device still > can runtime suspend/resume. That's acceptable to me. I'll send the patch > with the reset-resume quirk later. > > [ 626.081068] usb 3-4.3.1: usb auto-suspend, wakeup 0 > [ 632.552071] usb 3-4.3.1: usb auto-resume > [ 632.617467] usb 3-4.3.1: Waited 0ms for CONNECT > [ 632.617471] usb 3-4.3.1: finish resume Then 3-4.3 is another hub plugged into the Realtek hub, and 3-4.3.1 (the device being suspended and resumed) is plugged into that other hub. I'm concerned about devices that are plugged directly into the Realtek hub. For example, did you try allowing the 3-4.3 hub in the experiment above to suspend and resume? Alan Stern