From patchwork Tue Mar 8 11:36:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 549272 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6713:0:0:0:0 with SMTP id u19csp2539082mag; Tue, 8 Mar 2022 03:38:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzfzPTXoR+jEae8SWXfzN7Ua8D47lM1y3MHUp6jkACRqfQ1EtABnPbF1R3TAMijt0bt7f9r X-Received: by 2002:a17:906:5a94:b0:6c5:5aa4:da87 with SMTP id l20-20020a1709065a9400b006c55aa4da87mr13457657ejq.381.1646739530330; Tue, 08 Mar 2022 03:38:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646739530; cv=none; d=google.com; s=arc-20160816; b=I4BfgsFODuZ829InYzleNIiw3PhX1WxwtiB/zxINKuaxVARJd6dfuvsOGlE8iiPyME +HqYl1jFpZJNaSh12ef3YhCsicBG0cExuqoay8Uxn22J5Tf8O4R1jwVtWRK2Em8hHDAk d9fahf3QerBz3RPT5HPLBgN/uuM2bechUqXXQt9IZ8qGj90LD7LpDjZcGcSFXqUG/DJu wavmwuC1ZZaaXOzAsDmJWOn58Q7mQCMQVJFA+E8uSBFjhho9jpcNulri9GmMzcaeppn1 UwmQqDmiPdLZZcjxKLlLlg927bxCfTpA0qfQQWWVHFjZb5A1GHJ1kRjLCjegCrO2oyEc +aDQ== 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=7B7fI502QBGG0gT46DY/xz3MwNyyji0b6rIngadzTm0=; b=Sxj3x0m9H2TYGBeqUCpXK7jBhDWr/Iw2YCj5QCw5L7JONNWINqvwSgZa1utEnJxga8 22mC2fyK3/HyOAegwNjmDO+w5o6h7yrCA39q8nVEdf0XO19I9szq9M2TFOGAlHAMGlji 35/1tkUouRWUlBZOSX5W9DZ0Q/MfmU1nYfDQri/jVtM32HlPFhSxRGbAQaTdp8oe1qxR H7rrC+twLsMJk2X5+UCvWyUIovnG6QQOrWfG74ab0ogPBl+iN2lwjNUyRCSlngU7p73V ia/5LL6UOhsuA+aeMZ6YM+MkL6dd8yhAY+Wosp0iVvdrFIMgo4TtbU7tPi4+IyMmMb3F g7gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SRcQRDtA; 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 ka11-20020a170907990b00b006d20d00ef34si9136588ejc.741.2022.03.08.03.38.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 03:38:50 -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=SRcQRDtA; 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 D836E83919; Tue, 8 Mar 2022 12:38:44 +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="SRcQRDtA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C705C8397F; Tue, 8 Mar 2022 12:38:19 +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-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) (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 5E90683936 for ; Tue, 8 Mar 2022 12:37:58 +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-pl1-x62d.google.com with SMTP id n15so6830718plh.2 for ; Tue, 08 Mar 2022 03:37:58 -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=7B7fI502QBGG0gT46DY/xz3MwNyyji0b6rIngadzTm0=; b=SRcQRDtAYUYYksoNmrvlX6B5K/Odi2n5cjv6DElw4zxZLQefeY3R1h/szH/B4z4IOt ekA7Dn513mN+yj/uOUP2APbqsAJIAoIlANA/hv8WBTmpE+vWNlvQ2sXwRMtWwz9PqszZ hucDeFuo9vyFLcQhFrb/JHIXfpnIg2ccBmTQS/hcHklfpE4/iGfR8TwvEeghgrrFl7iQ Y6gZhxrxHjZ1XVW8zLazc0L6ZwBX/nA28rX92d1SUSZZIDbFh8pakqlMtN/MBziDksJi 3Lkp27AAAP6TLb+I4pF3Kmc310MaX8kBxq44nMr3JzEfxXPvMuCkUT5HtRactkwW7K8w oc9w== 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=7B7fI502QBGG0gT46DY/xz3MwNyyji0b6rIngadzTm0=; b=aZTvQ8vkDCzNtG8kh0/0XSCMvWTLJtnx6C1+nlz6WRWRQ5MhVQTWS7XdIfXjkFm8UP KusXU2M8wDNdf3f555iVJSaitLKbIDWFlPgLYrifaE/7rRSCU2AS0pVLNIdDSsfFzDIy 7MusV4l9aaoUjhAMl1CzLB03ERoJj0lFnwFoxZ7KRbn3KblX2JWa0YGrJzRRzl4iYH0M LAa33pk1HBw9Lf4HvVCDU/KX/Dtqdg41yPDNXXUznTmiCWUXdlEIy9B/5sJGUvLe3G54 HNa04l9nB5HE/kycGX+XSPhCdzelf0MNVPX6AjYHEcmZw//tyD2aYhYS4ziVWVfktjwC BRXQ== X-Gm-Message-State: AOAM5324cyj3bxjtM/0NgajVH3fAog9zGAz59yAhnPbdCV7Bf+HZpVNy DfqRleuHdG7W5naZYPUlt6k3cw== X-Received: by 2002:a17:90a:1596:b0:1bd:4af:6055 with SMTP id m22-20020a17090a159600b001bd04af6055mr4236928pja.139.1646739476820; Tue, 08 Mar 2022 03:37:56 -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.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 03:37:56 -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 04/19] nvme: call device_probe() after scanning Date: Tue, 8 Mar 2022 20:36:42 +0900 Message-Id: <20220308113657.221101-5-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 nvme 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 --- drivers/nvme/nvme.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c index 1d56517e9969..a305305885ec 100644 --- a/drivers/nvme/nvme.c +++ b/drivers/nvme/nvme.c @@ -884,6 +884,10 @@ int nvme_init(struct udevice *udev) -1, 512, 0, &ns_udev); if (ret) goto free_id; + + ret = blk_probe_or_unbind(ns_udev); + if (ret) + goto free_id; } free(id);