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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1188C433E9 for ; Thu, 11 Mar 2021 08:00:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7184564FD8 for ; Thu, 11 Mar 2021 08:00:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230187AbhCKIAF (ORCPT ); Thu, 11 Mar 2021 03:00:05 -0500 Received: from mga11.intel.com ([192.55.52.93]:50134 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230011AbhCKIAA (ORCPT ); Thu, 11 Mar 2021 03:00:00 -0500 IronPort-SDR: fi61dXtj4bgzTdP4R17f8cjN2UwawJBylwzpLd4mEAYV/5bgqQ/CQqLInbnvaychOvddjOZX7g PilY/Whr0hlg== X-IronPort-AV: E=McAfee;i="6000,8403,9919"; a="185273331" X-IronPort-AV: E=Sophos;i="5.81,239,1610438400"; d="scan'208";a="185273331" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2021 23:59:59 -0800 IronPort-SDR: O5ijGuoUwidjBHXGs4bL1X5GMC7WbFrhhNuqEMxL4GSm6weT4RsBpBi/cxGninzimXtIH69EBw rO+JRk+PSADw== X-IronPort-AV: E=Sophos;i="5.81,239,1610438400"; d="scan'208";a="386927623" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.163]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2021 23:59:55 -0800 Received: by lahna (sSMTP sendmail emulation); Thu, 11 Mar 2021 09:59:52 +0200 Date: Thu, 11 Mar 2021 09:59:52 +0200 From: Mika Westerberg To: "Limonciello, Mario" Cc: "linux-usb@vger.kernel.org" , Michael Jamet , Yehezkel Bernat , Andreas Noever , Lukas Wunner , Christian Kellner , Benson Leung , Prashant Malani , Diego Rivas , Greg Kroah-Hartman Subject: Re: [PATCH 1/3] thunderbolt: Add details to router uevent Message-ID: <20210311075952.GJ2542@lahna.fi.intel.com> References: <20210309134818.63118-1-mika.westerberg@linux.intel.com> <20210309134818.63118-2-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Hi Mario, On Wed, Mar 10, 2021 at 05:28:19PM +0000, Limonciello, Mario wrote: > > > > -----Original Message----- > > From: Mika Westerberg > > Sent: Tuesday, March 9, 2021 7:48 > > To: linux-usb@vger.kernel.org > > Cc: Michael Jamet; Yehezkel Bernat; Andreas Noever; Lukas Wunner; Limonciello, > > Mario; Christian Kellner; Benson Leung; Prashant Malani; Diego Rivas; Greg > > Kroah-Hartman; Mika Westerberg > > Subject: [PATCH 1/3] thunderbolt: Add details to router uevent > > > > > > [EXTERNAL EMAIL] > > > > Expose two environment variables for routers as part of the initial > > uevent: > > > > USB4_VERSION=1.0 > > USB4_TYPE=host|device|hub > > Presumably this will then show up in the uevent like this for a host controller: > DEVTYPE=thunderbolt_device > USB4_VERSION=1.0 > USB4_TYPE=host > > Since it's specifically for USB4, how about if you instead have new devtypes? > TBT3: > DEVTYPE=thunderbolt_device > > USB4: > DEVTYPE=usb4_host|usb4_device|usb4_hub > > That would at least make it clearer to userspace to make a delineation if it's > legacy device or not. I don't know if that's actually valuable information however. Unfortunately we can't do that. DEVTYPE is generated by the driver core based on the struct device_type we register for routers (switches). Also bolt, and I think fwupd too, already use DEVTYPE to distinguish routers from other devices (like XDomains etc).