Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp2624841rwl; Fri, 6 Jan 2023 08:51:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXttwvPhp0t3nZkDhZxzCdl9qF0+ZAE4EiS8U+9VD0wzGuVidERC6iU380oCIwerv9jsu3uK X-Received: by 2002:a17:902:b609:b0:192:4ed2:7509 with SMTP id b9-20020a170902b60900b001924ed27509mr58364659pls.15.1673023877118; Fri, 06 Jan 2023 08:51:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673023877; cv=none; d=google.com; s=arc-20160816; b=WGxiCVzJnKQWWROD2Kt4jMX+s2qfd85GlA5eIMIRVe70PX5lzPrANzeiCiPWH+FbWF Tz/dras4u3vc46I192qDEvZrA4EkweiwkvPMt7xJghlnhQKkmGqG1VHWQSZWhMu8UwsL R2bENQyDySu1Wcl1tvsWIj73CRdyojwR0TZMOIX4fs/0DsRfUdfIroXFLiT6V/r+5pnm RFrTGw2Ug8ud3bGGShmOYYEs9yal7mOe9TjulokMqNphb3KQGz1VsCla/LWnbutmDt/W pQrTVCZRzT5USCEO1tLXzkKVwnJ5sMWBhn3g9l1cLKayHP20J4YUBdFXqlPMCdBKff9v b/3w== 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:dkim-signature; bh=eXx0iBa6ViIHYuwColwZmoSS+/fQ6cQ84A5vNmlRsTI=; b=TlscTGTWxOz33XsbwN6d/C8cfHhddVVVqdQQoDblU0tMln7I9AmukRZBJwxcecJhrV XBianYJig6eV/59zEvUIP/iP+TvUbYgLHt+PG2R2KWQzEIZoTJXF7pB0+p3pbJ3wKLfL khAiEBTejDIkFg/ASOYDtYQ5agmJxYhFqyLcjYe/VSFSzkM7nQh7O7XfB7iRoRLd2iMw qcumAjOh77XSY/umWx50fSa0ah7h4CJtAxHdwLWYcJYvhKNKRRa1gq9jnl+nGbjD+8JD 1baFHA4UH++IrqTHRdnuyrYYWr++mLarLGY/kr+1BJTMFP+/t9iSmWnfsMpVdKlyrBRN GpVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nlcWyiDO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u1-20020a17090341c100b0018685c559a1si1505107ple.383.2023.01.06.08.51.10; Fri, 06 Jan 2023 08:51:17 -0800 (PST) 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; dkim=pass header.i=@chromium.org header.s=google header.b=nlcWyiDO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235292AbjAFQNp (ORCPT + 54 others); Fri, 6 Jan 2023 11:13:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235610AbjAFQNl (ORCPT ); Fri, 6 Jan 2023 11:13:41 -0500 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4008D7620E for ; Fri, 6 Jan 2023 08:13:40 -0800 (PST) Received: by mail-il1-x12d.google.com with SMTP id u8so1168169ilq.13 for ; Fri, 06 Jan 2023 08:13:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=eXx0iBa6ViIHYuwColwZmoSS+/fQ6cQ84A5vNmlRsTI=; b=nlcWyiDO7MGfoHvK4pgyUGDpHFFkPAczwmrqEeEsJRsTwZjdSWJtjVqYw9zLOC8C+u cSf2j/RQPoaEOuRHj5KB6lNWm6TvnNI4UGY/QVggn8PGQjUgeafEWDIY7PoZo8+P1XcC HDJpFarnU3SjaSCn4IA00U+BDwMax9Vnv5+a4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=eXx0iBa6ViIHYuwColwZmoSS+/fQ6cQ84A5vNmlRsTI=; b=OHr/cO1lync1qCX2+ye5EXQMzgqb+iVGI9Wd9x5lJGv8bhI3Ci0BM2xswPGo6pSEY7 tHGhNF+spJciGul11L5laH+PGWhNTLdn9YGASkrtgiPePJgR0WhpnrcLufGhAzZHKp0u vlffp+qkf/bhJDurB7Gy3vVQwidNDbNkFPYKULQTyv648uLb3rWYVjTTqGWJI13EQjcK Umn+3R4Hc7kWbKZsZ4aDYSEMHAC2/Z4WvEgrPqLTG1MnDNqz7/CZngDWrAzs/BPXpe8D CyxNmx+wFbV68s4V+yzE8NC1tHOB3ZocjROYVQ/Rc8zxNacT7KAM3PqFc9FxQ2wXM0gx SiNQ== X-Gm-Message-State: AFqh2kpwskwBdeqwQ5BlEfOgoxLNr7JUEVCRFckFlk6pALGLwz/wemp/ iLVq4hmR5hnosZGZHz1nw5scFA== X-Received: by 2002:a92:c151:0:b0:302:9dde:679d with SMTP id b17-20020a92c151000000b003029dde679dmr40362399ilh.17.1673021619603; Fri, 06 Jan 2023 08:13:39 -0800 (PST) Received: from localhost (30.23.70.34.bc.googleusercontent.com. [34.70.23.30]) by smtp.gmail.com with UTF8SMTPSA id t17-20020a92c911000000b002fa9a1fc421sm478364ilp.45.2023.01.06.08.13.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Jan 2023 08:13:39 -0800 (PST) Date: Fri, 6 Jan 2023 16:13:38 +0000 From: Matthias Kaehlcke To: Greg Kroah-Hartman Cc: Johan Hovold , linux-usb@vger.kernel.org, Stefan Wahren , Alexander Stein , Icenowy Zheng , Douglas Anderson , stable@vger.kernel.org, linux-kernel@vger.kernel.org, Ravi Chandra Sadineni Subject: Re: [PATCH 1/2] usb: misc: onboard_hub: Invert driver registration order Message-ID: References: <20230105230119.1.I75494ebee7027a50235ce4b1e930fa73a578fbe2@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Fri, Jan 06, 2023 at 04:32:52PM +0100, Greg Kroah-Hartman wrote: > On Thu, Jan 05, 2023 at 11:03:28PM +0000, Matthias Kaehlcke wrote: > > The onboard_hub 'driver' consists of two drivers, a platform > > driver and a USB driver. Currently when the onboard hub driver > > is initialized it first registers the platform driver, then the > > USB driver. This results in a race condition when the 'attach' > > work is executed, which is scheduled when the platform device > > is probed. The purpose of fhe 'attach' work is to bind elegible > > USB hub devices to the onboard_hub USB driver. This fails if > > the work runs before the USB driver has been registered. > > > > Register the USB driver first, then the platform driver. This > > increases the chances that the onboard_hub USB devices are probed > > before their corresponding platform device, which the USB driver > > tries to locate in _probe(). The driver already handles this > > situation and defers probing if the onboard hub platform device > > doesn't exist yet. > > > > Cc: stable@vger.kernel.org > > Fixes: 8bc063641ceb ("usb: misc: Add onboard_usb_hub driver") > > Link: https://lore.kernel.org/lkml/Y6W00vQm3jfLflUJ@hovoldconsulting.com/T/#m0d64295f017942fd988f7c53425db302d61952b4 > > Reported-by: Alexander Stein > > Signed-off-by: Matthias Kaehlcke > > --- > > > > drivers/usb/misc/onboard_usb_hub.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > Does this superseed this thread: > Link: https://lore.kernel.org/r/20221222022605.v2.1.If5e7ec83b1782e4dffa6ea759416a27326c8231d@changeid This series ("usb: misc: onboard_hub: Invert driver registration order" et al) fixes the race condition mentioned in the commit message of the other series ("usb: misc: onboard_usb_hub: Don't create platform devices for DT nodes without 'vdd-supply'" et al), plus another race that was reported later (this patch). > or is that also needed? This series is (mostly) independent from the other one, it should fix the issue that was reported for the RPi 3 B+. It can be landed even if the other one is abandonded. With this series the other one doesn't fix or mitigate any actual issue (AFAIK), it would only be an optimization (don't instantiate the onboard_hub drivers if they'd do nothing). > confused Sorry, hope this clarifies things a bit.