From patchwork Tue Mar 8 11:36:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 549270 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6713:0:0:0:0 with SMTP id u19csp2538719mag; Tue, 8 Mar 2022 03:38:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJwnB69y0AMPeQS9urPgnq0opJzLG/yOEFKEDezaqWZR6hLlNegp4xkShGLwBRcVVJ5tSK/L X-Received: by 2002:a17:906:3a04:b0:6d0:8d78:2758 with SMTP id z4-20020a1709063a0400b006d08d782758mr12947966eje.685.1646739504722; Tue, 08 Mar 2022 03:38:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646739504; cv=none; d=google.com; s=arc-20160816; b=kM+4dlEkQsC2PK9NPm3pdBbKWoAOcndGlx6GlU57pI9PU5kC06pv5LSpnc4XDj6Wr5 AIXX4TiInyaY/MqmPEww/J1hONoYB96MbC9T9ERvAGhrA3zMIexVNffLX+dKMiBpMTpk tzul8eZMQEeCsRNwGSL3inLte7tDaWGCKgEwetX+4sRdtY4dvueBYD0GU/+NY4VIjhyl 8Pg6Yriv51dWINVCDBLfG6Xfhjkb0ekJLX/wl+2gPfTkKVyIoCD/ZBus2WTPYCw/La+v f38w89dS8hSE6SX58t/NkCf59pGdJEcUXoL/cXPYE7IpXjOSkuaw8UIfdfb0NPBJ5QyZ L9MQ== 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=Ela0o1vIPIqVn32GJDiDYFwFknN3vfBk0WDNKspy0VUqRHH0yLVnxuWrNvbj/9mDBf WjYjz7fyeQx3isOCfjpkpR+UyrrhzNxN8/NhOOIOQpJEXToES1Cr6uvodjS099/n7Zw9 r/prpDJ/fZM7Tn1yY1WJo/Y8B6JbwWcplVcQrDbOXJSNjowJUa99l6qnYpfuU2cbwOFj lo7dU7cs1h4VckeCxJfL5h4J6n0MblU1C6rXyGnwUZowHmLic+HHCWYIHl8CmyLn/aV8 EeqNwYHRoOvAOGIT+s8mTnUit2s6vPHu6FIcx5O39vymj/1D0je/WtpDzbDXfaEhp245 E/Qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rjA9qnQL; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id v8-20020a170906180800b006ce06d94796si8794554eje.389.2022.03.08.03.38.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 03:38:24 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rjA9qnQL; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 95DE28398D; Tue, 8 Mar 2022 12:38:19 +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="rjA9qnQL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 343948393F; Tue, 8 Mar 2022 12:38:03 +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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) (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 A76A683919 for ; Tue, 8 Mar 2022 12:37:51 +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-pj1-x102d.google.com with SMTP id c16-20020a17090aa61000b001befad2bfaaso2150075pjq.1 for ; Tue, 08 Mar 2022 03:37:51 -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=rjA9qnQLJV3QK+kFcQNRG2sWk+sDNQ/UX04quQ+z9qe/Oto7n22vjTqp5gAE6UPOZ2 1PzoJ+PIVC3f7bQSQ/fr1mpMpvJFMrjZ1DLOcdBBDXhyzQs6XBOnhG8odBWlY4J77Jig SpsP2VG3tC+8ggB8RwNZVnKRdkR7vzlyBGu5B9m92DObxyPs04M4WmFph4SXTqclsW4v J0v/GkbsPnrBDgYe17VMM/g75rMRQuoP72inFFjZ+Bccj3zY29B0tZOBFI0T4mupsg3g ccoQOPRhG/S4ctwOsBfQVl0KeN2VJNJaCWIp+6ETQOvFedOnCnqHwOMJus3kIeUww/IE tGwg== 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=IjQlExuNwKklR6DrwH3VqusiuNSRTAoGjIL7nxiM7t1411nOJzW0IuhcyBsln44UjN rjug9F+GHaKJU3AsTXXiOxGvdNrYsygojPws1Da/f1EFJVrF7wyJR1EKx8iqSEfevQ1W BDixEVXDpP653spHtQpFIXGU/0EE4QR8yrnS8SN6dM5u1AO/PekMXBlJVG/stpxBaUuO auL5YHPQ1AthMh7PsyyfzE6IcQuNDl0IbAfjQ5XKpqno05Oyrl7Jv9yjbt1UnKnxssaJ HzIUTA0cClzPJVkP3oVchnpTQ6R0/XgvHuUGfG6cF7EFQFP3+98QU1u/r6VDMvN/IvM0 j2xQ== X-Gm-Message-State: AOAM533v+poJKcoDlFAdDJVUMa81fk4Ci9RRWGeaTPwc4s7tZv3Y/mB7 6Am4E6CIfnmsaIz3mwoij4Xb2g== X-Received: by 2002:a17:90b:3881:b0:1bf:86ea:a5e5 with SMTP id mu1-20020a17090b388100b001bf86eaa5e5mr3972762pjb.11.1646739469984; Tue, 08 Mar 2022 03:37:49 -0800 (PST) Received: from localhost.localdomain ([2400:4050:c3e1:100:b94a:f47a:3d51:185c]) by smtp.gmail.com with ESMTPSA id z2-20020a17090a170200b001bf2d530d64sm3434677pjd.2.2022.03.08.03.37.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 03:37:49 -0800 (PST) From: AKASHI Takahiro To: lukma@denx.de, peng.fan@nxp.com, jh80.chung@samsung.com, bmeng.cn@gmail.com, sr@denx.de, xypron.glpk@gmx.de, sjg@chromium.org, ilias.apalodimas@linaro.org Cc: masami.hiramatsu@linaro.org, u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH v3 02/19] usb: storage: call device_probe() after scanning Date: Tue, 8 Mar 2022 20:36:40 +0900 Message-Id: <20220308113657.221101-3-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220308113657.221101-1-takahiro.akashi@linaro.org> References: <20220308113657.221101-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 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 */