Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp30369pxk; Tue, 15 Sep 2020 19:17:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHfWmum40KA/A5q61zo0btUL9RSTNR/xOeJv+8I0VX79lvFj8oO6hkiu3AKHft//6Y3iIF X-Received: by 2002:a17:906:4154:: with SMTP id l20mr24651358ejk.68.1600222667920; Tue, 15 Sep 2020 19:17:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600222667; cv=none; d=google.com; s=arc-20160816; b=woqHA86jzMlUVtS3sqnC6HBvmIPfhBm8AETgM01HQX9ftMGLiYURYLamUkY5u7r+SH fXZ1ZPEMqABzyFXrMlFP7rSNqGxbuoI1WSvTzGschoU/a7Tu+h55GP7m+vD3Y+xlgze/ aUOx/8NXjZ7SXupmFi7R4fvfIRW/34dMpwAy9TK14xHdbKgOGWDV2qkcIcDlyz3QFdII 7f7wxeecahrGQ+G7QmlIpv2tELRByn3XxApcCjk+tpOT4gGpR1bCHFehytS4vi8MWbCZ W6NbO0MUwawHNqfhoeG98furZQ+RebGYlmzAh22tkJsLGtdN1b1vBFyPXUpALe7rEgpa +Uaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=HUk2/j2PbU7oCdT0iCz0ptOSHh46KnJCzfQYSnKNe2A=; b=e8B12/1gY0q3Y+mBXqEP6H2/+igA4pYY6F/IdNkU1Jn+spsIxb5tpLeHrLrVOoDPrF NPk8Rol05vihq4Ycjx8K2L7tXGTg79keO+UJzVkm9/75JBZ1xzR52pleFhKMRBvFXw6+ A8mkMtOWB6gHJ8+Zqftdw12MSNlZ4HcuYls/hbtiWru82T4EnjFh+le8Gm1CBhWVAYb6 q0OdWKgliFZV8onr0S2QfI0bqkkDHfBRQ0zeMe4/k22pxO5+mXZlWZuPKCJnilSVm/12 pYnf2TYtlAuZvfFPtvtnyVAIJKSMnJJBT76tI+B8wK8sTGmuS14pHh4qCsD9Wnv+4/su svcA== 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 y22si10747334edo.147.2020.09.15.19.17.25; Tue, 15 Sep 2020 19:17:47 -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 S1726321AbgIPCOY (ORCPT + 99 others); Tue, 15 Sep 2020 22:14:24 -0400 Received: from netrider.rowland.org ([192.131.102.5]:39801 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726298AbgIPCOX (ORCPT ); Tue, 15 Sep 2020 22:14:23 -0400 Received: (qmail 1024888 invoked by uid 1000); 15 Sep 2020 22:14:21 -0400 Date: Tue, 15 Sep 2020 22:14:21 -0400 From: Alan Stern To: Matthias Kaehlcke Cc: Peter Chen , Greg Kroah-Hartman , Rob Herring , Frank Rowand , Krzysztof Kozlowski , Bastien Nocera , Ravi Chandra Sadineni , "linux-usb@vger.kernel.org" , Stephen Boyd , "devicetree@vger.kernel.org" , Douglas Anderson , "linux-kernel@vger.kernel.org" , "Alexander A. Klimov" , Masahiro Yamada Subject: Re: [PATCH 2/2] USB: misc: Add onboard_usb_hub driver Message-ID: <20200916021421.GA1024554@rowland.harvard.edu> References: <20200914112716.1.I248292623d3d0f6a4f0c5bc58478ca3c0062b49a@changeid> <20200914112716.2.I7c9a1f1d6ced41dd8310e8a03da666a32364e790@changeid> <20200915025426.GA17450@b29397-desktop> <20200915050207.GF2022397@google.com> <20200915230345.GF2771744@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200915230345.GF2771744@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 15, 2020 at 04:03:45PM -0700, Matthias Kaehlcke wrote: > Hi Peter, > > On Tue, Sep 15, 2020 at 07:05:38AM +0000, Peter Chen wrote: > > Whether or not it is a wakeup_source, it could get through its or its children's > > /sys/../power/wakeup value, you have already used usb_wakeup_enabled_descendants > > to know it. > > I conceptually agree, but in practice there are some conflicting details: > > wakeup for the hubs on my system is by default disabled, yet USB wakeup works > regardless, so the flag doesn't really provide useful information. I guess we > could still use it if there is no better way, but it doesn't seem ideal. The wakeup setting for USB hubs affects only the following events: port connect, port disconnect, and port overcurrent. It does not refer to forwarding wakeup requests from downstream USB devices; that is always enabled. So maybe your wakeup flag really is accurate and you didn't realize it. > Similar for udev->bus->controller, according to sysfs it doesn't even have wakeup > support. Please let me know if there is a reliable way to check if wakeup is > enabled on the controller of a device. The host controller's sysfs wakeup setting should always be correct. If it isn't, that indicates there is a bug in the host controller driver or the corresponding platform-specific code. What driver does your system use? Alan Stern