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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0759C433EF for ; Mon, 4 Oct 2021 03:26:57 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 3DAC560FC4 for ; Mon, 4 Oct 2021 03:26:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3DAC560FC4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1DCE5834D8; Mon, 4 Oct 2021 05:26:54 +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="B0WiLWkG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 53171834D8; Mon, 4 Oct 2021 05:26:52 +0200 (CEST) Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) (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 0B8FB834BF for ; Mon, 4 Oct 2021 05:26:49 +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-pg1-x535.google.com with SMTP id h3so4578952pgb.7 for ; Sun, 03 Oct 2021 20:26:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=wUYUkEQ/X21P5mzl7y0Qw59slGifThHRSsxnXIl37xc=; b=B0WiLWkGtWzcuqOgQxNEGwpTdLpitNFZEdanR3hJrB7zhqbIzLKB0tqmzbxN9/bjMU DzLkdZ6+FiZWLjtb7QGv4EbXaNE7q3ldlDCxixmdtTrH/pK19/4+Z38LqsmCYVOw8Fkq c492I8339mi91LJWjXT3dQAcUEtcP31ov1FLqc2eTveXvh8Wxnpwk9p9JiTw8rOAKVtP IdLsxNLDDImYvTQK8XtyYPFUcHOgCDwDfiZ4rC+/Wod/DSpYev8nTn8pBdWOCOgJ751V asJd+4z0bylwFpeNuOiAfzfhHnNwxPxtqyrPg+HIM4VKC3GaaZ+tmrdQqBUCj97ioNWS ZuCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=wUYUkEQ/X21P5mzl7y0Qw59slGifThHRSsxnXIl37xc=; b=v2uXkMOztc2HVRVyOUquqptz/g1I5BMr6VaQawua4WVxQJkuscd4ShbpzUmlxWpFEO XDk0EOhEyvsEkQmeCaZaTbZosV9+W7ix4cIvK4f5rXpJiyEb0gquOryIw/stOpcLyfzs cRPK94aJi9Zrc3cSJF9yrXvDm7YQ/fhglnD7u4903+CIOkGPAQJvy5TWFnmzozeUrrhA UnB7Uh2+ygWg/pfSIk/SRTz4O9TmJMX9T9T/m7cxl4OLWaVFf6v/D9KcPOpADb1bvefh 7ZXUPq0BGPJV36dBiZDT3gcaPyPa8aTKjc3VOWSnAO4+rQf8TxH3gR5/YGR/GLIGqGek yduw== X-Gm-Message-State: AOAM532p7tuhgqWXA5plgXC3MyfM2zJhCZ5Mqr9ITOLMHQchb5GCatTH 9XbYbxu50LcWsergsfBMaqbELA== X-Google-Smtp-Source: ABdhPJz/G3yI68by4cgwipJ9pJj0h8YKzBUnShxY4S8cc5lcVTyt0YJYYEpgXjvfTv9zJZYeflc0Tg== X-Received: by 2002:a62:1d4d:0:b0:443:eac2:8a1b with SMTP id d74-20020a621d4d000000b00443eac28a1bmr22295123pfd.2.1633318007281; Sun, 03 Oct 2021 20:26:47 -0700 (PDT) Received: from laputa (61-205-96-147m5.grp4.mineo.jp. [61.205.96.147]) by smtp.gmail.com with ESMTPSA id p189sm12420166pfp.167.2021.10.03.20.26.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 20:26:46 -0700 (PDT) Date: Mon, 4 Oct 2021 12:26:40 +0900 From: AKASHI Takahiro To: Peter Robinson Cc: xypron.glpk@gmx.de, agraf@csgraf.de, Simon Glass , ilias.apalodimas@linaro.org, u-boot@lists.denx.de Subject: Re: [RFC 01/22] part: call part_init() in blk_get_device_by_str() only for MMC Message-ID: <20211004032640.GB39720@laputa> Mail-Followup-To: AKASHI Takahiro , Peter Robinson , xypron.glpk@gmx.de, agraf@csgraf.de, Simon Glass , ilias.apalodimas@linaro.org, u-boot@lists.denx.de References: <20211001050228.55183-1-takahiro.akashi@linaro.org> <20211001050228.55183-2-takahiro.akashi@linaro.org> 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.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 Hi Peter, On Fri, Oct 01, 2021 at 12:48:24PM +0100, Peter Robinson wrote: > On Fri, Oct 1, 2021 at 6:03 AM AKASHI Takahiro > wrote: > > > > In blk_get_device_by_str(), the comment says: "Updates the partition table > > for the specified hw partition." > > Since hw partition is supported only on MMC, it makes no sense to do so > > for other devices. > > Is it not also supported on UFS, and I believe it may also be an > option in the NVME spec too. Yeah, maybe. But under the current implementation, IIUC, neither UFS nor NVME supports hw partitions as both drivers do not provide a "select_hwpart" function in blk_ops. (UFS is seen as an instance of SCSI.) -Takahiro Akashi > > Signed-off-by: AKASHI Takahiro > > --- > > disk/part.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/disk/part.c b/disk/part.c > > index a6a8f7052bd3..b330103a5bc0 100644 > > --- a/disk/part.c > > +++ b/disk/part.c > > @@ -427,7 +427,8 @@ int blk_get_device_by_str(const char *ifname, const char *dev_hwpart_str, > > * Always should be done, otherwise hw partition 0 will return stale > > * data after displaying a non-zero hw partition. > > */ > > - part_init(*dev_desc); > > + if ((*dev_desc)->if_type == IF_TYPE_MMC) > > + part_init(*dev_desc); > > #endif > > > > cleanup: > > -- > > 2.33.0 > >