Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp41691ybn; Thu, 3 Oct 2019 01:02:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZmMPNQDhd5wjcMrlcWDGsjpRxprkWCtQs+8huOY5ls6a3rgaRNJKewg1NOHIo7yNJH+6D X-Received: by 2002:a17:906:164d:: with SMTP id n13mr6558543ejd.75.1570089739267; Thu, 03 Oct 2019 01:02:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570089739; cv=none; d=google.com; s=arc-20160816; b=HZVqcS5jDdOjlkwjKylzrUUDk7IbUKB/mVPh2Z3dQzhuiWsTKfSDEB3Mwom+9FLZqb b0tTyeAxqKv1v2OrrZBto6rWzJ7Ev22DEQD4ffaDj9oWp6C9BXYdB1di2kV8uO/L0p8h 6m2/Q+nI44oOBFnqc+VPSaiGsuCMYLwVnjdE3eAu8iGpiYbHW0khuF5FkBG+4esRuoVF Zg3nSSNfj5AvIu956bmDlketHmmxdLLQEOZp0vqlQ3hxN8P4Au6YLGYIujanih4boZEv epH3Dwb0FaMLjlTA9x1EkG7RDG2CS1oqG0jAhCL6EnGNexs8Phdgxe1gDaHWc+wwJA05 IxxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=fmgE2d+s1oMO/I1m0B3YSCgQYhIKjNvNG6hGlKBvpjw=; b=Wuo43f+YXhTwXnADoWFwo5IxbILLoaBQt4z4FWOwlzKJNFRAEmwUzD6LoSaQXR51HY dbMimAF+MEZZa/feRIzoEbLggufZ/sLzW7ePHb0zVt42Cw+5tTpJEu28GeRKFNC/6GJ3 BW26OAZG3UsoM2GTSjqETMHPw6LX3dz1yaxz1RxRBuGMZALvInSfdSCeZG/JoEDKLkVU ZAktJfdUNGAfgmY3ZaAm5vFdFBsd0TQxK1aW5ORTXOnn4aOoIn7xWu8ORV4SED8DBtFp efYJFy5VFAM7FEw8mmJCV5PUa+DGcr13uoVZdOojFMDhKslUjiMd5n6lpSxVjXWN4f0u /Y/w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 57si1020609edz.280.2019.10.03.01.01.50; Thu, 03 Oct 2019 01:02:19 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728812AbfJCIAe (ORCPT + 99 others); Thu, 3 Oct 2019 04:00:34 -0400 Received: from mga02.intel.com ([134.134.136.20]:61559 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727368AbfJCIAd (ORCPT ); Thu, 3 Oct 2019 04:00:33 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Oct 2019 01:00:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,251,1566889200"; d="scan'208";a="205560839" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.157]) by fmsmga001.fm.intel.com with SMTP; 03 Oct 2019 01:00:29 -0700 Received: by lahna (sSMTP sendmail emulation); Thu, 03 Oct 2019 11:00:28 +0300 Date: Thu, 3 Oct 2019 11:00:28 +0300 From: Mika Westerberg To: Mario.Limonciello@dell.com Cc: yehezkelshb@gmail.com, linux-usb@vger.kernel.org, andreas.noever@gmail.com, michael.jamet@intel.com, rajmohan.mani@intel.com, nicholas.johnson-opensource@outlook.com.au, lukas@wunner.de, gregkh@linuxfoundation.org, stern@rowland.harvard.edu, anthony.wong@canonical.com, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4 Message-ID: <20191003080028.GK2819@lahna.fi.intel.com> References: <20191001113830.13028-1-mika.westerberg@linux.intel.com> <20191001113830.13028-18-mika.westerberg@linux.intel.com> <184c95fc476146939b240557e54ee2c9@AUSX13MPC105.AMER.DELL.COM> <5357cb96013445d79f5c2016df8a194e@AUSX13MPC105.AMER.DELL.COM> <20191002083913.GG2714@lahna.fi.intel.com> <767f2f97059e4e9f861080672aaa18d3@AUSX13MPC105.AMER.DELL.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 User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 02, 2019 at 04:00:55PM +0000, Mario.Limonciello@dell.com wrote: > > It's not even "same location - another meaning", the vendor ID comes from the > > DROM section, so it takes a few internal jumps inside the NVM to find the > > location. One of the "pointers" or section headers will be broken for sure. > > > > And after this, we need to find the NVM in LVFS and it has to pass validation in > > a few other locations. The chances are so low that I'd think it isn't worth > > worrying about it. > > And now I remember why the back of my mind was having this thought of wanting > sysfs attribute in the first place. The multiple jumps means that a lot more of the > NVM has to be dumped to get that data, which slows down fwupd startup significantly. IIRC currently fwupd does two reads of total 128 bytes from the active NVM. Is that really slowing down fwupd startup significantly? > However the kernel has this information handy already from thunderbolt init and can > easily export an attribute which can then come from udev with no startup penalty. Indeed kernel has this information but I'm bit hesitant to add new attributes if that same information is already available to the userspace rather easily. IMHO we can always add this to the driver later as we learn new NVM formats that require more parsing from fwupd side slowing it down considerably.