Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp737096rdg; Thu, 10 Aug 2023 19:23:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG5TIVVDokm79RDPIfecFb85AuRQuNLCwEVskFXopKEfwXPBriNjPfyWObKcXjg2qBW2xJ7 X-Received: by 2002:a17:906:104e:b0:99c:ae06:918f with SMTP id j14-20020a170906104e00b0099cae06918fmr592942ejj.38.1691720627482; Thu, 10 Aug 2023 19:23:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691720627; cv=none; d=google.com; s=arc-20160816; b=MuZSOaUNQOU2p/XtEeeKKOoh1WknpiMAQ3VFLDBd/SionVpj21ZkMaKa9nluIPd0NX nqlZYlbmphNMgHGNGdT9jECWHV4JF+55X4jecwCtsz7TGsTAtC0Ye8Pc2zbqWsgfHpmF 5cmSk/CJP58CRg8/+YTZf6PtsLbyuZg+S2NGhr+8B/Q9pE4oHm6woci7zqA0nPvqwXW3 l29INUTbgeFnfZyJu0v8PawO40vMRJRAxdsvQ9rT/LCw5QShWRSc2446vQwFIdDssvG+ Ttdq0qY0S3jzKNjXixBFymU7ubuAsm9b3O7OcaxtwOTRLrtLBI54PANbHP1f7F3mRLta cnMQ== 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=T53Xe5/2V0ovT9yH4tQZaSLuhM6h4LFtWosMA/xFnQI=; fh=9m7F7se6hukHFlDqyXeY2JlSihuL7CY/s8SsN8gNIQg=; b=0qoGzXmdHeunAl9oMpHahCMR87Md5ksTAy1lG2ikYK1DntQpGFoswyPgeuZ5lAfCsf fRVsYjUn5hdXbE7qKR/S/j4UM9X3k8Kp4yRaOurIasBa3pj8ckuPSbt+ESCKR2MZpiax ArsXWjC5MuHWVpMaGq9gi9TpbJFhTWG6SdJGgC+UrwSeUNj2bIkwdEsGLvYowzhx5iWA +DklDR3SSb6aX0XCByLyHBL9E78f0nwsh3iB4aHgTbwzy0b62ZAnz5QT7hINzyj2Qsyf Df5Qpz3N90T1zoAkcLl5042IWtflislGpImbqBdR9uMq7Sr59w2xuyZAZQf+x8RspKJ6 6nwg== ARC-Authentication-Results: i=1; mx.google.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=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a15-20020a1709062b0f00b009888aa1da13si2417864ejg.752.2023.08.10.19.23.23; Thu, 10 Aug 2023 19:23:47 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232496AbjHKBvR (ORCPT + 99 others); Thu, 10 Aug 2023 21:51:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231256AbjHKBvO (ORCPT ); Thu, 10 Aug 2023 21:51:14 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id E865226B2 for ; Thu, 10 Aug 2023 18:51:12 -0700 (PDT) Received: (qmail 263409 invoked by uid 1000); 10 Aug 2023 21:51:11 -0400 Date: Thu, 10 Aug 2023 21:51:11 -0400 From: Alan Stern To: Alexandru Gagniuc Cc: bjorn@mork.no, davem@davemloft.net, edumazet@google.com, eniac-xw.zhang@hp.com, hayeswang@realtek.com, jflf_kernel@gmx.com, kuba@kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, stable@vger.kernel.org, svenva@chromium.org Subject: Re: [PATCH v2] r8152: Suspend USB device before shutdown when WoL is enabled Message-ID: References: <78e3aade-2a88-42f4-9991-8e245f3eb9b9@rowland.harvard.edu> <20230810225109.13973-1-alexandru.gagniuc@hp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230810225109.13973-1-alexandru.gagniuc@hp.com> X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SORTED_RECIPS,SPF_HELO_PASS,SPF_PASS 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 Thu, Aug 10, 2023 at 10:51:09PM +0000, Alexandru Gagniuc wrote: > On Thu, Aug 10, 2023 at 01:34:39PM -0400, Alan Stern wrote: > > I was thinking that the host controller driver's shutdown method might > > turn off power to all of the ports. > > > > For example, in the ehci-hcd driver, ehci_shutdown() calls > > ehci_silence_controller(), which calls ehci_turn_off_all_ports(). I > > don't know if xhci-hcd does anything similar. > > EHCI is a different beast. I don't think EHCI (USB2.0) has the U3 link state. USB-2 doesn't have link states, but it does have the notion of a downstream port being suspended, which is effectively the same as U3. > The equivalent for would be xhci_shutdown(). It makes a call to > usb_disable_xhci_ports() for XHCI_SPURIOUS_REBOOT quirk. As I have not > encountered it, I don't know how it will affect the link state of other ports. > The quirk appears to switch ports to EHCI mode, rather than turn off power. All right. The important point is that the patch works for your situation. I was just trying to find out how much thought you had given to the possibilities other people might face, if their systems aren't quite the same as yours. Alan Stern