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 5E54CC433EF for ; Mon, 4 Oct 2021 03:45:53 +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 DCCDC611CB for ; Mon, 4 Oct 2021 03:45:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DCCDC611CB 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 A0B0D8355E; Mon, 4 Oct 2021 05:45:33 +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="N/JHdGTJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BBA9683539; Mon, 4 Oct 2021 05:45:28 +0200 (CEST) Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) (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 8A3808355B for ; Mon, 4 Oct 2021 05:45:24 +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-x432.google.com with SMTP id m26so74714pff.3 for ; Sun, 03 Oct 2021 20:45:24 -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=N/JHdGTJEMYUcFzW/YLVPfzYu5BB+Ckzf8I61fgs2gFKEZTLm/fAN0fcbaCg8nEJ1r 8st5pnYLVsdpaArldbiBGhYA7k6f0rdxOFlmJcdK13tnRXiOaKQnwPCHLJLtf3RP8IXX CkdvIfBQQa5Vb7jMzmzFwsJQwuOrGysUIKz0fzGj2bgLhymYjcsPbrTWTAaJfFBxYLr7 tlGyVpwbbNx7wlTxGDLQj9g2GcJyoQALfhB2dF/wxUauVNQxKpEK4UmALBB6XSvfJeLs iJ3XHINPVKPI6ffBQL82cCGTQeveDZNpT30KLzWPti64Nzsba/+9PA1DFjh033U8ntV3 LxSw== 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=1+9pW0Q4qRpZtHiKNgZu62wiiwtZSwEkh5DSqtrjlYA7Vplsg6MBJb9uKGXWiTUO57 vUBdM7xFy4VA2YtZ0WwINTv32lmZlJAj4grJFzEfzA4RyN46b+O9sK+F2gNLpRP54b8W m91pm3n4c841PBixfsoMTsLYQrT6PkALabkz0+wEB2PJtFuWh7HUQGjHiMLCOKvbpEuu n8sVZYBs5bg3KR0KmpP9aJFt1uq29Djfgt+kBT8kw+O+a0+d4S1Gxj1eJU5VimgRA+Je UBnUBEVndKhdKv4AZgpcPkNs60uAnkAxt/Zv/xRWjUz793pcxTnwPOyuA5wLS2XXL8t7 Ptlg== X-Gm-Message-State: AOAM533dqVGPgjIpl1vFO8mLwNnzyRm4K9Uu/lJ/dAh6lbU+I9+vWQgA //L5v+KU//X47qq+/Sr04BJ6uA== X-Google-Smtp-Source: ABdhPJxoBRY8hShXDiTZe9eUUVdJvR9/cyP+WzG9gHymUHrfSpgVBB4iLeL+/mEotxw/qNhVohCr1Q== X-Received: by 2002:a63:4d20:: with SMTP id a32mr9012153pgb.247.1633319122906; Sun, 03 Oct 2021 20:45:22 -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.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 20:45:22 -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 05/22] nvme: call device_probe() after scanning Date: Mon, 4 Oct 2021 12:44:13 +0900 Message-Id: <20211004034430.41355-6-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 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 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(+) 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); -- 2.33.0