Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2515541rwb; Mon, 3 Oct 2022 01:44:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6cF4NhG8omFFYVdN822ctCnpvwV2YpYBnTkkPXs3J05iRTMGPkRoJCVZoH6VxyUCjMPPsi X-Received: by 2002:a17:90b:1b0a:b0:203:3947:1a73 with SMTP id nu10-20020a17090b1b0a00b0020339471a73mr11134497pjb.43.1664786682231; Mon, 03 Oct 2022 01:44:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664786682; cv=none; d=google.com; s=arc-20160816; b=ED9T+XoryXrSKPiAlby7imQ7FfvKwEWVLgLeH3wx2KJ4n6vPgQHGDUhEqQkQKT6vIh moLAYhQuLkGn4aHZFya5UNEFxGuUMflnuygnuzKgEnCrrwGbMoY3qwZ5VuhG9tItxFmk tI6ao3Dvb6HHQsqoKg6CDZd4LJgSb8hX1b0YZS6Vl6FJSCcVAWRpy1aSmfqM1+idiGHb OenrLvqFrAK4ALiqhfFwMGOD3ZlD+rtnCHMfI3QSFzEaj2V31FTMY2qzqDWM/NEAQIdW LQmIkWc2tmONEnwVvPLFsk3hIOmixbzw1iLbK/2ArNP2D7BfE/y2Sj1sHhPcjWf28g/5 2Mqw== 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=mPBJVeOe+J5txBAAKVy3cHM1RPUOVIWwUwBMF1kAGgI=; b=RvNA/uB9rLcwCPA9e+uVqUJdGGBVHn2DSVFc3Nx9zxW3xSjlF7nPjFhDx17TSU8f1f 0DRpRyT7Z8iH5e63p2E84hLm22+aZaWgvGUYWTyXEpxiiwT28PQhgrSX9pUiHee2hqjv AFpTFz5vSceLV2Dk+qAOy1QtHpgDNZyxmQboo7ZppBXz2xk7VbGW8uvYF3Guk+8ApdeF rLjxN2LI37ggYkjPjDbDEtxKC+j5n+0mlb/cVpZc2QfRbMQ5FesSNFIRQUJoBk/O9+3x 582I96EsdDqrVziTsnUJoMyRZQTeCHJE8t4y/8JWFK2nyW+isvLMgT0vU+PpkP9FMPd+ wwhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=m2SOj6Fm; 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 f8-20020a170902ab8800b0017829e27195si9295473plr.521.2022.10.03.01.44.30; Mon, 03 Oct 2022 01:44: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=m2SOj6Fm; 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 S231245AbiJCH1r (ORCPT + 99 others); Mon, 3 Oct 2022 03:27:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231209AbiJCH1M (ORCPT ); Mon, 3 Oct 2022 03:27:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE8C14D254; Mon, 3 Oct 2022 00:19:02 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 34BF960FA7; Mon, 3 Oct 2022 07:16:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 420B2C433D6; Mon, 3 Oct 2022 07:16:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664781413; bh=J9P75/5S0RATD9l47s7hFoGzMQDgVknonjFIUC+Vo2Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m2SOj6FmIVIYYuiF4NRMrJtxtTdZz981cNznAP6Vv+iy3e1RSJ5Fe4YWhj1+HkFv5 X+/kPN3fO4zMUXFAiBzCiDsGjl1J3EvC5dPUFa4KLFHcaMTM7sY3eIcCPi85tPCo3k E8j6RVfydvRv0RemEzYe8Ixg0QmtAolM09UOP3o4= 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.15 11/83] thunderbolt: Explicitly reset plug events delay back to USB4 spec value Date: Mon, 3 Oct 2022 09:10:36 +0200 Message-Id: <20221003070722.268664803@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221003070721.971297651@linuxfoundation.org> References: <20221003070721.971297651@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 @@ -2281,6 +2281,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,