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 D7793C433EF for ; Mon, 11 Oct 2021 15:09:14 +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 01EA060F3A for ; Mon, 11 Oct 2021 15:09:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 01EA060F3A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmx.de 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 A3C49831C9; Mon, 11 Oct 2021 17:09:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="gZQE9l/3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D317783531; Mon, 11 Oct 2021 17:09:08 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (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 C28C482D80 for ; Mon, 11 Oct 2021 17:09:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1633964940; bh=u0GvfLwX5ij5LzjSomUvoGcrUn8XwXsRDQE5AqMeu00=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=gZQE9l/3mM/QHxO0tsFG8FpObOV50r3/pbAWktfB9TVWOApNvvuaWGZl4ZhkU4U1P AA+k3i04jT+BtAypaC36WaCbUrBkaIZ+D4VtRnvJSeJLu46p6lOmb51sUbSrUDY5Vr n9Z81v710I/bo4MWhO56tahRxB9GE4Glc/XpqWuI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.55] ([88.152.144.157]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MtwZ4-1msjI742Bw-00uFcr; Mon, 11 Oct 2021 17:09:00 +0200 Message-ID: Date: Mon, 11 Oct 2021 17:08:59 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.2 Subject: Re: [RFC 01/22] part: call part_init() in blk_get_device_by_str() only for MMC Content-Language: en-US To: Simon Glass Cc: Peter Robinson , AKASHI Takahiro , Alex Graf , Ilias Apalodimas , U-Boot Mailing List References: <20211001050228.55183-1-takahiro.akashi@linaro.org> <20211001050228.55183-2-takahiro.akashi@linaro.org> <26d404a1-92d0-4e03-3c7f-5a34e04464cb@gmx.de> From: Heinrich Schuchardt In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:soTiNFIxx5Q6cc3i675b3U5iqHwCAQdxrxbhAPjheko6d0bnIXu Lyq1sNfjYmn9pWOJiGQFrv88Ki67B8vFo7qmhG8s6QoBZV+r6p2WR6JNWdhOr5FErWmJNTk IccRQWpbgpPxQ/NrPPD7YXG0qz7/TdPMHnJS3xkauFkufk81p+zPrYUOeGJanvQA+j5xbxS c20cLbJsQ4ET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AWxsHlf 6mws1Qvatkhwe1bb/StFUhUOJbFu3PEXKc8Lo+vEys6GYip+RGV6kLTccWRdv9a+bXx0qokO/ 01uO+6K0j53bG8= 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 On 10/11/21 16:32, Simon Glass wrote: > Hi Heinrich, > > On Mon, 11 Oct 2021 at 04:07, Heinrich Schuchardt w= rote: >> >> >> >> On 10/1/21 13:48, 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. >> >> An NVMe device may expose multiple namespaces. blk_create_devicef() is >> called for each namespace. >> >> A SCSI device may have multiple LUNs. blk_create_devicef() is called fo= r >> each LUN. >> >> This is what the tree shown by 'dm tree' with on NVMe namespace and one= LUN. >> >> Class Index Driver Name >> --------------------------------------------------------------------- >> root 0 root_driver root_driver >> simple_bus 0 simple_bus |- soc >> spi 1 sifive_spi | |- spi@10050000 >> mmc 0 mmc_spi | | `- mmc@0 >> blk 0 mmc_blk | | `- mmc@0.blk >> pci 0 pcie_sifive | |- pcie@e00000000 >> pci 1 pci_bridge_drv | | `- pci_0:0.0 >> pci 2 pci_bridge_drv | | `- pci_1:0.0 >> pci 5 pci_bridge_drv | | |- pci_2:3.0 >> ahci 0 ahci_pci | | | `- ahci_pci >> scsi 0 ahci_scsi | | | `- ahci_scsi >> blk 2 scsi_blk | | | `- ahci_scsi.id0lun0 >> pci 6 pci_bridge_drv | | |- pci_2:4.0 >> nvme 0 nvme | | | `- nvme#0 >> blk 1 nvme-blk | | | `- nvme#0.blk#1 >> >> Namespaces and LUNs are modeled as block devices (class =3D 'blk'). > > So multiple block devices per NVMe device? I did not know that was suppo= rted. > > We need a sandbox driver for NVMe as it has no tests at present. Since > it has no tests, I don't think we can expect people to know how to > maintain whatever functionality is there. NVMe drives with multiple namespaces exist for servers but not for consumer NVMe drives. In QEMU you can define an NVMe device with multiple namespaces. Cf. https://qemu.readthedocs.io/en/latest/system/devices/nvme.html?highlight= =3Dnamespace#additional-namespaces So for a first glimpse at the handling I suggest to use QEMU. Best regards Heinrich