Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp9757180rwl; Wed, 11 Jan 2023 09:31:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXutiuHvCiu3NZd282nl235LKMfmvtVxYAFwwGzUGHr8+isFDjn+jCqrQhw5k7H+Hxx3njLH X-Received: by 2002:a17:907:a789:b0:7c0:bbab:22e5 with SMTP id vx9-20020a170907a78900b007c0bbab22e5mr66842287ejc.16.1673458312802; Wed, 11 Jan 2023 09:31:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673458312; cv=none; d=google.com; s=arc-20160816; b=IH+eSCCIHQxhAhHxpeqvilKIJ9lGbRwOKGYBUcswtmooZZ4wPkP0k01yvFOfhPLZ1w TVhSxUc8jlH8eauPflnekQzxmeOyT1+L3Yl5J3vzLEGKWTxfuAt8CPxwPHFrtAE1rcdn oAgvbKdi4h4s+qq/X2bp1fueUS1EMnGF8/ijbXdh3Lj93Mj60jXrxpOBg6G9r3/Kn2ur JeNS3d242qlEjL+P0nL6t8qfWkJe0tVA4K21Lb2gI7eHcQi2p0JKSO6Pmlw0Igy2himM tfsjR3KjG3S/FEomIhzc0cnCJeS9q/I2Y4xfx00Z0Xv7hbRjTPRULPUQdEYxehJjJM/2 frnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id; bh=3NAuH7FZ/p0pfnq6Dr672j1WBv2oNSwQnq07nAcKV2Y=; b=hdXz2wwDv1NC6coxfgrI5t4n/S3uNhkWGPuXEmkabgMsMKmYexE26mMUnjqGRM5tM6 9qhVxIdi6xszIKRJDTRNPIDOYKfe9rN2gZ0vlcLcIYmwIpiqsy3o6oeBktRbzGTTO49C TmWferOaChNa+g9tkA5lXwHs7NHyPOAwaU8xeR08Aqr71DDswC8SpVPhZZNdwCv8QKKb hI8deoq7aUBajYASkO8GdLM14Q73j4AjpMeCFiyDBSWvCd78nIV1Qt/mSqfuZ0qG37WK Zeoub+1rP4KTwdVzMMAiQJfZ88u2DrhJKoTOp+MenVL8FZKlwYb0/rFVEf0a1LJBSWZq CUvA== 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 bq25-20020a056402215900b00499d35c5777si3189671edb.107.2023.01.11.09.31.40; Wed, 11 Jan 2023 09:31:52 -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; 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 S234387AbjAKRQx (ORCPT + 51 others); Wed, 11 Jan 2023 12:16:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234484AbjAKRQb (ORCPT ); Wed, 11 Jan 2023 12:16:31 -0500 Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 040B0F4B; Wed, 11 Jan 2023 09:15:55 -0800 (PST) Received: from [192.168.1.139] ([37.4.248.41]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Mv2gw-1oxqlZ0vaa-00qz8j; Wed, 11 Jan 2023 18:15:41 +0100 Message-ID: <9c242f84-367e-d857-24a6-8336d652257c@i2se.com> Date: Wed, 11 Jan 2023 18:15:40 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v2 1/2] usb: misc: onboard_hub: Invert driver registration order To: Matthias Kaehlcke , Greg Kroah-Hartman Cc: Icenowy Zheng , stable@vger.kernel.org, Alexander Stein , linux-usb@vger.kernel.org, Johan Hovold , linux-kernel@vger.kernel.org, Douglas Anderson , Ravi Chandra Sadineni References: <20230110172954.v2.1.I75494ebee7027a50235ce4b1e930fa73a578fbe2@changeid> Content-Language: en-US From: Stefan Wahren In-Reply-To: <20230110172954.v2.1.I75494ebee7027a50235ce4b1e930fa73a578fbe2@changeid> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:mlSvIIHDHoTWUrYZbV13DXLwgb5LmiMbUGrfSyk6xy9dIvfjHs4 SBkT6X1/UoAV0k2FJ+W1qxmXvyuMggPTpiWfIPLzMw2BPC4RX84zrIlxzz/WgUpwrSJi1+1 xC12eF77e4cU2xbmro9AGAoHMCxPs/7xyfLfy3FJfkt76kSwfWifwmnLkylg/nEFTrpbP5D sccMSLqGhUlBxEeZ3ESow== UI-OutboundReport: notjunk:1;M01:P0:uBJw4yKVRVA=;ULD0lhkJDedWrQ4W1B5hTSUxABw T18a30pAbHMyMZR7XqwxqUJ4SNOYnmYtyEaO/2FrJAw2TKOpcRvROQz8Rg8JjwrTjwCilt6Ta iTf4fbv6LVCn5VDBmvc0Fc2e3oJDQo8ugWsOX9HTCDqKCoFDWM3J+jdXkrP5XXIIJvfMR0MrK 8QSx/OfBqFPIK1vasnzFVZTWlzn4anGWVYH9V18A79JJPOVh+lh2M2VAwo7ztspF7VttBXUGx 4+VL11D0lpiAf6/gCsNJLbvB1wja17F0aYAkRqe2veRASRQAccK8tam8D/0TeWqlig7u5Sxuz fzpCvWVlngCRmgFXotWyLvyUpdxqmbEhJpKm/xwoEVB6OBSC48ZRkSsUvZORo3kkYxl4gk5D+ jbygHUWhE+uOJsgBAAebwFClZy7eTBf8ynTNaLrH2a8vlhnFfhCIis+pagOviNPfTMc6yK33j OxhjVcAacKI0wSiTFhuRVZHBCOFA/PEPu3taiLRzye3a4wjeEkaDuE+d1TU82nbo/yyeSTerX xN3vP1kLIgOy+4HRf28BuUlSHZngksudk2+4EhGT+He2byk+A7RigpbGqVXjF2eDDRKrXNfMh ZAap2AHn0NoeIOWnw4Qs0/aYgJW99hUChPM7ntuFg+DrW0uAN55zYqFiuwDBPahSEVslU9wyi DluFk5GmaaGXN9UwqNYa/S4UeIM1DTwiTDvUbcUngw== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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 Hi Matthias, Am 10.01.23 um 18:32 schrieb Matthias Kaehlcke: > 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 the whole series is: Tested-by: Stefan Wahren Thanks \o/