From patchwork Fri Oct 1 05:01:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 514985 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp451401jaf; Thu, 30 Sep 2021 22:04:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz34bsD8JvSJNxVJPcgvSWiwoVK5KsMcwp9Z7ig6X34H6ZI8C28EZ5qIF6kUOpe4Sn0sdrX X-Received: by 2002:a17:906:3542:: with SMTP id s2mr4073132eja.379.1633064666233; Thu, 30 Sep 2021 22:04:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633064666; cv=none; d=google.com; s=arc-20160816; b=USID31yC7u2vMyfIQqkYKTAPMEeT3xhDYppw8/vtxJ+USb040oJSP+SdRxslvOaxuo 2fXmuTYRMXWnDpvjnniTnkwkBiVeu8soSow9wBAFFEU7BrItm7eCfjEpbha2CkhbSR0Q xyr1BoaElzhH4trw6PXGjQLTYuBo7YToHXISTRXHyaqwVvgC9m24ToqtOrOSlC/r4W0X Zq5+UHSjzvlbuMYdIOiNi1/luOT2ZcMyoWuktK8DykIajqNW8PtDeaUjiGsu6PAD4/tL fkVK9awz+EUYoHBnPg5Bijmc9rN7PqNrV0KXIvboypqAOcIqIpPUeUgdzQx3JkrnhoC/ WDSA== 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=H4XrywqspOR6Z3BtMLOP68ZCdQ9oymU/uuSSNdkRJa9HmFPiKI8JtbIYRgGy+Q51aC yndY/7EdOEgv+x1vidWTQvlJItafhqcDn594OVWzZM8AJm0/lyPPPa1nXXyphWrlJ/iY Ptjsl+Nid3G8BR2rq5bbTBeU9sGnbwvUAIMkOCOJzRYpeuaf7oWCNsG1zWt9cYnd2qHi EHuR+McppxZlM4GGuTl+J1hEjnB5DtnCfO0WTR4xjFPVx35k1Uqohdsmc3XPxY8dC4No HEghp9M0D7FJa1nU2C4Pu1F2EqMhH/jcc8CNeX99lgj+v5jpCYxQ52WI88Zs4Apy2j+V tSxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RgsQuQ6e; 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 p16si3829211ejy.242.2021.09.30.22.04.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 22:04:26 -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=RgsQuQ6e; 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 F2A8683130; Fri, 1 Oct 2021 07:03:34 +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="RgsQuQ6e"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C028682C89; Fri, 1 Oct 2021 07:03:19 +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-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) (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 A91858169E for ; Fri, 1 Oct 2021 07:03:14 +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-pl1-x635.google.com with SMTP id t11so5525258plq.11 for ; Thu, 30 Sep 2021 22:03:14 -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=RgsQuQ6e0gesrvEKIYA6BFfPd9/K07943UlwgKnKRwPsapUzovTm/FomJc0wPhgy+5 BGYvL9gIiBGfEL9AkOdkGAa8emGyjh+X4FXjZQ6sCwGXqnkucMR6fIiF9D1Z3ULqUlOw e3xIDNzGX0e58PxZ0+3512dgpBD33BfXI9XMz6SvaMg1PMCXm+dpwhFG4eJccam6kZXj XvxBhojq0zhwqhxbcK6iWy6wMKE3O/sKJ2DGFv9KtLyi4ZauJ38A4oaYRo8DvqTX4FSs 3zZl3MsdONe5nDGLIyLGR0e9aeLa8I0qpMFEivyG6hwCY2v7Itm075FSEPelAyGzktib 5MVQ== 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=CIR4CLAhwWdSqEQf4LetdU2CjC5Rs1h4TQeF5RplLHFo/Zd6kLW49MEeT3IXHpGeht HVwBoqoAXTnCC33OQmSTbF/j0MS35W+dQDcgBtt2UHRXkc7abMl1E/ntq+LaM7yyxCfu nB512I/X68o7xKrbq2dMVIpxMZJ1p+8Q5DAHoUXBArSLAgwMm3XhVT8z7KluRRuAdwVq TJ7h407QdwkHu8KaYEGiC21uQbY1rpJGO7FvXCCGfKvEN2atGOHgciTj2ruD316L2YsN ATOKyQuBzdNTpQf5LZKqdGY9OJxn881lDtGCtCEG2uResZ++qSC0aW7yCSBPgLajwLM5 J+yQ== X-Gm-Message-State: AOAM5311Xg+x+3y2i+ZhsO1efz9frHNHkJ1aTkMbygHLt5KokjiaGqvw zyi0zWgkDNwKEhys/PLgCEbpig== X-Received: by 2002:a17:902:8d8b:b0:138:e09d:d901 with SMTP id v11-20020a1709028d8b00b00138e09dd901mr7910274plo.34.1633064592910; Thu, 30 Sep 2021 22:03:12 -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.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Sep 2021 22:03:12 -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 04/22] nvme: call device_probe() after scanning Date: Fri, 1 Oct 2021 14:01:52 +0900 Message-Id: <20211001050228.55183-9-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 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);