From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1C94C433EF for ; Fri, 1 Oct 2021 05:05:05 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EC6EB611C1 for ; Fri, 1 Oct 2021 05:05:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EC6EB611C1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 862A182EBD; Fri, 1 Oct 2021 07:03:47 +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="PePSl2+d"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 573E582F08; Fri, 1 Oct 2021 07:03:30 +0200 (CEST) Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) (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 700F682B9F for ; Fri, 1 Oct 2021 07:03:25 +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-x52b.google.com with SMTP id 133so8383306pgb.1 for ; Thu, 30 Sep 2021 22:03:25 -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=PePSl2+dpjrvDUiPtY918ySDfFdiWKT6A/mlR2A7hfMyVvbNk2EAEv6kjTQDEBHhV6 nmwqt34KutDWRMfBWNkDx4Pd4D1O33mA+x4D7ePIJTAwXJP49ONLm3wZ+NAObXOtHLCU GAb2NGa+20OY3bgsyUP0mcTK2ULJ+SypLpoPvJBXmdO2JODUSxw5Xlf5yr2OPnQFJP6D sitfGOZac12QYhYUyo1qRtDV46XDommz5Q7q4GiRNhRpTJipbqSJSkfAPns8tv9/XdQm KMO+8sDb5CmnqauhGqy3OWXubEPx7z8bBDoMUhL32qAvz8utkkqNgPwjz0SJobx5tHg8 RWfQ== 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=RocKRBFWmPXr9pVNga4qzrrEYQXrSxcZ5p8hxRFiLDqMwD+sKhu4z5i7uvSSgrL8Ba YhuPetwhkKp0Yo40fN+VBs9RQeG/aC9ZzV384I5+1NmhFUncfUGOgbXM2UGCxh4lbAKB ewC1uDsuKTZOiV7tMm81jRNg2jfmOywJH6yDoLQqUorclAsn1vftvBITDdG++Xp8RIKg G9Ddq5ZvmUsyVDrLB333XKnqzdrQ/75sCrItLXbhYiQ/bVaxYVp4wChnntR0fN03J5Wu wdyw9NscclgjFTLhgYN7R14wQhBAjkWAghjjMhKCfdlFWtLs4TGgP4XOHJ5/GEVonjuD A2vw== X-Gm-Message-State: AOAM532TRWBb8PwJOsdAlTN0SjuphBF5H/jP2EQ+sIuy79KQgwi7LrjP DxRYxv0cL+UR6ie/O9ASAlbk/Q== X-Google-Smtp-Source: ABdhPJw8z2VTtddSJofxiw0S5S/EV7syeksvisvDPZZTeEbgf+DvvpPi7idB6Hi8mXhnmIjETRe62w== X-Received: by 2002:a63:4f:: with SMTP id 76mr8041498pga.457.1633064603624; Thu, 30 Sep 2021 22:03:23 -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.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 22:03:23 -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 06/22] block: ide: call device_probe() after scanning Date: Fri, 1 Oct 2021 14:01:55 +0900 Message-Id: <20211001050228.55183-12-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 Content-Transfer-Encoding: 8bit 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(+) 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; + } } } -- 2.33.0