Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp891805iob; Wed, 18 May 2022 15:48:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+0bOFUVubqJBPhMzN37/QQHj2UwinAygBCbbQ9ArzWTNiswYIrvzL/edZd8RtvxngFpA5 X-Received: by 2002:a65:6e88:0:b0:39d:2647:f75d with SMTP id bm8-20020a656e88000000b0039d2647f75dmr1384770pgb.523.1652914088200; Wed, 18 May 2022 15:48:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652914088; cv=none; d=google.com; s=arc-20160816; b=tF+dwUicZT4p8wpCNrIab2HBaSyYyPT5suxrTrCvFiKPwlZaSSFHZ6EKHwQA4EGotj KPtiA6cnAtWW90FT60hO6aK3k/wGZ36IS77fmDdpg0wUcXCkARYuxIVNX6VPsAqVBs9b 5+IaWNl5ZGRFAX9HBhRqQdI7Ta/Qc7PQcK3KX3e0m8suBgKdVEcmptXH1Hb+4ahqlXU8 5SzsdM7a9MAvUG7Px2PrY7DfvNPP0odquVs1kJjfA9RZFTkRpFc7kOkJgq8TKfqZrDYU mWdFYkjzAjjqaWEyK8JRNlQYvts1HMv82BX9tCiv4Xcxv5gnm+wGbgvomnZ4Xn4LiW0Q 0RkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/nGLK4xvSVUA2aTskL7KBthCb1HFoB9NWaLdwGSmKHI=; b=b0NzXZOxe5Rx/e4PVNDD/iafJno6scGQbnGxpk09+VPyY9Sbj8M5+Hnl3xCb/nU2ue VKg8gB7N0OeB78QIs/Rwyp9hGiSfiEpOdSErAqwwOpTksqIZeMgtxwFkGt8YU95s6qs+ J6XSrqCQwaIGOVa3/yIoXgYkOH21QbmzouNaAO0v6jm+lef/az3pUFCZwhUfo1OPmBJ3 6IbK5dkhooH97i5aXTjtnBzt+L5cxCMixQCpAYnBEjMJQakV51O4DcYJIxv/b7GMLuN7 8+ab1eU6u0kF1YAnAE1wPhE4xiLN6iMr4mWK52pQUcM1Jc4mFBx0w5L/OZlNDXpXxKty xZSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BI2RBE7O; 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 u28-20020a056a00099c00b004fa3a8dffa1si5439044pfg.88.2022.05.18.15.47.56; Wed, 18 May 2022 15:48:08 -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; dkim=pass header.i=@chromium.org header.s=google header.b=BI2RBE7O; 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 S229689AbiERWG0 (ORCPT + 99 others); Wed, 18 May 2022 18:06:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229992AbiERWGA (ORCPT ); Wed, 18 May 2022 18:06:00 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3D741666B1 for ; Wed, 18 May 2022 15:04:16 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id i24so3376824pfa.7 for ; Wed, 18 May 2022 15:04:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/nGLK4xvSVUA2aTskL7KBthCb1HFoB9NWaLdwGSmKHI=; b=BI2RBE7OtfruFWTCNYrgW7SluCI1Rz1x30/zpufzVOuVeQ01dyyAl9KN+supk4ojPw GdvQYhtBojNjCzrclI30qnVPoypBgeo9+SsWAx194EvXhdWjCbQcLBkBIc6pdUknE90J XxrdkfQEZ8oMyivFmEzFxb+kEYZUVIRttm6B4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/nGLK4xvSVUA2aTskL7KBthCb1HFoB9NWaLdwGSmKHI=; b=uP4VJQKRopcPUA6rFMl0NZ4rHS0DLexGAp8AJNCnpLlaYIyVL165/EWxKWxY97DE5W oh/uFfxF59snsYRlHVdzlGWi7LoSl6FLR6PJxLWvB75sCuz+0n9yIbTCTwx0a5JT3uro Kjl7MX3D23PyNHYk33YHNbmPqxRCikQ0jimHUwx5zFtQOYnD8ouMLKREUCOarEUXajSG p/k+CFpBGNkccWnnNlIb1I2FTTWMZCTW2i0QzvhdlniDKF0ROpiNGzLlSUJtlsBQI4Xs GG9hdkpDbXU6aJ2u9y2RhHXQgACFNzzpJi+6CzB4lOQBARizD/f1sk5ZvaepdsEf7SF2 Yd7w== X-Gm-Message-State: AOAM532KGqfM2YEYDW57lYSeE+QL/8nDgwHRasOYvEffCfOk6JF/zX9q lndHiTQyQOXi4Wvx23dC4hHejA== X-Received: by 2002:a05:6a00:1145:b0:4f6:3ebc:a79b with SMTP id b5-20020a056a00114500b004f63ebca79bmr1609722pfm.41.1652911456421; Wed, 18 May 2022 15:04:16 -0700 (PDT) Received: from localhost ([2620:15c:202:201:620e:26da:4317:c2ee]) by smtp.gmail.com with UTF8SMTPSA id p123-20020a622981000000b0051811c2aa89sm2407750pfp.196.2022.05.18.15.04.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 May 2022 15:04:15 -0700 (PDT) From: Brian Norris To: Alan Stern , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Dmitry Torokhov , linux-usb@vger.kernel.org, Doug Anderson , Brian Norris Subject: [PATCH] usb: Probe EHCI, OHCI controllers asynchronously Date: Wed, 18 May 2022 15:02:51 -0700 Message-Id: <20220518150150.1.Ie8ea0e945a9c15066237014be219eed60066d493@changeid> X-Mailer: git-send-email 2.36.1.124.g0e6072fb45-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 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,T_SCC_BODY_TEXT_LINE 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 From: Dmitry Torokhov initcall_debug shows that OHCI controllers take ~60ms to probe on Rockchip RK3399 systems: probe of fe3a0000.usb returned 1 after 58941 usecs A few of these can add up to waste non-trivial amounts of time at boot. These host controllers don't provide resources to other drivers, so this shouldn't contribute to exposing race conditions. Chrome OS kernels have carried this patch on some systems for a while without issues. Similar patches have been merged for a variety of (e)MMC host controllers for similar reasons. Signed-off-by: Dmitry Torokhov [Brian: rewrote commit message, refreshed, but retained dtor's original authorship ] Signed-off-by: Brian Norris --- drivers/usb/host/ehci-platform.c | 1 + drivers/usb/host/ohci-platform.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c index 1115431a255d..f343967443e2 100644 --- a/drivers/usb/host/ehci-platform.c +++ b/drivers/usb/host/ehci-platform.c @@ -518,6 +518,7 @@ static struct platform_driver ehci_platform_driver = { .pm = pm_ptr(&ehci_platform_pm_ops), .of_match_table = vt8500_ehci_ids, .acpi_match_table = ACPI_PTR(ehci_acpi_match), + .probe_type = PROBE_PREFER_ASYNCHRONOUS, } }; diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c index 4a8456f12a73..47dfbfe9e519 100644 --- a/drivers/usb/host/ohci-platform.c +++ b/drivers/usb/host/ohci-platform.c @@ -334,6 +334,7 @@ static struct platform_driver ohci_platform_driver = { .name = "ohci-platform", .pm = &ohci_platform_pm_ops, .of_match_table = ohci_platform_ids, + .probe_type = PROBE_PREFER_ASYNCHRONOUS, } }; -- 2.36.1.124.g0e6072fb45-goog