Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3252805iog; Mon, 27 Jun 2022 12:26:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vpwiqM2dlb3L21SCaOaL3OWrfBiud2GEQU9swC4mfJ4wPlY4km6RnxMfd6y7+y1O5yViRh X-Received: by 2002:a05:6402:2398:b0:435:9685:1581 with SMTP id j24-20020a056402239800b0043596851581mr18517435eda.333.1656357964582; Mon, 27 Jun 2022 12:26:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656357964; cv=none; d=google.com; s=arc-20160816; b=uhJIRgAAOTIteoAbTPg3WIZfbkMGAKfc4CV3fLsiom1YnwRK7xFKLJ67QtvtN79Kvb HfLgSqGX4jQetnI6J2qxWVhv/ya3pRK8PWihwjy3E8woIQsDmaJaGYgIcZt8YGWbT5gt /bpPVwXQ+gf9rUJPmFqXkd87o1uVfWyQMDh//SBmtYJhQs95dWN/PViaOx1Dzq3582np bQJakNbQvJTdwael39LvXhNxHBjXHQ5FC2rMvpw60yZ3aqyq9Mp+BOwvotT0qoCdPSF0 gwlLU5QuDzw5y6A3l19gcPEmpjLBRfBRcLinwuHqx/nECiySfVUf9/2YwJB0LYSJarQu /rzw== 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=XcUicc+sISwR0sMQsfiyO2tCa+PIyCQJCKgbwYa9blo=; b=PSITGlbBbtt/nfnw/p0eLB9OllMPhGfDUKmxURnQq9x5r1UL0rp9ZX0egIY1Icv6a/ muJOUyd0bQjIOWoP0Wpb5+dnOt33BS1rZR35JRd3nnUYW+DOGQfffxJc/zNGigNhMzuN /pafkttDtq0LMc7gGmZ5G441/qlIfuHk2cA7mgSK0t7XIT6H6xjLdX38XYnT60zNyQRn 78IrTF5GOlkkZhzV0eCbozjNHg4sgRFSycyTwck4Q9Ux9veczbS3aFOuGqKqN6KnloRm lnGXBfrhXvObphTwHG/KmFgYIfvpd2xU4fJsUw2uY3rAVcg8A+rEvcIWENapGqrF6LwT E+pg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mp40-20020a1709071b2800b006fe89c9ef8csi13707841ejc.764.2022.06.27.12.25.37; Mon, 27 Jun 2022 12:26:04 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238791AbiF0SyH (ORCPT + 99 others); Mon, 27 Jun 2022 14:54:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237365AbiF0SyF (ORCPT ); Mon, 27 Jun 2022 14:54:05 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 45EF11094 for ; Mon, 27 Jun 2022 11:54:04 -0700 (PDT) Received: (qmail 128884 invoked by uid 1000); 27 Jun 2022 14:54:03 -0400 Date: Mon, 27 Jun 2022 14:54:03 -0400 From: Alan Stern To: Matthias Kaehlcke Cc: Doug Anderson , Greg Kroah-Hartman , Rob Herring , Frank Rowand , Mathias Nyman , Felipe Balbi , Michal Simek , LKML , Krzysztof Kozlowski , Stephen Boyd , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Bastien Nocera , Peter Chen , Ravi Chandra Sadineni , Roger Quadros , Linux USB List , Geert Uytterhoeven , Souradeep Chowdhury Subject: Re: [PATCH v22 2/3] usb: misc: Add onboard_usb_hub driver Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Mon, Jun 27, 2022 at 11:14:47AM -0700, Matthias Kaehlcke wrote: > Maybe a bit more verbose documentation like this could help: > > Some background about the logic in this function, which can be a bit hard > to follow: > > Root hubs don't have dedicated device tree nodes, but use the node of their > HCD. The primary and secondary HCD are usually represented by a single DT > node. That means the root hubs of the primary and secondary HCD share the > same device tree node (the HCD node). As a result this function can be > called twice with the same DT node for root hubs. We only want to create a > single platform device for each physical onboard hub, hence for root hubs > the loop is only executed for the primary hub. Since the function scans By "primary hub", you mean "root hub for the primary HCD", right? This should be clarified. > through all child nodes it still creates pdevs for onboard hubs connected > to the secondary hub if needed. And likewise for "secondary hub". > > Further there must be only one platform device for onboard hubs with a > companion hub (the hub is a single physical device). To achieve this two What do you mean by "companion hub"? I think you are using the wrong word here. If you're talking about the relation between the two logical hubs (one attached to the SuperSpeed bus and one attached to the Low/Full/High-speed bus) within a physical USB-3 hub, the correct term for this is "peer". See the existing usages in hub.h, hub.c, and port.c. "Companion" refers to something completely different (i.e., the UHCI or OHCI controllers that handle Low/Full-speed connections on behalf of a High-speed EHCI controller). Alan Stern