From patchwork Fri Dec 10 06:49:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 522727 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp2168873imb; Thu, 9 Dec 2021 22:51:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJwIUWnKz/Y0ZqKGmSXQPrHQar0uyXvpTlMC8KXAvfsrA5AJbDXEzrzBviqnbQKq34/yJMoE X-Received: by 2002:a05:6402:51c7:: with SMTP id r7mr36658550edd.359.1639119066308; Thu, 09 Dec 2021 22:51:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639119066; cv=none; d=google.com; s=arc-20160816; b=y8ZbHWWUPCium8kH0Anv/ND82YCpXPr/0E00F9PFOcQDkrOnR+fRuyUTlZ2NKnqtpv JLbT4xRGSDzFEx8zkAn/9zPjpMNsDZtyq68RKSyvlWGrqmz+zVM6ZuxnmFUL0S0Wqdhk ibF2f/vTncnYBU53thMV1hloPSWg5JdncyWA4nCRJPARehNdbWz+/vH9Y05YNU4fwJ1Y KQc4Cy7YiLN6guPcO1pV9QYaNtfa7Y/kO/QVqogwxkPzm/PFHh/IB4+9K8EaBhHdd9Tu y2KhZsvjEOpYtn3T38k66Y/CmOwGajxmeFX0mSzkJQ06a7YIaCoRqXd7p+ySlb+NRgPw E5zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Y76P07ukuT1wREwWJsiB4J82LPFAi8f0WyRnmBNx5ts=; b=QR0/s4oavs79g14OdFxaBAx+7uP3tkRIIT0mRui1ahbT25RPXJvZ1zmhXo6H8b1Stu UuWVWDLIkJwQ4UkQ2GOXxXAq6hQCHih+3tU/5QCxvU0R7Xy71zE84YQXnS+8O3M2y6ZC EgTE3+PLRBxM/nOfC1K0lvqW3XjNZEJ9vxlJzgiXENcEvBvLZNs9/8pRWZtAJTk17ogy HwBe8SAp74FJ3GihJM2HqX98p9zgeVbFyzwSRNw3hZzMNPptNoidE4mZChdx2PlmDNEA baNbvUQymqzNNsikH28+QvOoAkK0aY8x0b09uqq1cyvX0fewj2gspSzg6zV7gUaFl85l 5GGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NfuoF0EQ; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id p2si3227417edq.79.2021.12.09.22.51.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Dec 2021 22:51:06 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NfuoF0EQ; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0DDF9830BE; Fri, 10 Dec 2021 07:50:48 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="NfuoF0EQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C2F2682982; Fri, 10 Dec 2021 07:50:37 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2C09F830BE for ; Fri, 10 Dec 2021 07:50:32 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pl1-x62c.google.com with SMTP id y7so5695839plp.0 for ; Thu, 09 Dec 2021 22:50:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Y76P07ukuT1wREwWJsiB4J82LPFAi8f0WyRnmBNx5ts=; b=NfuoF0EQ7Ai/dXAsW7E/8hjK5RsbSVbvgSebH45jVxwdzatbld5faguwiZizTlq5bC F2Fj72W7KSUbAUFu4qPELA876fUAPass+gaj7UCdrkXvJvPlp06JCien6MpiAI+VRDqs UFEht08eboeHu1I/fY1fIZY7OlJsColclvxHzlG1uKnez2DPsHUqMdB7v3dvJ+qENLh4 qUxi7V9mkeiYW8NdEDb+8kbJJzRHmHzunHIdwVsfR/GO7Tl1JdD4WytDAYwoprLU/IeN hmbepSvkVIEIaYOMFFq6Ilg68b7mBRHqaYJ2tZ+6AYz+GJjjBopZswhM4Mp33LWz+rgE bQIA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=Y76P07ukuT1wREwWJsiB4J82LPFAi8f0WyRnmBNx5ts=; b=cQBYSWF3OiJ+e9aigGlXfQr1mAJxjvnvZ1pG9tmYcAJJfjVztKao3B88JKvqT4fx6t 7DaF0nHOTor3B+ko+TyqtgbJfI4f8gXIzRMAd68SMoDqB9b+AW/bFoYkeft5exN0ZkMH kGrI+pxNBONNB4cK3UDPr3/h/GdHhm2F4Cz2hBunI82J9ahOMGOEMD/TB4j8CGV1nWKD o5VPb7f0gQ5Ny3fJJF4OnyhjLYYIGmaU4Qy3yOuxCKzfIMVz1tkMUD5pTOlOAhCU6vrs NuUKAJaz5tYTS1FcGOsyL/mvia7c27Oa4RH/miXjMHMQuT0zAlbsJsMqXwMgKKEHJPgO gWKQ== X-Gm-Message-State: AOAM531whgnZNmf9v8yxQOkLCPP0gwzTh8PQGQUrzWrnH+mJxgZtk9L2 LQr5d2EOVsQhcSZ720qXfZHbnQ== X-Received: by 2002:a17:902:da8d:b0:142:4fa:9147 with SMTP id j13-20020a170902da8d00b0014204fa9147mr72309385plx.72.1639119030572; Thu, 09 Dec 2021 22:50:30 -0800 (PST) Received: from localhost.localdomain ([2400:4050:c3e1:100:75dd:4e0e:4542:936e]) by smtp.gmail.com with ESMTPSA id nn4sm1639035pjb.38.2021.12.09.22.50.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Dec 2021 22:50:29 -0800 (PST) From: AKASHI Takahiro To: xypron.glpk@gmx.de, agraf@csgraf.de, sjg@chromium.org, ilias.apalodimas@linaro.org Cc: masami.hiramatsu@linaro.org, u-boot@lists.denx.de, AKASHI Takahiro Subject: [RFC v2 04/20] usb: storage: call device_probe() after scanning Date: Fri, 10 Dec 2021 15:49:31 +0900 Message-Id: <20211210064947.73361-5-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211210064947.73361-1-takahiro.akashi@linaro.org> References: <20211210064947.73361-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Every time a usb bus/port is scanned and a new device is detected, we want to call device_probe() as it will give us a chance to run additional post-processings for some purposes. In particular, support for creating partitions on a device will be added. Signed-off-by: AKASHI Takahiro Reviewed-by: Simon Glass --- common/usb_storage.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/usb_storage.c b/common/usb_storage.c index c9e2d7343ce2..291728f37e0a 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -239,6 +239,10 @@ static int usb_stor_probe_device(struct usb_device *udev) if (ret) return ret; } + + ret = blk_probe_or_unbind(dev); + if (ret) + return ret; } #else /* We don't have space to even probe if we hit the maximum */