From patchwork Mon Mar 16 18:30:27 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 2015 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773685877; bh=fVNmMixBAhygIufPlKImmrp0YXs80O6C9TlRUaVRFAs=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=XLXkMXkFTaeczTjY/m1iejSQxtmBAr+ogjn/QrMN9kkG7B0Y45reV+vl78n+2glF3 UQkwWjPW4g9y4dcaX7/MZ6ASe28SPLgyLkQuSg3LylOcp0rPux4X+nOqyFTtnJvEq7 1aUyf5bg+tOpSCGs1SLMoAPb7KNypN2kSf3ZDHQIO7p3lGqozFwO8Z6+wDjiNEC0WX 1trYnHhvRko71+0+Do3kmpzAQT3P7Eyx2X1oz63P+54gNYvR7svhv0TjIKfh7RaNsD /ywGU/wCKcql3OWK3+J2ptzr80gA1AOqvP2fkF4ORxnDmVTXUAc8xyRVkK3VTOq2IA hPLFzmrWk23nQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C2B276A0AB for ; Mon, 16 Mar 2026 12:31:17 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Dy6xScVbAW_t for ; Mon, 16 Mar 2026 12:31:17 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773685876; bh=fVNmMixBAhygIufPlKImmrp0YXs80O6C9TlRUaVRFAs=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Phi+Pz8tqPfXP41rNV6VbrTXdSuJyEUaCDBRZbxzHcpWT6RDiXNSJ9R6yLmhkOHuX o02iFxZ/IaNWOWe5mcFoum23l/MkBDEyCKgwm0gRfIijEwK7ukBaoFpBoXHVT80jJ5 jmwu6F4E6vXi354wNCJJmy/rvWUBjtzVJ9lFNwY8K5F2E+ALtKwQjgd3RdTJ4DCqy6 qP0dQFLwiFmcioFO3TOeUwg/yrFqZMoCeo+FF/G54Uz1kPLPYOJq/7LF4MxsV3XT5Z vz5Z6HM2BNWKnrsULD6c72UcixjVwdgMhZ50lB1rbhHba31Rm8OSc2xVVegXR+ZmKk Ki6R7o96/Jc0g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7E4176A0AC for ; Mon, 16 Mar 2026 12:31:16 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773685872; bh=JpPuuj/5BrLctW18NGU1yEBDFfuYHiLGEXwJ4bWHgYc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UoeYAJNzI1szWMhZPuWNys55ZbVOO8OaEUMuryTik/ycEDf3MSBwI4AKAZ2wNcHxK XDy+LPvZX8GVtM2UennlmnK+EufEyDV7hcKmYeoEiJnHgUIeaWCjVEBGTqLK7m439+ /7chssCKdgfsqzc4JL0CLFen7aqFnrCw+dcN0SxQKp7ybVak3Wuz6L7eB26ljKkTb9 VXPQx1TpZL2aN3AP9mQpcnKfhfJD53oDdelm2CkePgZtW8rqD/bTyzV9oDDAh8P0K0 fYV6VEA/yWh43X+RL16huCPU0meEoLgi6ST7zvbfUMZE1GE2sgfdq87YjxrMuYyzv6 7+bAGZp21Hs3g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 67E516A07B; Mon, 16 Mar 2026 12:31:12 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id tVAVVUxMmWvC; Mon, 16 Mar 2026 12:31:12 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773685871; bh=qLO6P5qIq3ggthvDHRPGDmpsI8vNcJVipGwiKU4vRYA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p2FY/kUxkdDIeW7WqdaW82ymB38iIPaEhu1PKgEQdjs+aNdFUEjgHST4ILzOg2UtJ za/OVawTrzHE9xq7oFhu2/FdbKbNstlCLWLSiRJcZYEYRPN5vkxoDwtFlcdCT8Xfg/ UreZh1Ahi7lV4/gHVNuu5/JoSqe4xYl5w2EDi/idS51OW2aV/IJMUw96AMPtOE8QFN Z8G9hQF5+PUsEoQ63B4uTCOK8VuyArEvB7Sustca1jNRWkKqYfvyRj/QEDGgg4hYYO PVYDpGMMkz/q0r1kHe+LxHQf4s2p8QXUD1Bx53MNttLH24lUs9Mo8DMTC3reF8g1Q3 ZDMR+2jggcLyA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 32B8E6A081; Mon, 16 Mar 2026 12:31:11 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Mon, 16 Mar 2026 12:30:27 -0600 Message-ID: <20260316183050.3855921-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260316183050.3855921-1-sjg@u-boot.org> References: <20260316183050.3855921-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: QRPA4HMM6YMUPXDCG564TSYHRYBLDBOA X-Message-ID-Hash: QRPA4HMM6YMUPXDCG564TSYHRYBLDBOA X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 04/17] vbe: Propagate probe errors from vbe_get_blk() List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass vbe_get_blk() uses the updated blk_get_devnum_by_uclass_idname() which now returns the actual error from device_probe(). This replaces the generic -ENXIO that was returned when the block device could not be found, making out-of-memory and other probe failures visible to the caller. Signed-off-by: Simon Glass --- boot/vbe_common.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/boot/vbe_common.c b/boot/vbe_common.c index f9368a6a9ab..dbbbac3e96a 100644 --- a/boot/vbe_common.c +++ b/boot/vbe_common.c @@ -23,10 +23,11 @@ binman_sym_declare(ulong, u_boot_spl_bss_pad, size); int vbe_get_blk(const char *storage, struct udevice **blkp) { - struct blk_desc *desc; + struct udevice *blk; char devname[16]; const char *end; int devnum; + int ret; /* First figure out the block device */ log_debug("storage=%s\n", storage); @@ -38,10 +39,10 @@ int vbe_get_blk(const char *storage, struct udevice **blkp) strlcpy(devname, storage, end - storage + 1); log_debug("dev=%s, %x\n", devname, devnum); - desc = blk_get_dev(devname, devnum); - if (!desc) - return log_msg_ret("get", -ENXIO); - *blkp = desc->bdev; + ret = blk_get_devnum_by_uclass_idname(devname, devnum, &blk); + if (ret) + return log_msg_ret("get", ret); + *blkp = blk; return 0; }