From patchwork Thu Feb 10 08:11:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 541398 Delivered-To: patch@linaro.org Received: by 2002:ad5:420f:0:0:0:0:0 with SMTP id e15csp2038760imo; Thu, 10 Feb 2022 00:13:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7ElY7nLCSsM/NOn+nBAmykiK5AHA0zNZOGT/DmtbqvfrIbLWcm/OwxTQC57iK0ewCb8ZJ X-Received: by 2002:a17:907:9619:: with SMTP id gb25mr5461784ejc.422.1644480786844; Thu, 10 Feb 2022 00:13:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644480786; cv=none; d=google.com; s=arc-20160816; b=leDAo9ycydanNe8PcXLd87Tk7krzB5/GPK5kYHYnIQf89OUat/L8ugSUCc7s+CXuLI oeWUl57dD2mOfJmnEzUUD9gQaRNWO2HersjrqyDMR4rh1SbjfkLzNSiMrSeUSvypvuuV GN7wIy6O1yKVJcyb/PXEWkCbqkuQ/SBnZdzbI3C7JGrJ0AzQ6kKcAUGRQ9ey2UFG1wah 8xhEiSQfzwKhEgEh89hw3fyniOcGCpHg39FzWPJcpCWwEda9LyAVcANJi7ZMjDKqASK1 0h+Bt7kXDQNbit+Y8JHGb7E+baytlLOfMzzdzjHAbhLUpMiPKchw8lKa6PPWJasVIUSc QZug== 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=ozhwnzXcx5Y/5Dy3PbH5KJLj073b/371l8ZVkGGglexXZnkSMoe3Mu271eywVWuD6R tkPx4QbWlrYUXOy99BpGl8rCpvFEG4ZHXg+nt3zyr2lZxf+pEAzNMzZ3gUChH6H7MDHX jBOHeQB+aljhrrTlnSVvjPTm202d7V4KmtwwwXThQG6DHA+/Ub0GTKDJ+IfU5vTICrYj 0+pX+6KZPw0NtPi3Vc1cXSx9/8AM3ehKDCFNP8kGSfvTXuRoVoDMrvkfx6do6ALAcd4l hiEZaoSoeBVVkcSn7jGhwzxNnhmduMz2CQ/sStJ55bC+LOLzHekvDB1qSGdSIZQaE7Dg Vwjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rxVUk5GE; 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 qf19si4228826ejc.902.2022.02.10.00.13.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 00:13:06 -0800 (PST) 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=rxVUk5GE; 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 7F0B4836BF; Thu, 10 Feb 2022 09:12:47 +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="rxVUk5GE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5CDE982F5E; Thu, 10 Feb 2022 09:12:36 +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=unavailable autolearn_force=no version=3.4.2 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) (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 D213D815D1 for ; Thu, 10 Feb 2022 09:12:27 +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-pj1-x102f.google.com with SMTP id h14-20020a17090a130e00b001b88991a305so7734603pja.3 for ; Thu, 10 Feb 2022 00:12:27 -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=rxVUk5GEVPwvYSdxTIJnzXCnJUXY0A2e0zaB7EvVRsgx+G5s7ly1rhPYe8wnpx0MRZ CUicXadKQuDuWIhMs/ChF5PQ7DPI30MgSC0YIEpVrvT4W3G68o7KE5tIB7mtqjSk73jF dK15KR22ecp4Yaxu0fBbwwlOnX+6o0IQQIsOJF0YQk0SAxhyU04sqBMzMrcvBj8uTEC8 lJB+fMcHJJEw/lPIGbEnnAS32XjpWTd1UPmc3sGmo+074jlmFBGDFwr5WpN/gi/0oTnY DWv4AqkX2Dx/MEUvN9Z8Gnb+EuacF9V77BThZraonJnJtm45m77xa7aeiiIVAmihdoN4 pIFw== 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=bslBpsv0M1D5guSCwaiIvdfitlU6ovboJhWqDPI2reFRDL9Y1rqMFX7yzAgY3gtAL1 cOxHxRqW8/J2j9b2ZcZ7B2aHpe3v0Qrm8Xt+uMCh0rfykXJ5us16I8f5cpUrKGYRJdyp DPOHAOFAxZfT83xyBpZYUjE1PeNvIyDvqVEkN+5QhLwMHSU8tHd8J/QI2N41H0GLzohf Ru4ID2BRQiMdMzkFXqsw1nkX+D5UIMyvoe3KAmnMVUqnRh5PKy2hVQQMsvI1Q3ruBhgc yjQcsVN93eFRNTqNxiJxwNSURINNZR207pOD3UxIvijjCywy5HTrtXNYLsdpbEdLvcs5 GEBQ== X-Gm-Message-State: AOAM5337TH6+NOpyfzovAeio0vLpg5Gyad1TaEzlDETJKTmtNL6/U9Ek 3sDEmAr7Hng6PnWjm6JTwLq2Sg== X-Received: by 2002:a17:90a:ae03:: with SMTP id t3mr1534912pjq.55.1644480746255; Thu, 10 Feb 2022 00:12:26 -0800 (PST) Received: from localhost.localdomain ([2400:4050:c3e1:100:412e:384:fab9:f24]) by smtp.gmail.com with ESMTPSA id lk8sm1529208pjb.40.2022.02.10.00.12.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 00:12:25 -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 v2 04/20] nvme: call device_probe() after scanning Date: Thu, 10 Feb 2022 17:11:08 +0900 Message-Id: <20220210081124.86612-5-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220210081124.86612-1-takahiro.akashi@linaro.org> References: <20220210081124.86612-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);