Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2517059rwb; Mon, 3 Oct 2022 01:46:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM48/kne6uQVdU+xIpDOnAQM3hCAUiSKin076HAejHAqtBahTLWObaFfngtB0+hWmaQgKZCq X-Received: by 2002:aa7:998f:0:b0:54d:a441:85da with SMTP id k15-20020aa7998f000000b0054da44185damr21233675pfh.20.1664786802119; Mon, 03 Oct 2022 01:46:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664786802; cv=none; d=google.com; s=arc-20160816; b=r790kFjPyjF99ASwqVM/0A1otL9mQ1m9ZvuyFo/q2ktR6U/3eDruskvkT/SM+h8TdC QmuQcsWjlsx4sMy8kmiLUWt0Z/qMKlRohunaxtwyVfRYZvsEdeZ7aR/EbWJrzN4UkpX6 AHqIWXmaDHMjctFIf8ya3Edq7vB4D6JwXTQr0tmh26bqWiSqDp9bk+jykobhCr1M9SDs 5yKRN99AlzqwemM/+hV7/B2AQxQwdwiiQlglPgsnJrcXJ1jIEF/F4Sg0ax4pv7XrAwAP sqId0YmCRIYeiNI7AyfvMWVx/Pj8hTJ0Ryd8oYBRemmYoIPOAx8ColgVJ0qRWyLAeEdc CDpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=F4ZGc5MLQpWVVogMpOkw5z4bAXQ6ni3POFuQBN/DcMg=; b=qwYNlF2vybGykfAK7uAB9VQjrYP2TIBLyh+k7UG6QkkVrh0lcaSjLDtPwNHzvMUtIA Zch3ICrQNireoW+SAKzzXXDfbphqxlqeYOXqKV6Jzc5HEhCVTg1vG4cOsmCW5crST9Lv 6n1DAeIZyhx42klE1QPP9mGcM3YUs/gkqyyxjlAwrWRhfyENz+Mb21XEn6JQjt7EWqms 5iOol/wPIu5ZZ1/x7YLwBLgFHySCA2XlqRab1+M++UU/U/oAGFsag3mWOR2MW3Wn/r+w 9M04RS+uT39JFhmkbT9RbyFEZg58XtCfJlESpa9jcNaf6tV+afr0a/v9y1TCbZqEby8q fpYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=P4cio6DY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 190-20020a6301c7000000b004412bb6b27asi9155366pgb.55.2022.10.03.01.46.31; Mon, 03 Oct 2022 01:46:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=P4cio6DY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231626AbiJCHgC (ORCPT + 99 others); Mon, 3 Oct 2022 03:36:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231826AbiJCHef (ORCPT ); Mon, 3 Oct 2022 03:34:35 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADDC452E51; Mon, 3 Oct 2022 00:22:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E4D8BB808BF; Mon, 3 Oct 2022 07:20:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A598C433D6; Mon, 3 Oct 2022 07:20:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664781644; bh=3xrLfcjB9Quar55K3szE0jM1nPIp3xL1u/a7utKu0B0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P4cio6DYnwGtj/v9/RhvXHpI3w8/riLfSszyzBqJSrg2g8VCpeU/NqsI6xxeQOguV /Ei77f4wj3xDiMbY896ztUG8mVfcJVsT7jUDXNoqiY1lxYON0RnsAdacTBFCXa31f3 Y2yosBViIoYENHAlgEEmXTi4lxrowHuxNuuOvgkA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mario Limonciello , Mika Westerberg Subject: [PATCH 5.10 12/52] thunderbolt: Explicitly reset plug events delay back to USB4 spec value Date: Mon, 3 Oct 2022 09:11:19 +0200 Message-Id: <20221003070719.091702858@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221003070718.687440096@linuxfoundation.org> References: <20221003070718.687440096@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mario Limonciello commit 31f87f705b3c1635345d8e8a493697099b43e508 upstream. If any software has interacted with the USB4 registers before the Linux USB4 CM runs, it may have modified the plug events delay. It has been observed that if this value too large, it's possible that hotplugged devices will negotiate a fallback mode instead in Linux. To prevent this, explicitly align the plug events delay with the USB4 spec value of 10ms. Cc: stable@vger.kernel.org Signed-off-by: Mario Limonciello Signed-off-by: Mika Westerberg Signed-off-by: Greg Kroah-Hartman --- drivers/thunderbolt/switch.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -2046,6 +2046,7 @@ int tb_switch_configure(struct tb_switch * additional capabilities. */ sw->config.cmuv = USB4_VERSION_1_0; + sw->config.plug_events_delay = 0xa; /* Enumerate the switch */ ret = tb_sw_write(sw, (u32 *)&sw->config + 1, TB_CFG_SWITCH,