From patchwork Fri Jan 29 08:32:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 373641 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=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 58FFBC433DB for ; Fri, 29 Jan 2021 10:56:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0E7DE64E31 for ; Fri, 29 Jan 2021 10:56:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232063AbhA2Kzw (ORCPT ); Fri, 29 Jan 2021 05:55:52 -0500 Received: from mga17.intel.com ([192.55.52.151]:49161 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232261AbhA2K0d (ORCPT ); Fri, 29 Jan 2021 05:26:33 -0500 IronPort-SDR: Uvx2dhu8cyxjzyVcnZu3afwdlOensRhF+l62caHw9nbz56w7KcFbHASoIlAB4oKdMALWQ0zgVd nkNQj+mpq5BA== X-IronPort-AV: E=McAfee;i="6000,8403,9878"; a="160159828" X-IronPort-AV: E=Sophos;i="5.79,385,1602572400"; d="scan'208";a="160159828" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2021 00:32:45 -0800 IronPort-SDR: wYoluzMQ6lR5oyzLGSxGA4EDnT5TlS1ZBQS/Ox4X1C+G1PBEFow2nr/f8A2KF8BHqQnAfrwiRi Y/JlcW7wKLaA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,385,1602572400"; d="scan'208";a="409564863" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 29 Jan 2021 00:32:42 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id 97F0B17F; Fri, 29 Jan 2021 10:32:41 +0200 (EET) From: Mika Westerberg To: linux-usb@vger.kernel.org Cc: Yehezkel Bernat , Michael Jamet , Andreas Noever , Lukas Wunner , Mario Limonciello , "Rafael J. Wysocki" , Christian Kellner , Len Brown , Greg Kroah-Hartman , Mika Westerberg , linux-acpi@vger.kernel.org Subject: [PATCH v2 0/5] thunderbolt / ACPI: Add support for USB4 _OSC Date: Fri, 29 Jan 2021 11:32:36 +0300 Message-Id: <20210129083241.72497-1-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Hi all, The just released ACPI 6.4 spec [1] adds a new _OSC method that is used to negotiate OS support for native USB4 features such as PCIe tunneling. This patch series adds Linux support for the new _OSC and modifies the Thunderbolt/USB4 driver accordingly to enable/disable tunneling of different protocols. There is an additional setting in the firmware connection manager that allows the BIOS to disable PCIe tunneling, so we add support for this and also make the software connection manager to switch to this "nopcie" security level when the _OSC does not allow PCIe tunneling. This applies on top of thunderbolt.git/next. [1] https://uefi.org/sites/default/files/resources/ACPI_Spec_6_4_Jan22.pdf The previous version of the patch series can be found here: https://lore.kernel.org/linux-usb/20210126155723.9388-1-mika.westerberg@linux.intel.com/ Changes from v1: * Dropped patch 1/6. I already applied it to thunderbolt.git/fixes * Added ACK from Yehezkel to TBT patches * Updated changelog of patch 1/5 and fixed typos too * Added Rafael's tag to patch 4/5. Mario Limonciello (1): ACPI: Execute platform _OSC also with query bit clear Mika Westerberg (4): thunderbolt: Add support for PCIe tunneling disabled (SL5) thunderbolt: Allow disabling XDomain protocol ACPI: Add support for native USB4 control _OSC thunderbolt: Add support for native USB4 _OSC .../ABI/testing/sysfs-bus-thunderbolt | 2 + Documentation/admin-guide/thunderbolt.rst | 7 ++ drivers/acpi/bus.c | 119 ++++++++++++++++-- drivers/thunderbolt/acpi.c | 65 ++++++++++ drivers/thunderbolt/domain.c | 16 ++- drivers/thunderbolt/icm.c | 6 +- drivers/thunderbolt/nhi.c | 27 +++- drivers/thunderbolt/switch.c | 6 +- drivers/thunderbolt/tb.c | 22 +++- drivers/thunderbolt/tb.h | 13 ++ drivers/thunderbolt/tunnel.c | 10 +- drivers/thunderbolt/usb4.c | 11 +- drivers/thunderbolt/xdomain.c | 9 ++ include/linux/acpi.h | 10 ++ include/linux/thunderbolt.h | 3 + 15 files changed, 298 insertions(+), 28 deletions(-)