From patchwork Fri Oct 1 05:01:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 514990 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp452052jaf; Thu, 30 Sep 2021 22:05:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+CNN2JpUDP5bakAd3RaVoslzjKaEjfZhNtL1cEjOw/rgYYyTi+kWDZQl1gkvvBlnK33Et X-Received: by 2002:a50:83c3:: with SMTP id 61mr12082891edi.81.1633064729094; Thu, 30 Sep 2021 22:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633064729; cv=none; d=google.com; s=arc-20160816; b=v+NbW+cciYelaOVzO+2WHkPV+MSNVOU+OaOC0dAx6bEK1awb5jvDFBIwlnbwe3A+jW t8/YXT+N3Xg0SX1OiszIH9bkUKgaQHhNlhM3BTjFQbl3KrwYRazhV/jV1COffKtwpJ49 kwdHc2Bh/tBs7GwcR4nt0xqosnqYSaACba8IP30FSHOpMoz7n0x3iSexrCH0k15wEyFA +ALw4pNbn3aGXTNvNIwpNe6H2NSUVJawbPm6W7I/XMTtzoq6PiRTxgNhz7PpjShChYlf SCoj//+fpPEqcNrNoLUYBksJID27tVvEFdREpd2PDBvdT497yShIXQg1cYzwLG7z4UWj omwA== 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=DUqHk6GqAD3KhgmdEMlQyPoaCBbyBnak6/KyeiOBA7Q=; b=NUYU48g9HZUE8paUcmkA4hclx9dqg6PNB2qB5kM6Qs4CaGhM3u9HMZ70jk2eoVsh1F OcdGF75VoYBw8sLlutsl8qktCzJ2kK70E7ij7JcTzmrSirUR1lsDINhcGo8YW8bBB1iR OV6DQB6eFfaoWH8Xls+UJ233G12Z4riGz/RTfrqi8IxGR6iQd3DGAQv8zfuHr+D6s97D K7aTo/5kxwsQk8b9uV/NCOoGKoxJZrKA15K3ukseLh1fukyUdb8iF3KF/rwEzwiBNDgh KkHVMMtqhok2J0ocA58s6glfdETgkm0QOV34ymMkdLjBRVsOW0Wm54Xub4xab9GrExBD dnhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Fqmxyb9C; 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 w3si5621644ejv.301.2021.09.30.22.05.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 22:05:29 -0700 (PDT) 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=Fqmxyb9C; 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 9BFCC832A1; Fri, 1 Oct 2021 07:03:54 +0200 (CEST) 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="Fqmxyb9C"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 508118169E; Fri, 1 Oct 2021 07:03:37 +0200 (CEST) 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-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) (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 EB5AD82EBD for ; Fri, 1 Oct 2021 07:03:31 +0200 (CEST) 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-pg1-x536.google.com with SMTP id h3so8349834pgb.7 for ; Thu, 30 Sep 2021 22:03:31 -0700 (PDT) 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=DUqHk6GqAD3KhgmdEMlQyPoaCBbyBnak6/KyeiOBA7Q=; b=Fqmxyb9CVBMymCKF+iNqCM3XoVZfgHRTWK8bc2SKWr1Lg2P2KJ3Tv1xsHkPxEEPAKy i1dLXiHD37NZ9H7v5mUakDXn4KURlhMYyEpPD//DSq4zuMYj8913twmlC+O7wsxUJGfS 9M1mNCoOXIb1HrDu0sU9z24TYJTQYTHpuB1FmuioG0TidRA46hrwGSxlCFU3Kasd4vHf QwBXfXkPnHY6blbdx2Vlp6pGxsARD/1BDLHB9/q56KUTxCZTK+8lIAAQJ/etdcpraskD om2SjnLbrCkePdcIiUiV53+cAjht4M7en9XwNnuo7de6GVAVm2mx9SshSYlP3sboOsvP Hz7w== 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=DUqHk6GqAD3KhgmdEMlQyPoaCBbyBnak6/KyeiOBA7Q=; b=jfTzerXa4fZIKfsCWeSyqhQHfbXs8RQUeCCmVPEQNKsFwzWiFWf37yygLu2dSOQAbb hyLSl9gMo5P2VKSHfp+EE1LtgSO1JWZVm6zusvnSvJH0jSnrttfqDi5oPdj6N3X7Wdid 0zcL60lIAFp6qbas0T52wzqlNHuqWOi5p9tRzGkHft4c1tNLfmWJRyOgNDHov5AEIUq4 S+2feccInF+CBKBJ2/9DT5wsIcKWZ9GCj7+iLo8RK/Eb93DfLRuMqypO/PtNHX2wkEev 5nG6BfyGoshbO0Kyk05TRwPJP38o6oqnDffAO1Ja0MJtbltsbhlDbVedeqPT5ZsWX/op WzqA== X-Gm-Message-State: AOAM530JKdNXdjWKqTPmrsFbARk1F52oylU5+10E8Rboha5LeC57vJwp /Ah5faUyouJZNWQ+DGxfjVihJZatTIeFlg== X-Received: by 2002:a63:d2:: with SMTP id 201mr8113210pga.400.1633064610218; Thu, 30 Sep 2021 22:03:30 -0700 (PDT) Received: from localhost.localdomain (122-100-26-52m5.mineo.jp. [122.100.26.52]) by smtp.gmail.com with ESMTPSA id z8sm4615113pgc.53.2021.09.30.22.03.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 22:03:29 -0700 (PDT) From: AKASHI Takahiro To: xypron.glpk@gmx.de, agraf@csgraf.de, sjg@chromium.org, ilias.apalodimas@linaro.org Cc: u-boot@lists.denx.de, AKASHI Takahiro Subject: [RFC 07/22] block: ide: call device_probe() after scanning Date: Fri, 1 Oct 2021 14:01:57 +0900 Message-Id: <20211001050228.55183-14-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001050228.55183-1-takahiro.akashi@linaro.org> References: <20211001050228.55183-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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 an ide 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 --- drivers/block/ide.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.33.0 Reviewed-by: Simon Glass diff --git a/drivers/block/ide.c b/drivers/block/ide.c index c99076c6f45d..31aaed09ab70 100644 --- a/drivers/block/ide.c +++ b/drivers/block/ide.c @@ -1151,6 +1151,12 @@ static int ide_probe(struct udevice *udev) blksz, size, &blk_dev); if (ret) return ret; + + ret = device_probe(blk_dev); + if (ret) { + device_unbind(blk_dev); + return ret; + } } }