Received: by 2002:ac0:950e:0:0:0:0:0 with SMTP id f14csp1267771imc; Sun, 17 Mar 2019 08:51:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqw6N7IQVNHGTfmp115vTA6ESv6Lr78tCXWB6v6dhFxDIMxhXQgHxQGJgEiRI3QgubfgBL7I X-Received: by 2002:a63:6b03:: with SMTP id g3mr13428814pgc.239.1552837913862; Sun, 17 Mar 2019 08:51:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552837913; cv=none; d=google.com; s=arc-20160816; b=EwPmduswyV8f0raGFwFyO8i0ZeyQRkIdg4rNPKrvQYJKB9ouZMFoaPhpTK+iQOn+JC 187TNu+6bKbnK5OrwZzl8FvFm5+bnydn9sVWrWQuFfgv82xnzByxuiv6U7ww6SJIS1uk 3SL+KinUXhh4A9movcuj5pXd+NuXGIK+yqwkIsE/nC0/pyBx0MlGinw+E9TmGi2e1Bdp 3LLTnmYcdhmw6RxWX9E0Ul5CcFLei1r65H2XJr1U1bvxUZ3I/CQvoyUWxjzmwTLalpKY +1HctpAwJNge0wOp9APkujXMPltw9v/oyi3mXzg/kz2LU/GKuVkL6K0fJP5WQAz8Iup1 bGrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=D/gVrpA8wL9fyOcZCiO2DfS3m7f8rar3bdNo68OkZbw=; b=V9/Ml9NWYKMAwtbXufTJ3kAyrh7oBYoAiMbNxyUK+Bt9RQ8S9MXe+JC49QdzXlD8ca +i1g20SVLlMLhQHb2aGJXzlHmABcTSZAUQu4ffnLNb7ifBBRmqV5AImi9mbFTejPWBR5 l56TASi7sgmloiJ2hDaGPcUK8Xvv94iuNwGZXmuiV8DjNNqjQhw49moaHAEO621mt5nC igm7n97z43WaxJsj2/wIa5P69//Lebl/hMarisuXOXVN4N08mAnlw93+Bav6hkdUvQC5 jbixZYSXald4SbpRuomA6/dOALtLorY6FlBNC7T3qLGuX5zpKBUCpAg3uzUHDq+8P6ay 6LjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l93si7555457plb.331.2019.03.17.08.51.39; Sun, 17 Mar 2019 08:51:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727400AbfCQPvE (ORCPT + 99 others); Sun, 17 Mar 2019 11:51:04 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:45718 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726677AbfCQPvD (ORCPT ); Sun, 17 Mar 2019 11:51:03 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 44MkLR6WhPz1rJD4; Sun, 17 Mar 2019 16:50:55 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 44MkLR3jvzz1qql8; Sun, 17 Mar 2019 16:50:55 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id wMWx7SLMMlHI; Sun, 17 Mar 2019 16:50:52 +0100 (CET) X-Auth-Info: Zh4TjbphzOCe6LC7WCHkygX8ZVCsYSAb5xxIjoO3yWI= Received: from [IPv6:::1] (unknown [195.140.253.167]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sun, 17 Mar 2019 16:50:52 +0100 (CET) Subject: Re: [PATCH v2 0/4] Patches to allow consistent mmc / mmcblk numbering w/ device tree To: Russell King - ARM Linux admin , Stefan Agner Cc: Mark Rutland , Ulf Hansson , =?UTF-8?B?TcOlbnMgUnVsbGfDpXJk?= , Heiko Stuebner , devicetree-spec@vger.kernel.org, shawn.lin@rock-chips.com, Douglas Anderson , vbyravarasu@nvidia.com, Jisheng Zhang , Lars-Peter Clausen , jonathanh@nvidia.com, Jaehoon Chung , linux-rockchip@lists.infradead.org, chaotian.jing@mediatek.com, devicetree@vger.kernel.org, Pawel Moll , Ian Campbell , grundler@chromium.org, Tim Harvey , sudeep.holla@arm.com, lporzio@micron.com, Rob Herring , Adrian Hunter , linux-arm-kernel@lists.infradead.org, Sergei Shtylyov , Dmitry Torokhov , Linux MMC List , open list , Kumar Gala , Brian Norris , zhonghui.fu@linux.intel.com, kirill.shutemov@linux.intel.com References: <1461951139-6109-1-git-send-email-dianders@chromium.org> <1fcd4dad-1e00-67cc-ac5d-24640ae34340@denx.de> <20190316153900.xqi55awrockovmsi@shell.armlinux.org.uk> <20190317154350.esbhdx4huzqe2jxy@shell.armlinux.org.uk> From: Marek Vasut Openpgp: preference=signencrypt Autocrypt: addr=marex@denx.de; prefer-encrypt=mutual; keydata= mQINBFHmnxgBEACuQOC6Kaw/32MTeUJdFuDZ1FrbG76a0Ys/I02Kj9jXDmCCLvqq18Z4A1b0 xbuMKGDy5WR77fqGV8zADUo6i1ATgCZeg+SRmQROF8r9K6n6digTznBySSLANhN3kXUMNRE1 WEIBGCZJ5FF+Qq59AkAUTB8CiIzfEW98o7lUjeEume/78wR18+QW+2z6eYli2qNECceRINXT zS3oxRMr+ivqEUGK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XTsuWN5t3u8avXsrdqD0CteTJdgZ7yBV8bBvK2ekqFMS/cLC+MoYlmUFn6Tcxmv0x8QZY ux6ts9YpUvx8QxMJt9vfwt1WIUEFKR3JQdrZmbPGqWJ3s+u/C+v9stC5qf2eYafRjzy05lEn B06W5D5Uc+FGEhuzq4G0eRLgivMoC0Eqz7HuwGcRAJYQILQ3Vzd4oHKPoUAtvlKqUwDmHodT HPmN73JMsvO3jLrSdl4k6o3CdlS/DI0Eto4fD0Wqh6d5q11u1TOM7+/LehWrOOoGVqRc6FFT ofck6h6rN/Urwkr1nWQ3kgO1cd/gevqy8Tevo/qkPYIf71BlypcXhKqn6IPjkq4QLiDPRjHM tgPc2T/X/ETe5eCuhxMytIYbt1fK2pDXPoIKbbDK4uEmg9USXZ+pYrac4PFo1d+6D6vmTjRZ GRRITOVpKgBndfPyqofxeKNKGdNf9FS/x89RlnDWXsQHm+0pXguSRG9XdB16ZFNgeo8SeZVr qc9uLfhyQp/zB6qEnuX1TToug7PuDgcNZdjN3vgTXyno2TFMxp/LKHqg Message-ID: <6962d659-5308-1f06-7329-1595e41aaeac@denx.de> Date: Sun, 17 Mar 2019 16:50:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190317154350.esbhdx4huzqe2jxy@shell.armlinux.org.uk> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/17/19 4:43 PM, Russell King - ARM Linux admin wrote: > On Sun, Mar 17, 2019 at 04:05:14PM +0100, Stefan Agner wrote: >> On 16.03.2019 16:39, Russell King - ARM Linux admin wrote: >>> On Sat, Mar 16, 2019 at 01:33:58PM +0100, Marek Vasut wrote: >>>> If you have a FS or partition table there, it does. >>>> If you don't, I agree ... that's a problem. >>> >>> eMMC boot partitions are called mmcblkXbootY, and unless you have more >>> than one eMMC device on the system, they can be found either by looking >>> for /dev/mmcblk*boot* or by querying udev. The advantage of using udev >>> is you can discover the physical device behind it by looking at DEVPATH, >>> ID_PATH, etc, but you may not have that installed on an embedded device. >>> >>> However, as I say, just looking for /dev/mmcblk*boot* is sufficient to >>> find the eMMC boot partitions where there is just one eMMC device >>> present (which seems to be the standard setup.) >>> >>>>> I don't care the slightest what the numbering is, as long as it is >>>>> stable. On some hardware, with an unpatched kernel, the mmc device >>>>> numbering changes depending on whether or not an SD card is inserted on >>>>> boot. Getting rid of that behaviour is really all I want. >>>> >>>> Agreed, that would be an improvement. >>> >>> The mmc device numbering was tied to the mmc host numbering a while back >>> and the order that the hosts are probed should be completely independent >>> of whether a card is inserted or not: >>> >>> snprintf(md->disk->disk_name, sizeof(md->disk->disk_name), >>> "mmcblk%u%s", card->host->index, subname ? subname : ""); >>> >>> snprintf(rpmb_name, sizeof(rpmb_name), >>> "mmcblk%u%s", card->host->index, subname ? subname : ""); >>> >>> I suspect that Mans is quoting something from the dim and distant past >>> to confuse the issue - as shown above, it is now dependent on the host >>> numbering order not the order in which cards are inserted. >> >> Commit 9aaf3437aa72 ("mmc: block: Use the mmc host device index as the >> mmcblk device index") which came in with v4.6 enables constant mmc block >> device numbering. I can confirm that it works nicely, and it improved >> the situation a lot. >> >> That being said, we still use a patch downstream which allows >> renumbering using an alias. We deal with a bunch of different boards >> with different SoC's. I have a couple of SD cards with various rootfs >> and use internal eMMC boot quite often as well. Remembering which board >> uses which numbering is a pain. Maintaining a patch is just easier... >> Furthermore, U-Boot allows reordering and all boards I deal with use mmc >> 0 for the internal eMMC. The aliases allow consistency. > > Maybe eMMC should've been given a different block device name? I presume that's because they have hardware and software partitioning and that's why you want to discern those two. -- Best regards, Marek Vasut