From patchwork Wed Feb 2 01:08:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 539303 Delivered-To: patch@linaro.org Received: by 2002:ac0:f7d2:0:0:0:0:0 with SMTP id i18csp1191242imr; Tue, 1 Feb 2022 17:10:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzSZoVxXEk3qNvaMgrMqdYQKun30buCNvRpPwa0QFByzu35pSFcJp9/2UN3ngXog+jZCyWn X-Received: by 2002:a17:906:d54e:: with SMTP id cr14mr23768886ejc.692.1643764219292; Tue, 01 Feb 2022 17:10:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643764219; cv=none; d=google.com; s=arc-20160816; b=IXObOR7CsvjkXu+9z9JlDsFcPjhXd8QeYUy9tQeS1RRQtcpd+xcziOM4UnvhSsYFa1 LaFdOH5J6iX1mrDFuGOYxW0jMD3v7kJdNt82mwzc0DoyE2UGVr+xIqiD4v8eA2hTSXcR p3ZhVOwDUAS7bRga4VfQkulHcl1+UbsofC2J40QGaMeMYcN/zONOdovHspF0VUaMeZUs pTzFpAsEaBA+vpzOGywlOR7Gedc05Q3/z5G4XNql4+2VXnwY7nKBi5sndqY0zC4SNDa/ /vTe39LIudrsETA/C7rRPFAQFZJissY1lMgPUxVv/K+QpOgqaZnp+WJ+Wq4ebFdAuDzM AW2A== 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=bl8C1X+TOksXaJYBdDnrMAHxXq6nwVHHyloe9nAVxDA=; b=h8yvs0k8Cc4hAXpMrBkyfwdJHeEIjQ7vaTwNllgbNKHknoXxOAO15OKW0Q6adB6yTW +woq1sTui+znBhc/XMoYDq87DlkicRChpSOXFTOfrmaLO6rSrL6MMT8MS9Qa6noU7PLX VYrE+q/6+GVucel1aDgrISwQICNRUIEVVFEVcsLDafDnYkyb7HzKu101tOTx4doLyndV 8IGMby+kVTvR6TaCVuBpR7voGELJPn/jnKfha+Tmr7HKs6r6NaWelp6Ihz2qTe+dPcTC f04R+sYonEf/S3Z6tl8glyjSFx1eLM1A97RA8K8RpAlgE8XCKdfXf2So6zcBiScWOZT9 4NLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FiUSFygR; 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 g9si12393396edz.41.2022.02.01.17.10.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Feb 2022 17:10:19 -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=FiUSFygR; 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 70936838A5; Wed, 2 Feb 2022 02:09:51 +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="FiUSFygR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 74354838A4; Wed, 2 Feb 2022 02:09:49 +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, T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) (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 BDDF483845 for ; Wed, 2 Feb 2022 02:09:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pj1-x1034.google.com with SMTP id oa14-20020a17090b1bce00b001b61aed4a03so4402204pjb.5 for ; Tue, 01 Feb 2022 17:09:43 -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=bl8C1X+TOksXaJYBdDnrMAHxXq6nwVHHyloe9nAVxDA=; b=FiUSFygRUCxjD8WAA1ZRIzHbOmY9fAi3LI6gSRNp9RixbMhqrAh9EuaAIwV+9UjHQL DT01GK6oZ1CQcNTjv8ddRKvKjwr9CbQRjWi7pq/yg9Et0iOYopA8b5khWZ1fkvEx2jno gFxyY7oNdIUBJ16Uj7/l5WWuFvpT61it64QloIzlC7s2gKlyvSSRC3XlnJ3eZipxkKZB izNroNnl1YG2a31J7ulOg0iZqsSW6CoOX9Jl1eJJqq/lzDQqzbCuA1fKhoRQXQ5ZOmIq 3eYHCN0JZJvCE4Gkg2vRsiRL3cLG0Sf/OK6evHPto+W2tWK0fTdBPR3WJR/OxLs4vYr8 RYsw== 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=bl8C1X+TOksXaJYBdDnrMAHxXq6nwVHHyloe9nAVxDA=; b=edMvfAOjuk9JqbkpciJGYEc7qpg4PlpBv6z4bmJJVNAw9knWQsRPsqb6ew2S554Lkw 8gOV0oY9RC3qovZdHJ0/1wl6nvI7aA1ogs9n86ohMnh7uUmW1VHcWSICuKL+XKtKTo2w XHxMyPgWyy5LB6q1mUZsEq5bWrl/6JV6iN3TiBvdLhh2qxoCGbhGc7z4G1qQngQpA0xm 277DifuZcGY0O/N2v5bz/V+blStm7+wG2H5QRrPzTuI4Zta+7CKK02GZ9l4K9AJI9f6F QRGxZwc8mrEOxup48BxwZgsljmWUO/EJnDKJJEIWkDSWSi9k+l1Q9OKwP3SWfHKesVEL WCHw== X-Gm-Message-State: AOAM530HoHUEEmDsBnBiTaM0j+FANJ5c3XIlA4DJY9OS+wK42R2eZVw9 aWGskBJ0vrVjC+4rTwoC4l5mvw== X-Received: by 2002:a17:90b:23d4:: with SMTP id md20mr5366290pjb.199.1643764182200; Tue, 01 Feb 2022 17:09:42 -0800 (PST) Received: from localhost.localdomain ([2400:4050:c3e1:100:314e:b83b:fa90:7f2e]) by smtp.gmail.com with ESMTPSA id f5sm10761429pfc.0.2022.02.01.17.09.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Feb 2022 17:09:41 -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 04/19] nvme: call device_probe() after scanning Date: Wed, 2 Feb 2022 10:08:38 +0900 Message-Id: <20220202010853.40405-5-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220202010853.40405-1-takahiro.akashi@linaro.org> References: <20220202010853.40405-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 3c529a2fce22..120a0f05a591 100644 --- a/drivers/nvme/nvme.c +++ b/drivers/nvme/nvme.c @@ -910,6 +910,10 @@ static int nvme_probe(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);