Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp587266ybp; Fri, 4 Oct 2019 01:33:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqycT96Oz1JZ3UmuuZWr/35e85IHcA16OX9KzBcy0It6zXAUXDuPEwH2Ef3wejDoyRGfQ6V5 X-Received: by 2002:a17:906:5847:: with SMTP id h7mr11286398ejs.218.1570177985241; Fri, 04 Oct 2019 01:33:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570177985; cv=none; d=google.com; s=arc-20160816; b=PLgDiXnO2D5bg3FHT3jYdxO4A1SDplSxsL/IQ/53DdF79j62qMAJm9LNeQaLDeKQ2U sQWhfYR7L27tDUTHdyrMXlT5XM9hOF/gqSPPJzLHYRrnMVxlFNpZzFyc/jcpVgaLtSEW v9FHpg3XPaQXJf8UGOphrWAz/eFt7OczqT+UuY2pGoK+gHUWKoShBvh57IU1KKyZHP06 r2bIbws5oHgbRMTAGWUDCZj1d+ttGJ36czzmHy92DP2n94UVDrb0Gkf9LVyTPkipDvgf Lv3hGo4eLRwBtsu+DG40NqY/SFqG0E/7CN8spUKVFxDrBKAyrP2oRfFB6enNPp/c5KxA mHfw== 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=9x56xxAKw6HtTjZWirBbUPzTsD89flrJmwfxwtm4dHM=; b=SEOx8cXLc96dsT3TRK1i/WpSCe1Uuk1IV7WIuESNWw/mwIKhejfLPouytKS8WZqSJH qgpXS/mTItpXpGo81rXqTM9324rOMGAChQCQloOs31IWht/Z8o9WSYHVQ+cKhkdQWnHt YYIXiS1nbdln5RByX2nIPJyzIDhjBVnT71bvEJ6ZZaD9302+AtYTX/DeQAqh+B61KfJv xYBFSCIugdcV2AWy1DBviSDf5ssii/lkXcwxUiTijYuSEfxaL99/aio7gNfWlnlK+0qC dsufLi0PL/zACf6lTTyhuymp21TG6gEzhvc4wYhHxUIaq/dgujsCRzvTCLMdYc/4eAGy iS/g== 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 g18si2027144eje.297.2019.10.04.01.32.41; Fri, 04 Oct 2019 01:33:05 -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 S2388501AbfJDIT5 (ORCPT + 99 others); Fri, 4 Oct 2019 04:19:57 -0400 Received: from mga17.intel.com ([192.55.52.151]:56639 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388246AbfJDIT4 (ORCPT ); Fri, 4 Oct 2019 04:19:56 -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 fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Oct 2019 01:19:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,255,1566889200"; d="scan'208";a="205805350" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.157]) by fmsmga001.fm.intel.com with SMTP; 04 Oct 2019 01:19:52 -0700 Received: by lahna (sSMTP sendmail emulation); Fri, 04 Oct 2019 11:19:51 +0300 Date: Fri, 4 Oct 2019 11:19:51 +0300 From: Mika Westerberg To: Yehezkel Bernat Cc: Mario Limonciello , linux-usb@vger.kernel.org, Andreas Noever , Michael Jamet , Rajmohan Mani , nicholas.johnson-opensource@outlook.com.au, Lukas Wunner , gregkh@linuxfoundation.org, stern@rowland.harvard.edu, Anthony Wong , LKML Subject: Re: [RFC PATCH 17/22] thunderbolt: Add initial support for USB4 Message-ID: <20191004081951.GD2819@lahna.fi.intel.com> References: <184c95fc476146939b240557e54ee2c9@AUSX13MPC105.AMER.DELL.COM> <5357cb96013445d79f5c2016df8a194e@AUSX13MPC105.AMER.DELL.COM> <20191002083913.GG2714@lahna.fi.intel.com> <767f2f97059e4e9f861080672aaa18d3@AUSX13MPC105.AMER.DELL.COM> <20191003080028.GK2819@lahna.fi.intel.com> <06a04bff94494da99c5359a7fb645d19@AUSX13MPC105.AMER.DELL.COM> <20191004075426.GA2819@lahna.fi.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 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 Fri, Oct 04, 2019 at 11:07:34AM +0300, Yehezkel Bernat wrote: > > Also if you can get the hw_vendor_id and hw_product_id from the kernel > > does that mean you don't need to do the two reads or you still need > > those? > > Are those the chip vendor or the OEM, in case they are different? Those are the actual USB4 hardware maker values, directly from ROUTER_CS_0 (p. 287 in the USB4 spec). This almost certainly differ from the OEM values from DROM we currently expose. > Thinking about it again, I'd guess it shouldn't matter much, if the chip is from > Intel, the FW supports NVM upgrade, isn't it? So the bottom line is that if the kernel thinks the router supports NVM upgrade it exposes the nvm_active/nvm_non_active files etc. I think fwupd uses this information to display user whether the device can be upgraded or not (for example ICL cannot as the NVM is part of BIOS). Exposing hw_vendor_id and hw_product_id may speed up fwupd because it does not need to go over the active NVM to figure out whether the new image is for the correct controller.