Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp6358026pxb; Thu, 27 Jan 2022 12:02:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJy50Vjvf6VfQWdcVfRnedFaNdEXP8kVXESNXu7tQLX7scfvfGNNHgFete1AEWWUwkhTfhIz X-Received: by 2002:a17:90b:3447:: with SMTP id lj7mr5846535pjb.39.1643313770881; Thu, 27 Jan 2022 12:02:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643313770; cv=none; d=google.com; s=arc-20160816; b=jWSTx49c5bXbtDrc9CN/PraNk9zAAOK4sV6EPVKTxvf3b8NkNRJ4xbQyv4miveidUx A57Ev8E+p7kX1K6N7UM3z26VtjU5ffdHkuv8tCPXbjSOMEXXyYoS9X2fdEHERnxBRKOU YszsDpKIOENPG5vMYIs80lTH+YvEQhgYLvMVqJbaryLdLEFynI4N1/813hXa9O4kE8Qs /uKciWqlxJXqyLpYsiBIKrIA3pcKFDqF3HxBImVi5ogzxhEq/N2lLpx7drs6KXRF+B/8 r8rYvNipj+VjyIwiqCuHhsExVkbphUV2ZQx302fav1RENH9nP17NvvVnJtH+92+Df9JB 0nDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=vbuXxnzKYvFSnbadpQxYzufConipCAQus8FPVtPhx/8=; b=l+EXCHewAXLWzPzxv9tjVUgmrmh6zq+IVoHnluCo5/Hhy3Q//+q9agOTTTd3sh3KgZ 78jc6xbDTZaRXe2kFFTe5ctr1DSDTxlFcwxrUeaazGlbauHLND3ujIBnoYgMrNuqP5GY t8MGKJWG074N3VJCXGe0YBxkxsT8Mb8w5pqzRqlylq2qajPG62Ef5HguBHEsIHzq0yyQ i9eNNuPIQODtSP9LHZ+dfKTJb/HMBJNTGgbn6H1JRH45jbWKITsWSFPVEEpa09j5XBvy QcndV9M4kqOVoIAitZKe1/J4CZki7TN2z6E9OA3FAfkKu+aZ+E7cPLJYATCm6pM4MFJn yMSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e11si3168043pgp.97.2022.01.27.12.02.36; Thu, 27 Jan 2022 12:02:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235435AbiA0LXN (ORCPT + 99 others); Thu, 27 Jan 2022 06:23:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230438AbiA0LXN (ORCPT ); Thu, 27 Jan 2022 06:23:13 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE8E0C061714 for ; Thu, 27 Jan 2022 03:23:12 -0800 (PST) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nD2rq-000536-AJ; Thu, 27 Jan 2022 12:23:06 +0100 Received: from ore by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1nD2rp-0008BL-JU; Thu, 27 Jan 2022 12:23:05 +0100 Date: Thu, 27 Jan 2022 12:23:05 +0100 From: Oleksij Rempel To: Greg KH Cc: Oliver Neukum , "David S. Miller" , Jakub Kicinski , Rob Herring , kernel@pengutronix.de, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH net-next v1 4/4] usbnet: add support for label from device tree Message-ID: <20220127112305.GC9150@pengutronix.de> References: <20220127104905.899341-1-o.rempel@pengutronix.de> <20220127104905.899341-5-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 12:08:34 up 47 days, 19:54, 83 users, load average: 0.10, 0.22, 0.25 User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 27, 2022 at 11:57:26AM +0100, Greg KH wrote: > On Thu, Jan 27, 2022 at 11:49:05AM +0100, Oleksij Rempel wrote: > > Similar to the option to set a netdev name in device tree for switch > > ports by using the property "label" in the DSA framework, this patch > > adds this functionality to the usbnet infrastructure. > > > > This will help to name the interfaces properly throughout supported > > devices. This provides stable interface names which are useful > > especially in embedded use cases. > > Stable interface names are for userspace to set, not the kernel. > > Why would USB care about this? If you need something like this, get it > from the USB device itself, not DT, which should have nothing to do with > USB as USB is a dynamic, self-describing, bus. Unlike DT. > > So I do not think this is a good idea. This is needed for embedded devices with integrated USB Ethernet controller. Currently I have following use cases to solve: - Board with one or multiple USB Ethernet controllers with external PHY. The PHY need devicetree to describe IRQ, clock sources, label on board, etc. - Board with USB Ethernet controller with DSA switch. The USB ethernet controller is attached to the CPU port of DSA switch. In this case, DSA switch is the sub-node of the USB device. The CPU port should have stable name for all device related to this product. Using user space tools to name interfaces would double the maintenance of similar information: DT - describing the HW + udev scripts describing same HW again. Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |