From patchwork Wed May 17 08:40:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 13244454 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BB72C77B75 for ; Wed, 17 May 2023 08:40:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229708AbjEQIk4 (ORCPT ); Wed, 17 May 2023 04:40:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjEQIkz (ORCPT ); Wed, 17 May 2023 04:40:55 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C63E71A5 for ; Wed, 17 May 2023 01:40:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684312854; x=1715848854; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=3fZhNINi1/KayY6QIEiyuNWlwxEN7AiDp6qwDC1Yrnw=; b=VQ6gvLyq5aAP5ndghV4xfIWmgIL0+EGJZeqtQ8ol6HD2Fh2vRc/fIXJX 2iAduRHqM2AYYfSniIFf7w5joOHIWtjaNEdKUrnUUAN9jTIU1IVZ0gXS/ geoi7GUs3Lv01hujshTqwUqME4GoUIkQlq/iXxJFIuyfPPzIxIJJNmVlY RSBMixpZdpQcquQdrZvKtMzDmRDX2Z0zGkACroaXMTcoJEktTByRY+Kbr qsviDvaX/FQ+68u0o3el06MZsRMASo6xY4OYX9UeEco2NZpfgrDVWgSOY jH89YHYVze5imNp9pC0w8qSBgVpsFOGadMMJf3F7Ib8ehzE2LSfPkqdgC A==; X-IronPort-AV: E=McAfee;i="6600,9927,10712"; a="415113326" X-IronPort-AV: E=Sophos;i="5.99,281,1677571200"; d="scan'208";a="415113326" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2023 01:40:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10712"; a="813779595" X-IronPort-AV: E=Sophos;i="5.99,281,1677571200"; d="scan'208";a="813779595" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 17 May 2023 01:40:52 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id 0188A618; Wed, 17 May 2023 11:41:03 +0300 (EEST) From: Mika Westerberg To: linux-usb@vger.kernel.org Cc: Yehezkel Bernat , Michael Jamet , Lukas Wunner , Andreas Noever , Mika Westerberg Subject: [PATCH 1/7] thunderbolt: Check for ring 0 in tb_tunnel_alloc_dma() Date: Wed, 17 May 2023 11:40:57 +0300 Message-Id: <20230517084103.45213-1-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Ring 0 cannot be used for anything else than control channel messages. For this reason add a check to tb_tunnel_alloc_dma() and fail if someone tries to do that. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/tunnel.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/thunderbolt/tunnel.c b/drivers/thunderbolt/tunnel.c index 9099ae73e78f..dd3b5613ad2c 100644 --- a/drivers/thunderbolt/tunnel.c +++ b/drivers/thunderbolt/tunnel.c @@ -1452,6 +1452,10 @@ struct tb_tunnel *tb_tunnel_alloc_dma(struct tb *tb, struct tb_port *nhi, struct tb_path *path; int credits; + /* Ring 0 is reserved for control channel */ + if (WARN_ON(!receive_ring || !transmit_ring)) + return NULL; + if (receive_ring > 0) npaths++; if (transmit_ring > 0) From patchwork Wed May 17 08:40:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 13244455 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D94FCC77B7F for ; Wed, 17 May 2023 08:40:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229765AbjEQIk5 (ORCPT ); Wed, 17 May 2023 04:40:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229540AbjEQIkz (ORCPT ); Wed, 17 May 2023 04:40:55 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9F2119B4 for ; Wed, 17 May 2023 01:40:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684312854; x=1715848854; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=E3NmOV6wW4gSZDDCMIjNzD16+BH8EdPA+l3a+HEsdI0=; b=XnttgnTAHaUh4AFtcJtz7Lg8IF+0tKfk4RBSdnQQ/pVsMS8nCIZr1NDQ GcY9iTuD01yIgG1r59Nemvhil5DrcdnSdJdgyL3vnBebNJiAPZoFAqMGu wKZcIat7vUeDCkWXzHjWABqPXMqzo0xWDHnm+4Urxa0g/7DrOPBVXJsk1 SGWhArvRW50ZNJYV5qzwFF9QYYqXcj+liOTDEon4XoChITb2cIqmYFiRX SB1ry9N1deD87TKBP5x0Qh0fDYxFFhDR5s9lj++o+B+Y3gDHcoE0aX4if zsmJVubg1A44cXCd1mrK2KMLUa4gn8bTkhjO/iP6a/ecBByJee60IwQPn w==; X-IronPort-AV: E=McAfee;i="6600,9927,10712"; a="354871302" X-IronPort-AV: E=Sophos;i="5.99,281,1677571200"; d="scan'208";a="354871302" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2023 01:40:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10712"; a="1031624536" X-IronPort-AV: E=Sophos;i="5.99,281,1677571200"; d="scan'208";a="1031624536" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga005.fm.intel.com with ESMTP; 17 May 2023 01:40:52 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id 104ED454; Wed, 17 May 2023 11:41:04 +0300 (EEST) From: Mika Westerberg To: linux-usb@vger.kernel.org Cc: Yehezkel Bernat , Michael Jamet , Lukas Wunner , Andreas Noever , Mika Westerberg Subject: [PATCH 2/7] thunderbolt: Log function name of the called quirk Date: Wed, 17 May 2023 11:40:58 +0300 Message-Id: <20230517084103.45213-2-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517084103.45213-1-mika.westerberg@linux.intel.com> References: <20230517084103.45213-1-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org This is useful when debugging whether a quirk has been matched or not. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/quirks.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/thunderbolt/quirks.c b/drivers/thunderbolt/quirks.c index 1157b8869bcc..928689b66126 100644 --- a/drivers/thunderbolt/quirks.c +++ b/drivers/thunderbolt/quirks.c @@ -105,6 +105,7 @@ void tb_check_quirks(struct tb_switch *sw) if (q->device && q->device != sw->device) continue; + tb_sw_dbg(sw, "running %ps\n", q->hook); q->hook(sw); } } From patchwork Wed May 17 08:40:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 13244457 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 063ADC77B7F for ; Wed, 17 May 2023 08:41:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230044AbjEQIlA (ORCPT ); Wed, 17 May 2023 04:41:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229755AbjEQIk4 (ORCPT ); Wed, 17 May 2023 04:40:56 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C75EBE5D for ; Wed, 17 May 2023 01:40:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684312855; x=1715848855; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fPpkw/B0lnk7DXQvjT/wwoqrELBsrddb/HZVg4grdm0=; b=RVQoV35P9iqL5PEG3BRvllOq3x37lOO7ocsn5ksV7ckIJhbQfJKtVjc5 45vW9rhrVtqaMWdQuvb2b6Qz+a4QxkJtoKXovQcgxNgBOeAZL0FCWJW/k xUCYr13gzsq5LkL/svZFXfn3QDWgmusU6yKC2P7yd7+7LtE7PUYHGdEfT frczWb2tsFnmjhDpUhTYufDVyq6Vp+SiZnqiZSEbY7nilCfxeKjx1RBg5 yZbZXIH/85ScMYJ6m4hrTAyvUxY42S9W+9eLqW1iNJp04L9fDw2R6fD9x TnEXNev9kfKoVzQITsKXkGbv+az39KuA5NuxspDSj33Ppqsl+SUAiwTYr A==; X-IronPort-AV: E=McAfee;i="6600,9927,10712"; a="354871305" X-IronPort-AV: E=Sophos;i="5.99,281,1677571200"; d="scan'208";a="354871305" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2023 01:40:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10712"; a="1031624539" X-IronPort-AV: E=Sophos;i="5.99,281,1677571200"; d="scan'208";a="1031624539" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga005.fm.intel.com with ESMTP; 17 May 2023 01:40:52 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id 1D31564C; Wed, 17 May 2023 11:41:04 +0300 (EEST) From: Mika Westerberg To: linux-usb@vger.kernel.org Cc: Yehezkel Bernat , Michael Jamet , Lukas Wunner , Andreas Noever , Mika Westerberg Subject: [PATCH 3/7] thunderbolt: Add debug log for link controller power quirk Date: Wed, 17 May 2023 11:40:59 +0300 Message-Id: <20230517084103.45213-3-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517084103.45213-1-mika.westerberg@linux.intel.com> References: <20230517084103.45213-1-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Add a debug log to this quirk as well so we can see what quirks have been applied when debugging. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/quirks.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/thunderbolt/quirks.c b/drivers/thunderbolt/quirks.c index 928689b66126..854d84148850 100644 --- a/drivers/thunderbolt/quirks.c +++ b/drivers/thunderbolt/quirks.c @@ -10,6 +10,7 @@ static void quirk_force_power_link(struct tb_switch *sw) { sw->quirks |= QUIRK_FORCE_POWER_LINK_CONTROLLER; + tb_sw_dbg(sw, "forcing power to link controller\n"); } static void quirk_dp_credit_allocation(struct tb_switch *sw) From patchwork Wed May 17 08:41:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 13244458 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7738FC77B75 for ; Wed, 17 May 2023 08:41:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229755AbjEQIlA (ORCPT ); Wed, 17 May 2023 04:41:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjEQIk5 (ORCPT ); Wed, 17 May 2023 04:40:57 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01F7D1A5 for ; Wed, 17 May 2023 01:40:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684312855; x=1715848855; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gr7H16zpTaOz1k3jh2HysFVoMq0R89WOzs9tCLlZkLA=; b=ZM4c2EhNpX1FJLz3BYd/lrNwD8rdhC975LJg1a2a+hO3Qvh+BkluEfhH vWS29YYT6fE1I/lpMjQcoDGO3cGOW3wbjJuci7lXzOTuMcmXXCzJuABzv EZlip6alKXjUuNvahZwdp/WID85cG3xu5Q+NFRsnocD10uNiOplwU2XrB 6LHxFVwOoVmBJ3GMcU5niW6UgTVC9v1CvgyNPeLF+StUBfKcqLaYXvHRb ASNkYRWAUnwhUHWTwU+vEbDPHMOAcnOAjtlcNJduRETpA3AjQUdaLolOE 6635bFURoumPoKCShEBV73e0FWfjt1nyOyRKC1Hf4uQnmRne9yXazgRYP g==; X-IronPort-AV: E=McAfee;i="6600,9927,10712"; a="354871309" X-IronPort-AV: E=Sophos;i="5.99,281,1677571200"; d="scan'208";a="354871309" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2023 01:40:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10712"; a="1031624541" X-IronPort-AV: E=Sophos;i="5.99,281,1677571200"; d="scan'208";a="1031624541" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga005.fm.intel.com with ESMTP; 17 May 2023 01:40:52 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id 2F8876B9; Wed, 17 May 2023 11:41:04 +0300 (EEST) From: Mika Westerberg To: linux-usb@vger.kernel.org Cc: Yehezkel Bernat , Michael Jamet , Lukas Wunner , Andreas Noever , Mika Westerberg Subject: [PATCH 4/7] thunderbolt: Allow specifying custom credits for DMA tunnels Date: Wed, 17 May 2023 11:41:00 +0300 Message-Id: <20230517084103.45213-4-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517084103.45213-1-mika.westerberg@linux.intel.com> References: <20230517084103.45213-1-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The default ones should be find but this allows the user to tweak the credits to get more performance out of the P2P connection. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/tunnel.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/thunderbolt/tunnel.c b/drivers/thunderbolt/tunnel.c index dd3b5613ad2c..3bf2628a5dcd 100644 --- a/drivers/thunderbolt/tunnel.c +++ b/drivers/thunderbolt/tunnel.c @@ -41,9 +41,14 @@ * Number of credits we try to allocate for each DMA path if not limited * by the host router baMaxHI. */ -#define TB_DMA_CREDITS 14U +#define TB_DMA_CREDITS 14 /* Minimum number of credits for DMA path */ -#define TB_MIN_DMA_CREDITS 1U +#define TB_MIN_DMA_CREDITS 1 + +static unsigned int dma_credits = TB_DMA_CREDITS; +module_param(dma_credits, uint, 0444); +MODULE_PARM_DESC(dma_credits, "specify custom credits for DMA tunnels (default: " + __MODULE_STRING(TB_DMA_CREDITS) ")"); static bool bw_alloc_mode = true; module_param(bw_alloc_mode, bool, 0444); @@ -95,7 +100,7 @@ static unsigned int tb_available_credits(const struct tb_port *port, pcie = tb_acpi_may_tunnel_pcie() ? sw->max_pcie_credits : 0; if (tb_acpi_is_xdomain_allowed()) { - spare = min_not_zero(sw->max_dma_credits, TB_DMA_CREDITS); + spare = min_not_zero(sw->max_dma_credits, dma_credits); /* Add some credits for potential second DMA tunnel */ spare += TB_MIN_DMA_CREDITS; } else { @@ -1472,7 +1477,7 @@ struct tb_tunnel *tb_tunnel_alloc_dma(struct tb *tb, struct tb_port *nhi, tunnel->dst_port = dst; tunnel->deinit = tb_dma_deinit; - credits = min_not_zero(TB_DMA_CREDITS, nhi->sw->max_dma_credits); + credits = min_not_zero(dma_credits, nhi->sw->max_dma_credits); if (receive_ring > 0) { path = tb_path_alloc(tb, dst, receive_path, nhi, receive_ring, 0, From patchwork Wed May 17 08:41:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 13244456 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 014D3C7EE23 for ; Wed, 17 May 2023 08:40:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229910AbjEQIk6 (ORCPT ); Wed, 17 May 2023 04:40:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbjEQIk4 (ORCPT ); Wed, 17 May 2023 04:40:56 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0A42B1 for ; Wed, 17 May 2023 01:40:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684312855; x=1715848855; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FLiqIojWJJMiKYsTVOWsnWQ0vBLXFDjUr6CZ6F1z/B8=; b=EXgXZp/KxfN9uNfgNC/DBkTUo1Oq4Sy1mjyt5LR4pGDv4WPBUs+/jrTr qBBFHbwhittCOYAeHd9RDTgf6zS8Onx7rYbcsmWrOW6Afb56auqeC/DTr KiSjrEk+ij0dkyQQxfnWQIfQANx5Mue04aPpJFhXaIwHYAX4i/25xpRpR XkBP2jKGpQaxJvmDzOL8QTnMWmUmifG7c9es0J+kRvbr9k7YgrTAnuIiq 64dHB/2i4nZy6Yufk7lMizmzNC1Xpn6D7jc4bmtE6GTOw5H0ukSOUdOWb +8q1t4xfqjJAY4SNQcVSy4NoKN8sbM5+b1FBB4pCvuAJQsNljezOceV9q w==; X-IronPort-AV: E=McAfee;i="6600,9927,10712"; a="415113329" X-IronPort-AV: E=Sophos;i="5.99,281,1677571200"; d="scan'208";a="415113329" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2023 01:40:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10712"; a="813779597" X-IronPort-AV: E=Sophos;i="5.99,281,1677571200"; d="scan'208";a="813779597" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 17 May 2023 01:40:52 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id 3532B664; Wed, 17 May 2023 11:41:04 +0300 (EEST) From: Mika Westerberg To: linux-usb@vger.kernel.org Cc: Yehezkel Bernat , Michael Jamet , Lukas Wunner , Andreas Noever , Mika Westerberg Subject: [PATCH 5/7] thunderbolt: Add MODULE_DESCRIPTION Date: Wed, 17 May 2023 11:41:01 +0300 Message-Id: <20230517084103.45213-5-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517084103.45213-1-mika.westerberg@linux.intel.com> References: <20230517084103.45213-1-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Add description about the driver to the module. No functional changes. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/nhi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c index d76e923fbc6a..e5a8f9861f9b 100644 --- a/drivers/thunderbolt/nhi.c +++ b/drivers/thunderbolt/nhi.c @@ -1464,6 +1464,7 @@ static struct pci_device_id nhi_ids[] = { }; MODULE_DEVICE_TABLE(pci, nhi_ids); +MODULE_DESCRIPTION("Thunderbolt/USB4 core driver"); MODULE_LICENSE("GPL"); static struct pci_driver nhi_driver = { From patchwork Wed May 17 08:41:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 13244459 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BF3FC77B75 for ; Wed, 17 May 2023 08:41:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229866AbjEQIlC (ORCPT ); Wed, 17 May 2023 04:41:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229887AbjEQIk6 (ORCPT ); Wed, 17 May 2023 04:40:58 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 129A1B1 for ; Wed, 17 May 2023 01:40:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684312857; x=1715848857; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AwyT8fLYe2hfumgg25Y3UbHwoCjVg26Ufs241WC86qQ=; b=mHANHNTnmu+DUwnJNxs4tmMqqqAF5OdcWitzsP/6QQK+m0JIRG7KMmQq Zwgx8yZ5shQOmPV1D5J70AOBtU8e7aBk24BIfycnuBSFY45Wu+CCsV+Bu UblT5Wols087wUbJI4aKeL52cLEaCaEaVbuLiMPIul9cIA15uVH8V3TmB bRinRBMZXB9LpnZ8tD7TKDNkwqhWUGj1NiKq7AGOlqUwzThJNVjwHOwBm XgLpkndPApQXhsfmK7G/Qb7xl2r6IMZXZdao3N1+ciuFx6WvssLDd7HX9 9e8qfIGpzlBoFu2l7lF9SnrksQ2TZ39qpNkKZYsWbyAIHpbbZzTESbD8M w==; X-IronPort-AV: E=McAfee;i="6600,9927,10712"; a="415113338" X-IronPort-AV: E=Sophos;i="5.99,281,1677571200"; d="scan'208";a="415113338" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2023 01:40:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10712"; a="813779611" X-IronPort-AV: E=Sophos;i="5.99,281,1677571200"; d="scan'208";a="813779611" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 17 May 2023 01:40:54 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id 49978791; Wed, 17 May 2023 11:41:04 +0300 (EEST) From: Mika Westerberg To: linux-usb@vger.kernel.org Cc: Yehezkel Bernat , Michael Jamet , Lukas Wunner , Andreas Noever , Mika Westerberg Subject: [PATCH 6/7] thunderbolt: dma_test: Update MODULE_DESCRIPTION Date: Wed, 17 May 2023 11:41:02 +0300 Message-Id: <20230517084103.45213-6-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517084103.45213-1-mika.westerberg@linux.intel.com> References: <20230517084103.45213-1-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Make the description match the core driver and the networking with Thunderbolt/USB4 prefix. No functional changes. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/dma_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thunderbolt/dma_test.c b/drivers/thunderbolt/dma_test.c index 14bb6dec6c4b..58496f889d03 100644 --- a/drivers/thunderbolt/dma_test.c +++ b/drivers/thunderbolt/dma_test.c @@ -756,5 +756,5 @@ module_exit(dma_test_exit); MODULE_AUTHOR("Isaac Hazan "); MODULE_AUTHOR("Mika Westerberg "); -MODULE_DESCRIPTION("DMA traffic test driver"); +MODULE_DESCRIPTION("Thunderbolt/USB4 DMA traffic test driver"); MODULE_LICENSE("GPL v2"); From patchwork Wed May 17 08:41:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 13244460 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A575C77B7F for ; Wed, 17 May 2023 08:41:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230058AbjEQIlF (ORCPT ); Wed, 17 May 2023 04:41:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229867AbjEQIk6 (ORCPT ); Wed, 17 May 2023 04:40:58 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64D65E5D for ; Wed, 17 May 2023 01:40:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684312857; x=1715848857; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GNXhNlwhT5WnAvyzUk7coEPbpNjgVVS8vm/hHSbpZ7U=; b=dbY+0poQP2qWB+LN6H7Jr0FPq1nZl/J1PFycW4247UkxLOybGfjB32A1 tYgbfm5mbrf6Rb2aYjVMj/boh0haqW8Tc7WJWA07ZsIhWDHUSeH4/MZO/ OF9mhdM0wmocEQjTORkxZXOTT5GUcMESQPjWA5FOIn3kpCdVcE84yH8u8 heTMTKLNdUg83ayPRSDsThVt0SM4okRksYLQUjR63W5iRsGZZgcBwJ115 HYWxShFM1s3k4fTZ5VnIv1m85O2qr7Z4u4JFwNvayz4kjDM8ISwRrMt9J Lg8OgpqVlBIqbYgb9WwvbtMyfiVdbipO1VfCpaO/lbtCw+bcdeQWFGFCq g==; X-IronPort-AV: E=McAfee;i="6600,9927,10712"; a="415113342" X-IronPort-AV: E=Sophos;i="5.99,281,1677571200"; d="scan'208";a="415113342" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2023 01:40:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10712"; a="813779609" X-IronPort-AV: E=Sophos;i="5.99,281,1677571200"; d="scan'208";a="813779609" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 17 May 2023 01:40:54 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id 5344B70C; Wed, 17 May 2023 11:41:04 +0300 (EEST) From: Mika Westerberg To: linux-usb@vger.kernel.org Cc: Yehezkel Bernat , Michael Jamet , Lukas Wunner , Andreas Noever , Mika Westerberg Subject: [PATCH 7/7] thunderbolt: Drop retimer vendor check Date: Wed, 17 May 2023 11:41:03 +0300 Message-Id: <20230517084103.45213-7-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230517084103.45213-1-mika.westerberg@linux.intel.com> References: <20230517084103.45213-1-mika.westerberg@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org This is not needed anymore as we already handle unknown vendor in NVM functions. Signed-off-by: Mika Westerberg --- drivers/thunderbolt/retimer.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/thunderbolt/retimer.c b/drivers/thunderbolt/retimer.c index 9cc28197dbc4..ccc2f0e7adba 100644 --- a/drivers/thunderbolt/retimer.c +++ b/drivers/thunderbolt/retimer.c @@ -341,12 +341,6 @@ static int tb_retimer_add(struct tb_port *port, u8 index, u32 auth_status) return ret; } - if (vendor != PCI_VENDOR_ID_INTEL && vendor != 0x8087) { - tb_port_info(port, "retimer NVM format of vendor %#x is not supported\n", - vendor); - return -EOPNOTSUPP; - } - /* * Check that it supports NVM operations. If not then don't add * the device at all.