Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5160930imu; Tue, 29 Jan 2019 14:00:14 -0800 (PST) X-Google-Smtp-Source: ALg8bN4q92S/EGwPXXelI2yV/JNEyjbcamfHCOC03BTt/Ym8a43lkVy5uGnD3wEXFu2ZhK6vEMDw X-Received: by 2002:a62:7042:: with SMTP id l63mr29061265pfc.89.1548799214137; Tue, 29 Jan 2019 14:00:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548799214; cv=none; d=google.com; s=arc-20160816; b=I5dHay3UHbG1u4G+TuO2EtgTmqAJteuDso5WS9xyqZndIlJpoN8yE6qXSisdhSlWSu zZSUsqDybtRwflNxk++Wzkxj+qK9FAdVXm1HC3EKez1RzEHJkzTGUPCnM1em/5iakY3i WFY5x1DRKVejpfBMmaXv57rHIvz/5VHKWMbhXkkCaIa6zr6qpqq/AOB4Vc48jDYQCMhx 10+uvhthEfvh2whuAVzjkps1Vmt+j89ml/nWd/RIDYprydvP1J6QlUSrHg6Ls9NsV0sf I/snNs7hTH6EdfGQS9rtGpqvX0lksj4ZMYFsggwqx+7zYYrYcT7VXH/1mYahfwS1a3Nn A8MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=4UsCG6Sh2eNqxVqKnwOX5crV+vO+Ts8LVsVe4RAkjhU=; b=n7mxExUcVpzDS5c3Rj3SME0hhv5pF/6jrRoqfb09Y4UJMO85uLkPRY4xZTDwwzxXQ0 9RKw3tVhOXCNZU1HojtkAlk+qwdK03G6w3raD459UnmqOgwdW0DZU4gF1TzKddoep/o3 8i087T2TKQeA7NM3uXWPlBjZAYLCMsQNu2lE2I9Y1obW6ban6s66dAr7TuBCKayCGRUa 5OeLNt07UpIYEYdkG+eWu7dE9pfCBYUhf9B3KUEwjb7Pygpb7oFYZ3oX0jyub+rz1hV5 MkotQsK8HVA+nhS3gXMCN/3uk7EuhpMIRQDws1o7Mh8V5wbh7kNL1u2bQF3K/jlRDxSd /05A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v200si8023798pgb.15.2019.01.29.13.59.58; Tue, 29 Jan 2019 14:00:14 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729546AbfA2V7B (ORCPT + 99 others); Tue, 29 Jan 2019 16:59:01 -0500 Received: from bmailout3.hostsharing.net ([176.9.242.62]:37201 "EHLO bmailout3.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727545AbfA2V7B (ORCPT ); Tue, 29 Jan 2019 16:59:01 -0500 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id 3FBAA100D940B; Tue, 29 Jan 2019 22:58:59 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id AFA2CDCB9; Tue, 29 Jan 2019 22:58:58 +0100 (CET) Date: Tue, 29 Jan 2019 22:58:58 +0100 From: Lukas Wunner To: Mika Westerberg Cc: linux-kernel@vger.kernel.org, Michael Jamet , Yehezkel Bernat , Andreas Noever , Andy Shevchenko Subject: Re: [PATCH 03/28] thunderbolt: Enable TMU access when accessing port space on legacy devices Message-ID: <20190129215858.c2yws2ce76d7qm62@wunner.de> References: <20190129150143.12681-1-mika.westerberg@linux.intel.com> <20190129150143.12681-4-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190129150143.12681-4-mika.westerberg@linux.intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 29, 2019 at 06:01:18PM +0300, Mika Westerberg wrote: > + if (enable) > + value |= BIT(20); Can we have a macro for this bit? > +int tb_port_find_cap(struct tb_port *port, enum tb_port_cap cap) > +{ > + int ret; > + > + ret = tb_port_enable_tmu(port, true); > + if (ret) > + return ret; > + > + ret = __tb_port_find_cap(port, cap); > + > + tb_port_enable_tmu(port, false); > + > + return ret; > +} Would there be a downside to setting the TMU bit on all ports all the time (e.g. on switch enumeration)? Thanks, Lukas