From patchwork Mon Oct 4 03:44:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 515135 Delivered-To: patch@linaro.org Received: by 2002:ac0:890a:0:0:0:0:0 with SMTP id 10csp1062108imy; Sun, 3 Oct 2021 20:46:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuk90gExwjOEoWjhm2beYBmgI8Urz7BVuAJcvEjkuG7rtTVhcqOzpKKBe/+bwziN1aItaL X-Received: by 2002:a17:906:3fd7:: with SMTP id k23mr14507581ejj.176.1633319178446; Sun, 03 Oct 2021 20:46:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633319178; cv=none; d=google.com; s=arc-20160816; b=Cpxc4lY/zl12EmHDOYr8sDnvks/xnPv1tc8mRkF+wItgxc3WgMcdXoMQYUXbAiXYIP gw/m79lIrWWIfi0d30+0E2uFSN8Etmm+/lPaphTCm2JunIG3rwvcigB7W5Q+Jsk0I13H n/yapVLl0yu8OKXEk+4pkRbG+CXglDn2GKM+O9Lv3pG+uJfIkWji7Lj4jG7650MlkQoY jiGEwKZMKIMkWHZoUK+nTBtn/oAJO3AtFBKprQ7PXV9FlHxqogWB+zdshaSdUORIFJpy NxLvPUOm+2wxljeyM3usvcCNo4I7lZoeQLR1StW0nd4IwX9HBJkw+69VFQLCHsl2xqgc WvcQ== 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=UE/jyUCiSpAGBNK5JgVt/PHMjUKl53qqj9KMtvnTs2SHRVWRPyDYy+Hclxi5qmSta6 g3hDAcJ0iYYiMSXpmN39sTYE0b22WlA/XrpdkW0/tqAJE4LOmQ4nJ4ss9F5Y667O42UJ QzrFAbPAWoYlfzODwwf0601/oHv/U8JAdSxkARi5M8Boioj3iK/PTVupWbbrlKmTNKAq q/jWsliBHMHGQJ8M/7ERDBLbcVFUPHUSrywSy6ixH3cVJgqqNjy1vIfhKP7QbmRW5+bp EDvoIKzOeEcKhyhl9ZsyQd/b6oENE0B5Rsp902GbeUnv2qaxsKGV/gfJkUyF218S36f5 JqlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KyA3uNxY; 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 v18si17917723ejh.182.2021.10.03.20.46.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 20:46:18 -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=KyA3uNxY; 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 CA14883560; Mon, 4 Oct 2021 05:45:49 +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="KyA3uNxY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8D17883569; Mon, 4 Oct 2021 05:45:41 +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-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) (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 896158355B for ; Mon, 4 Oct 2021 05:45:35 +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-x52f.google.com with SMTP id a73so12323140pge.0 for ; Sun, 03 Oct 2021 20:45:35 -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=KyA3uNxYJ870QIdghviXd4sCHTLPYXSVjQUK0I1eCrtOMRJJ3r384QOgeHLCCaMIm6 d8WUcTdMOeYztdg//BPXHBIWii8PMksxllftLUZwFEEOtnXqnuhosdE4F/+a+Pe/Nr56 zDaFhNWD5OV0RHa9729D3Yx6I3p9BD1BVxkUHHBQh4x2mIlf5CKakS3ZT2U51VW0EJGf aD922Ut+RM9QJ5ENEHQ6ujtb/nAZo1Dc5sL/swlayySo+cRkrEk4GvsCWm+yN0MAEwZR NqCbhPP5YTD1VsNJUSacEUWL4U80WLyrRHlCLPXta5geY3EvGxqh27dmi5A6MYl1Csmi udDQ== 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=EShTy11O32iUGswOVaLHT7Ee+7JaB4ioSuNIQ6DApVtQ3bFY1y4qum3vF3NPcpUiha jpRu4+py5Fum2RFnUHxUCaNtQiLX4MNctq9tLrviD8YB8HF8mrcfo1IUxbaNoiDCKkuL aG4RFgcXUZmkq8/ybOCqiNL84vZu29TmSRsaCytsPTnx9ok5wHMjrK1cZg2gP1IGUKhU Ym23FxluyQPhqwH1ggrz3MfiQ7QYkzdXD87LsUzgXkybBoHBEgAvycEoiwr954ZLuViJ IPQhaYnX+RTuioarnWzKiTnGHL8OsGfVNQPcrbAbnSc7FhjdnVOWiMkBjHKrteAcHvUb 7X2w== X-Gm-Message-State: AOAM532y4+L1KXz7YHxrBnCQJDkiq/UFJUSr+CguGotvRCLQhjRG+xf2 qVpI2c/U/hoGlwDkEWTxVySYyA== X-Received: by 2002:a63:740e:: with SMTP id p14mr8751457pgc.329.1633319133890; Sun, 03 Oct 2021 20:45:33 -0700 (PDT) Received: from localhost.localdomain (61-205-96-147m5.grp4.mineo.jp. [61.205.96.147]) by smtp.gmail.com with ESMTPSA id a11sm11863515pgj.75.2021.10.03.20.45.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 20:45:33 -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: [resent RFC 07/22] block: ide: call device_probe() after scanning Date: Mon, 4 Oct 2021 12:44:15 +0900 Message-Id: <20211004034430.41355-8-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211004034430.41355-1-takahiro.akashi@linaro.org> References: <20211004034430.41355-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 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; + } } }