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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 88DFDC32771 for ; Thu, 15 Sep 2022 20:03:25 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BFFF484B73; Thu, 15 Sep 2022 22:03:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com 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=canonical.com header.i=@canonical.com header.b="q3rT3sSU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A83CA84B33; Thu, 15 Sep 2022 22:02:58 +0200 (CEST) Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A00DB84B33 for ; Thu, 15 Sep 2022 22:02:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=heinrich.schuchardt@canonical.com Received: from LT2ubnt.fritz.box (ip-084-118-157-002.um23.pools.vodafone-ip.de [84.118.157.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id A014C3FDDB; Thu, 15 Sep 2022 20:02:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1663272173; bh=GyDD7tymP3Nxb+ppHBeLYSHHiTx5Fnx05bo6WJQ446Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=q3rT3sSUyWLtW0GnexTyofo7QT1ajIQPr3DdDmUQ9nHx95fzgleHC8Z8tzsxLLSfd gSuHuwcUygLhZQcEDhl89gGHxFz8KRyIMLPDkd+fT2oP5tQctAPW07m+RaBJqhE+uP dwsteN8ENy3vWkWR/ZZcGSRgMSxCBovYntzXciFHkvPnJn1s+D12NmSqGTQsjffUqd 5faXAzShZLENKbavhEJC55AyYtQPY48AoIBarPesmiMCHC4neyFixvNNNqOGzyL6mz bOziPTYOQ4S92cygekGlXHSI3+rK7BV/ZiWS4928ufJXfsMO/A8fiKDnnKC/NPy/wd IhMywIaYILdxw== From: Heinrich Schuchardt To: Simon Glass , Ilias Apalodimas Cc: AKASHI Takahiro , Masahisa Kojima , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH 2/2] efi_loader: fill media_id from block device descriptor Date: Thu, 15 Sep 2022 22:02:42 +0200 Message-Id: <20220915200242.18358-3-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220915200242.18358-1-heinrich.schuchardt@canonical.com> References: <20220915200242.18358-1-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.6 at phobos.denx.de X-Virus-Status: Clean Fill the media ID in the block IO protocol from the block device descriptor of the driver model. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_disk.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index 73745ccaa0..35790aa86d 100644 --- a/lib/efi_loader/efi_disk.c +++ b/lib/efi_loader/efi_disk.c @@ -476,11 +476,7 @@ static efi_status_t efi_disk_add_dev( /* Fill in EFI IO Media info (for read/write callbacks) */ diskobj->media.removable_media = desc->removable; diskobj->media.media_present = 1; - /* - * MediaID is just an arbitrary counter. - * We have to change it if the medium is removed or changed. - */ - diskobj->media.media_id = 1; + diskobj->media.media_id = desc->media_id; diskobj->media.block_size = desc->blksz; diskobj->media.io_align = desc->blksz; if (part) -- 2.37.2