Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933835AbcLTINq (ORCPT ); Tue, 20 Dec 2016 03:13:46 -0500 Received: from mga04.intel.com ([192.55.52.120]:44098 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933735AbcLTINn (ORCPT ); Tue, 20 Dec 2016 03:13:43 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,377,1477983600"; d="scan'208";a="20610680" Date: Tue, 20 Dec 2016 10:09:16 +0200 From: Mika Westerberg To: Mario.Limonciello@dell.com Cc: luto@kernel.org, amir.jer.levy@intel.com, gregkh@linuxfoundation.org, andreas.noever@gmail.com, bhelgaas@google.com, corbet@lwn.net, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, netdev@vger.kernel.org, linux-doc@vger.kernel.org, thunderbolt-linux@intel.com, tomas.winkler@intel.com, xiong.y.zhang@intel.com Subject: Re: [PATCH v8 3/8] thunderbolt: Communication with the ICM (firmware) Message-ID: <20161220080916.GV1460@lahna.fi.intel.com> References: <1475073870-2126-1-git-send-email-amir.jer.levy@intel.com> <1475073870-2126-4-git-send-email-amir.jer.levy@intel.com> <20161219122407.GQ1460@lahna.fi.intel.com> <05d9c1db67af410981bbb9672071a237@ausx13mpc120.AMER.DELL.COM> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <05d9c1db67af410981bbb9672071a237@ausx13mpc120.AMER.DELL.COM> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1067 Lines: 20 On Mon, Dec 19, 2016 at 05:21:39PM +0000, Mario.Limonciello@dell.com wrote: > Dell - Internal Use - Confidential > > > > > There is small problem, though. On non-Apple systems the host controller only > > appears when something is connected to thunderbolt ports. So the char device > > would not be there all the time. However, I think we can still notify the > > userspace by sending an extra uevent when we detect there is a PCIe device or > > inter-domain connection plugged in. > > > > Why couldn't you just create it the first time a device is plugged into a Thunderbolt > port and leave it until the module is cleaned up? If the host controller goes to sleep > an event could be sent to the daemon to let it know it disappeared and not to expect > data on the char device for now, but leave the node around. We don't do that for USB memory sticks (or any other removable media) either - once you disconnect the device the nodes are also removed. I suppose same goes with USB network adapters, which is closest to thunderbolt networking I can think of.