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 8CD8FC04A95 for ; Mon, 26 Sep 2022 00:05:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 97FF0848C2; Mon, 26 Sep 2022 02:05:19 +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="lp6EV1DO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3F2C0848C2; Mon, 26 Sep 2022 02:05:18 +0200 (CEST) Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) (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 F2AB8847F4 for ; Mon, 26 Sep 2022 02:05: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-x634.google.com with SMTP id w10so4746737pll.11 for ; Sun, 25 Sep 2022 17:05:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date; bh=rUpUjh0rjgOekpkcsJovgQ8toQj23IxBFZRaVmAtYQU=; b=lp6EV1DODRYBAapaqdHx2BtB/uXOYsJ1C5KEQxCmaPP6SRIOtIT6va64tB3C5hjj8h HgaGk1ldroX0Fpa9C6krBkE0zJHQUZVeiO+S3soZCgjdDluBVXdl6Gw7CD0WcSCuZh14 nE8DR4kMy1Mrv6jAyFfHjebfuR7Cai4no91TryrwcgKiNLd0eRIERa9W+b/As75HqOHV bPXcB2sKgVWLrZ7lpMZHTfllR0AAJ8ghKYh3KieVqKuDnIx3xz54HGnE9GbAh5HzTlM0 or1b1qqjhpGVnSR10SWqxuDStBQM5HNtQu4J6hsAzgqgAk+6RVxzN1NQhFMXPKcwGjPU BzFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date; bh=rUpUjh0rjgOekpkcsJovgQ8toQj23IxBFZRaVmAtYQU=; b=J56lT5TOGWGdudOIc9oPOEae0Q3QucEFC2S7Bzr4cp6umKFl8OnYaxV9fRHItNDZnJ GCpVeW6tYRg7CKWTfbGYzKiHb5gtz/ytOPvWFJIN5YKrwjLl+6dqTgNobEAQMa0ASgx/ ahAM655Y4ipZ81ep0edrIe5oqwkc6YZT/PjhSVgaOEJ4ozafRQzh+DCTJ4BQ3MY/t07/ EpJcuGrcS3FuOFArsHZRiyl1aW9Lap4PBb6n9qThHtcmoFQhRKSZ4i8YNdC1hDyO7oFv fQJ7BER2eEpD+MDtXtbRy0pm3m6/4EbiWwwbyH6cbLzmQoJjF5agjfn4Qm6vKbL0nx/+ 9bDw== X-Gm-Message-State: ACrzQf1H3WsFmleSrQuaA1xgtsc4VpgF83zAs9mIet0SDz7tsj/DLL80 muzYvxr9mRBGq5ZAF1fBysS5Iw== X-Google-Smtp-Source: AMsMyM7PV3po4KvSYkWi2hOJE/rDn3KgFzzUcMwZxFm+822piCfqM2EXzqTbW4OLx1+7NdqUKHzD7w== X-Received: by 2002:a17:90b:4a48:b0:202:9bcb:b89c with SMTP id lb8-20020a17090b4a4800b002029bcbb89cmr34585893pjb.161.1664150713068; Sun, 25 Sep 2022 17:05:13 -0700 (PDT) Received: from laputa ([2400:4050:c3e1:100:de10:5d34:d7df:e257]) by smtp.gmail.com with ESMTPSA id p7-20020a170902e74700b001769cfa5cd4sm9922521plf.49.2022.09.25.17.05.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Sep 2022 17:05:12 -0700 (PDT) Date: Mon, 26 Sep 2022 09:05:08 +0900 From: AKASHI Takahiro To: Simon Glass Cc: Ilias Apalodimas , Heinrich Schuchardt , Masahisa Kojima , U-Boot Mailing List Subject: Re: [PATCH 2/2] efi_loader: fill media_id from block device descriptor Message-ID: <20220926000508.GA7925@laputa> Mail-Followup-To: AKASHI Takahiro , Simon Glass , Ilias Apalodimas , Heinrich Schuchardt , Masahisa Kojima , U-Boot Mailing List References: <20220915200242.18358-1-heinrich.schuchardt@canonical.com> <20220915200242.18358-3-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 On Sun, Sep 25, 2022 at 08:15:36AM -0600, Simon Glass wrote: > Hi, > > On Fri, 23 Sept 2022 at 01:08, Ilias Apalodimas > wrote: > > > > On Thu, 15 Sept 2022 at 23:02, Heinrich Schuchardt > > wrote: > > > > > > 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 > > > > > > > Acked-by: Ilias Apalodimas > > Still a NAK from me as we should not add this to the desc thing. In addition, I have already raised my concern about Heinrich's approach: https://lists.denx.de/pipermail/u-boot/2022-September/494764.html -Takahiro Akashi > Ilias, we talked about getting the next step going for integrating EFI > properly with driver model, which should sort this out. > > Regards, > SImon