From patchwork Thu Feb 10 08:11:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 541396 Delivered-To: patch@linaro.org Received: by 2002:ad5:420f:0:0:0:0:0 with SMTP id e15csp2038578imo; Thu, 10 Feb 2022 00:12:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmLg9iRfo7uKFvi1/zW4Lsp37b797I9+7CZeeQPGx1g5OTyifbPHMsA5eqKb1ffug5ArXY X-Received: by 2002:a05:6402:38e:: with SMTP id o14mr7067031edv.414.1644480758452; Thu, 10 Feb 2022 00:12:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644480758; cv=none; d=google.com; s=arc-20160816; b=J7kxei7oirUACW65WHg18G4rQYNGt4e9tVlr22J3M6xFBufm+wZ6tIy0D/4uYobbgu wRGRSxtNca2uSTtD+4Bhkyc6LhMa6G9q11NdEBwaAqpF0sjvXcSVYw39Q7pc0FABv9nk YKuBEmZeuRy8PEHwQRxPPSRhz9p8lZptupPY//v2a7BjG4nCB/IlrKJ8b45XkuDZqr5n I3QMB3UinJbhv9hWDRvGL0L8K5RY9H1tB8Mij/7sfjo2LG4Om5gjK3/eM6312vxjuRRJ EuJpUEhvxhn83wAiJH8VTVL6BpyLrMXaZXHdo3n4nEM4i/BKnfmX+wlyl+D4xnAjK9x1 3kVA== 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=TKCjqkcReOTIdWupV0g/IOts48k1maVRDSlcVfP/OiSzQ0kRbyt9t9wyyu8EP/X5C+ j9kEJ0csQXWr3pE9cjHY2txDHfNLpnzLadqDxBJXVgIuwYnOMKJtqEJRyHjSYWZIft5F a0lS0l4+R1b9hZuDwvxgzfFwvB7tfc8VeZffrbKCgyCDmnhwko+x87z5Tt4wVkfZkXJe eg1qj1b/YqAnQ6AKv20+yfEZY4Ponf8lwUbQLwmZ+Gb6SokrFukTTLoCtLozfDMOVSSi LhCx6fFViCJjreJu8/sd10+bEhefCWPZwwEH60FV5QzVsY4qtmjAYlTZH9oSZtHexr/6 wJfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qwRiOqmK; 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 g7si4862027edb.109.2022.02.10.00.12.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 00:12:38 -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=qwRiOqmK; 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 AA68882F65; Thu, 10 Feb 2022 09:12:30 +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="qwRiOqmK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2AA0381A03; Thu, 10 Feb 2022 09:12:26 +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=unavailable autolearn_force=no version=3.4.2 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) (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 7F49481F4D for ; Thu, 10 Feb 2022 09:12:20 +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-pf1-x433.google.com with SMTP id i21so7409239pfd.13 for ; Thu, 10 Feb 2022 00:12:20 -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=qwRiOqmKBAq5k3ch1hGBNcYSw/t53a5FfmjO2Rl2N6ZQAllb6/RuQHxbNJAUEmsiPI v0IZH9Jh4FJlYjaAdfM4quP8xTR4Y3VUnjftuzpr5tWXkrTGUJudZkyR0a1FlGjvYXvU MVcSE7VSF+V/BwtwTk3aQcHu0dwXxMT3uuXr+8sdQsfLLYR5AbRQxMZzFZjQA3ZJoowt 2ejAMjImp3rE7Hy7xi3IFi1PJ7rF/zkoZf/yejVEEQqMNRenVwY4oarj1jTwIbJUo+Is TRxQbQBYdTfSYZkKwQ2uiWPi4mivxENz7vPBzzE6ETGoLIGEsS1IQsSnYlRAbrgN2yDC 23uA== 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=EX78BIxot1rLwHuhvwOshax8E+mAFqpjGj8yZzMENM45q2msYsv1NdcxEnqotCHUF0 mPT1WQaQkcq1JySnry5cVFtnk4bbwrJRj0DtaW12putQIqsfwdwxWZ6n3xThX/0Olt0F 1SPEa6M86aE4YccdTSHHb9N+nEPw7n8bh+yJNKAwLeiHBatd1ks26otiKGe/tMEhy7b9 nVrtfHbgoVka9oY13myC2CXexDhmF99vS8n0i/Ym9/Vkl6PtB1ZKKbAIITS3QuxzUY4X V5YuUZEr/NoG0CD9d8tsSnNUJSU+v84RiO2+WThiQsrQ9RbHZwMTnxhHzxyEy8zdmMYt s28w== X-Gm-Message-State: AOAM532eH3qu9gIduGZDwFBdfXMuzk7dYfwwONRajRlt7ozj/JRWOFV3 9YU32z6qZQQVhq2/O4PJrqpeww== X-Received: by 2002:a63:864a:: with SMTP id x71mr1197426pgd.380.1644480738760; Thu, 10 Feb 2022 00:12:18 -0800 (PST) Received: from localhost.localdomain ([2400:4050:c3e1:100:412e:384:fab9:f24]) by smtp.gmail.com with ESMTPSA id lk8sm1529208pjb.40.2022.02.10.00.12.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 00:12:18 -0800 (PST) From: AKASHI Takahiro To: lukma@denx.de, peng.fan@nxp.com, jh80.chung@samsung.com, bmeng.cn@gmail.com, peng.ma@nxp.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 v2 02/20] usb: storage: call device_probe() after scanning Date: Thu, 10 Feb 2022 17:11:06 +0900 Message-Id: <20220210081124.86612-3-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220210081124.86612-1-takahiro.akashi@linaro.org> References: <20220210081124.86612-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 */