From patchwork Fri Oct 1 05:01:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 514986 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp451527jaf; Thu, 30 Sep 2021 22:04:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRI5+8cUip+j5UflDVRtwD//V8/Yhy5gGUF6Lx1Syw3EzTyxmrV36SVHuoXeuJP5Lho/p8 X-Received: by 2002:a17:906:d182:: with SMTP id c2mr3868753ejz.47.1633064679881; Thu, 30 Sep 2021 22:04:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633064679; cv=none; d=google.com; s=arc-20160816; b=QCpVxpy7C7HegAfczrE6dPT+QoC8TLaMBJtwSQe36fv2mYXzheYl6WZRmii+pX7xI9 yi0DsZbE8f8h8BD4OFfYZZ7pgho/FsNh4sWBQTZqz9BGq1Vrjg8lAHiPEfkoL/wyGvt2 SHU4VgA0rIjN4bhvwcj3qEY+UOqcruJqNC+Jp6qv0Ee57xZEFwXMTlwNQbrx0PHhJj2s XiSvH0LCggyuZXi94CQ54EAGtRlF9NV2vs9lHSLUoWx8HcJ4ARBYjrVK0qbBTYnt/AQK k5N6o3S+BrlfoWiYl/ylpMnwtcFaUFoQzuekvboBFgIvxqMhhVqw9cP+9EtlZGHtQJuW WRHQ== 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=O9pL0Hmq9ZA289/TrCWhV3wB8eKqhp6uxXQgYO+xSj0=; b=EKUbY3rdrQ/j+uYbDp3GjIB9f4U1866uecH+jdY13DX6iUDPTTaVOZ3bX8lJddM4+s RIPN7lacXf0LWZ/gCoh2eYiWb/gFfjmjPJAJzAGb75Btwa4q8VOyDhyW70N1l/yURfBu SNEqfnkXvnTiqaP7hgrbkGUR4uAUWiAbMZI4FoLnJ3adeXW9sBmNL3eWf08lznAk7S4x X3VVGo1HJgErzexEShzZqzdaMVtTOig/EX0dVB5fs9sI7BhO+r6CVWNQH7ytTyzG3LhX QBgzml8V5fEq8JzhHe1o/fd5qGAlCFv7QbxxH22jaknGlB8v60iXYEJgimUpFPYNr6Qu 15UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oSdv6rRx; 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 kz10si3114951ejc.582.2021.09.30.22.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 22:04:39 -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=oSdv6rRx; 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 17F3882DF9; Fri, 1 Oct 2021 07:03:39 +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="oSdv6rRx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7689E81EE5; Fri, 1 Oct 2021 07:03:26 +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-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) (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 8F1D982DB3 for ; Fri, 1 Oct 2021 07:03:18 +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-pf1-x42a.google.com with SMTP id y8so6894097pfa.7 for ; Thu, 30 Sep 2021 22:03:18 -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=O9pL0Hmq9ZA289/TrCWhV3wB8eKqhp6uxXQgYO+xSj0=; b=oSdv6rRxjNcv2pfNyESI9wbJ5/4NCEnJ4NxYLF6/tTagWu2J7brd3ZViAidncKB7ss +lZsbpYN6oyXALRGHpoTcoyzfPCej7S2N5kANMlAYCBqz+MeYADGPCJ29ZLl24MBaJO4 gHNonjM7fwvwvoIu0GbXkMGlDEhw7X/8WCHasl562+wjh9HJFCk6RZgXzZl0NKVLB7kv Lfzdhb0v2LkDLZEj0fPXrhyUvr7g+K4FlEktJPF0DzkFwk0FnC7NXeTJ5ffjacCSpjxW LROxMH5/yyZt/NijiczauosFsQUhIVrVpuqlT//sxPgJSl0sChnv/bT0eAGg/0EzsQuD JRig== 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=O9pL0Hmq9ZA289/TrCWhV3wB8eKqhp6uxXQgYO+xSj0=; b=oT2ojVqWsWE3sk+t1coOL2vEnL25IQ2l3pKW8w8eh6K39Af6ywzo6juSru2FNcQ4Eg 2+VR8KZB9Uo4u1tZNOg9RKHGqQgEqVla4JliTkhNxxK8UkwJgf3HCbfc4L9O+v0Zcsyr +hBNsz5GZAQPaGYxIpdZ2i/tpGAb+Ze211SblZtuvhuQrB/rV5TYXPJp90VqxS+CBbTW toIDwgoPmMV5ExWs3jX2I5vwWfIyF5be8JYi94BREJlhN73v82qoqaL0ciC/E8ETOQ+C PqV3sNb/RhUQST3r9BKMbNSR72SaKo78hgAZPbVM9seMWTfeeOlhqPLItoy4ryse+DgA yjhw== X-Gm-Message-State: AOAM532rn5zoIvdxWrNmVwaqu6vm578/5AaHdMNu1Mmeq7Yjtx0xePw8 o2Ah/9rksJPMsJWNcOAknFXxXA== X-Received: by 2002:a65:45cd:: with SMTP id m13mr8358031pgr.26.1633064596714; Thu, 30 Sep 2021 22:03:16 -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.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 22:03:16 -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 05/22] nvme: call device_probe() after scanning Date: Fri, 1 Oct 2021 14:01:53 +0900 Message-Id: <20211001050228.55183-10-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 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 --- drivers/nvme/nvme.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.33.0 Reviewed-by: Simon Glass diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c index f6465ea7f482..975bbc6dc3b7 100644 --- a/drivers/nvme/nvme.c +++ b/drivers/nvme/nvme.c @@ -909,6 +909,12 @@ static int nvme_probe(struct udevice *udev) -1, 512, 0, &ns_udev); if (ret) goto free_id; + + ret = device_probe(ns_udev); + if (ret) { + device_unbind(ns_udev); + goto free_id; + } } free(id);